chiark / gitweb /
python: reindent to follow coding style
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*- */
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #
8 #  systemd is free software; you can redistribute it and/or modify it
9 #  under the terms of the GNU Lesser General Public License as published by
10 #  the Free Software Foundation; either version 2.1 of the License, or
11 #  (at your option) any later version.
12 #
13 #  systemd is distributed in the hope that it will be useful, but
14 #  WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 #  Lesser General Public License for more details.
17 #
18 #  You should have received a copy of the GNU Lesser General Public License
19 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23
24 SUBDIRS = . po
25
26 # remove targets if the command fails
27 .DELETE_ON_ERROR:
28
29 LIBUDEV_CURRENT=2
30 LIBUDEV_REVISION=0
31 LIBUDEV_AGE=1
32
33 LIBGUDEV_CURRENT=1
34 LIBGUDEV_REVISION=2
35 LIBGUDEV_AGE=1
36
37 LIBSYSTEMD_LOGIN_CURRENT=3
38 LIBSYSTEMD_LOGIN_REVISION=3
39 LIBSYSTEMD_LOGIN_AGE=3
40
41 LIBSYSTEMD_DAEMON_CURRENT=0
42 LIBSYSTEMD_DAEMON_REVISION=4
43 LIBSYSTEMD_DAEMON_AGE=0
44
45 LIBSYSTEMD_ID128_CURRENT=0
46 LIBSYSTEMD_ID128_REVISION=9
47 LIBSYSTEMD_ID128_AGE=0
48
49 LIBSYSTEMD_JOURNAL_CURRENT=4
50 LIBSYSTEMD_JOURNAL_REVISION=1
51 LIBSYSTEMD_JOURNAL_AGE=4
52
53 # Dirs of external packages
54 dbuspolicydir=@dbuspolicydir@
55 dbussessionservicedir=@dbussessionservicedir@
56 dbussystemservicedir=@dbussystemservicedir@
57 dbusinterfacedir=@dbusinterfacedir@
58 pamlibdir=@pamlibdir@
59 pkgconfigdatadir=$(datadir)/pkgconfig
60 pkgconfiglibdir=$(libdir)/pkgconfig
61 polkitpolicydir=$(datadir)/polkit-1/actions
62 bashcompletiondir=$(sysconfdir)/bash_completion.d
63 rpmmacrosdir=$(sysconfdir)/rpm
64
65 # Our own, non-special dirs
66 pkgsysconfdir=$(sysconfdir)/systemd
67 userunitdir=$(prefix)/lib/systemd/user
68 tmpfilesdir=$(prefix)/lib/tmpfiles.d
69 sysctldir=$(prefix)/lib/sysctl.d
70 usergeneratordir=$(prefix)/lib/systemd/user-generators
71 pkgincludedir=$(includedir)/systemd
72 systemgeneratordir=$(rootlibexecdir)/system-generators
73 systemshutdowndir=$(rootlibexecdir)/system-shutdown
74 systemsleepdir=$(rootlibexecdir)/system-sleep
75 systemunitdir=$(rootprefix)/lib/systemd/system
76 udevlibexecdir=$(rootprefix)/lib/udev
77 udevhomedir = $(udevlibexecdir)
78 udevrulesdir = $(udevlibexecdir)/rules.d
79
80 # And these are the special ones for /
81 rootprefix=@rootprefix@
82 rootbindir=$(rootprefix)/bin
83 rootlibexecdir=$(rootprefix)/lib/systemd
84
85 CLEANFILES = $(BUILT_SOURCES)
86 EXTRA_DIST =
87 BUILT_SOURCES =
88 INSTALL_EXEC_HOOKS =
89 UNINSTALL_EXEC_HOOKS =
90 INSTALL_DATA_HOOKS =
91 DISTCLEAN_LOCAL_HOOKS =
92 pkginclude_HEADERS =
93 noinst_LTLIBRARIES =
94 lib_LTLIBRARIES =
95 include_HEADERS =
96 pkgconfiglib_DATA =
97 polkitpolicy_in_files =
98 polkitpolicy_files =
99 dist_udevrules_DATA =
100 nodist_udevrules_DATA =
101 dist_man_MANS =
102 dist_pkgsysconf_DATA =
103 dist_pkgdata_DATA =
104 dist_dbuspolicy_DATA =
105 dbusinterface_DATA =
106 dist_dbussystemservice_DATA =
107 check_PROGRAMS =
108 check_DATA =
109 noinst_PROGRAMS =
110 TESTS =
111 udevlibexec_PROGRAMS =
112
113 AM_CPPFLAGS = \
114         -include $(top_builddir)/config.h \
115         -DSYSCONFDIR=\""$(sysconfdir)"\" \
116         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
117         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
118         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
119         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
120         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
121         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
122         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
123         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
124         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
125         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
126         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
127         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
128         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
129         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
130         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
131         -DROOTPREFIX=\"$(rootprefix)\" \
132         -DRUNTIME_DIR=\"/run\" \
133         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
134         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
135         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
136         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
137         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
138         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
139         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
140         -DX_SERVER=\"$(bindir)/X\" \
141         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
142         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
143         -I $(top_srcdir)/src \
144         -I $(top_srcdir)/src/shared \
145         -I $(top_srcdir)/src/login \
146         -I $(top_srcdir)/src/journal \
147         -I $(top_srcdir)/src/systemd \
148         -I $(top_builddir)/src/core \
149         -I $(top_srcdir)/src/core \
150         -I $(top_srcdir)/src/libudev \
151         -I $(top_srcdir)/src/udev \
152         $(OUR_CPPFLAGS)
153
154 AM_CFLAGS = $(OUR_CFLAGS)
155 AM_LDFLAGS = $(OUR_LDFLAGS)
156
157 # ------------------------------------------------------------------------------
158 if TARGET_GENTOO
159 AM_CPPFLAGS += \
160         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
161         -DKBD_SETFONT=\"/usr/bin/setfont\" \
162         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
163 else
164 if TARGET_ARCH
165 AM_CPPFLAGS += \
166         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
167         -DKBD_SETFONT=\"/usr/bin/setfont\" \
168         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
169 else
170 if TARGET_FRUGALWARE
171 AM_CPPFLAGS += \
172         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
173         -DKBD_SETFONT=\"/usr/bin/setfont\" \
174         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
175 else
176 if TARGET_MANDRIVA
177 AM_CPPFLAGS += \
178         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
179         -DKBD_SETFONT=\"/bin/setfont\" \
180         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
181 else
182 if TARGET_ANGSTROM
183 AM_CPPFLAGS += \
184         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
185         -DKBD_SETFONT=\"/usr/bin/setfont\" \
186         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
187 else
188 if TARGET_MAGEIA
189 AM_CPPFLAGS += \
190         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
191         -DKBD_SETFONT=\"/bin/setfont\" \
192         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
193 else
194 AM_CPPFLAGS += \
195         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
196         -DKBD_SETFONT=\"/bin/setfont\" \
197         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
198 endif
199 endif
200 endif
201 endif
202 endif
203 endif
204
205 # ------------------------------------------------------------------------------
206 rootbin_PROGRAMS = \
207         systemctl \
208         systemd-notify \
209         systemd-ask-password \
210         systemd-tty-ask-password-agent \
211         systemd-tmpfiles \
212         systemd-machine-id-setup
213
214 bin_PROGRAMS = \
215         systemd-cgls \
216         systemd-cgtop \
217         systemd-stdio-bridge \
218         systemd-nspawn \
219         systemd-detect-virt \
220         systemd-delta
221
222 dist_bin_SCRIPTS = \
223         src/analyze/systemd-analyze
224
225 rootlibexec_PROGRAMS = \
226         systemd \
227         systemd-cgroups-agent \
228         systemd-initctl \
229         systemd-update-utmp \
230         systemd-shutdownd \
231         systemd-shutdown \
232         systemd-modules-load \
233         systemd-remount-fs \
234         systemd-reply-password \
235         systemd-fsck \
236         systemd-timestamp \
237         systemd-ac-power \
238         systemd-sysctl \
239         systemd-sleep
240
241 systemgenerator_PROGRAMS = \
242         systemd-getty-generator \
243         systemd-fstab-generator \
244         systemd-system-update-generator
245
246 dist_bashcompletion_DATA = \
247         bash-completion/systemd-bash-completion.sh
248
249 dist_tmpfiles_DATA = \
250         tmpfiles.d/systemd.conf \
251         tmpfiles.d/tmp.conf \
252         tmpfiles.d/x11.conf
253
254 if HAVE_SYSV_COMPAT
255 dist_tmpfiles_DATA += \
256         tmpfiles.d/legacy.conf
257 endif
258
259 dist_systemunit_DATA = \
260         units/graphical.target \
261         units/multi-user.target \
262         units/emergency.service \
263         units/emergency.target \
264         units/sysinit.target \
265         units/basic.target \
266         units/getty.target \
267         units/halt.target \
268         units/kexec.target \
269         units/local-fs.target \
270         units/local-fs-pre.target \
271         units/remote-fs.target \
272         units/remote-fs-pre.target \
273         units/network.target \
274         units/nss-lookup.target \
275         units/nss-user-lookup.target \
276         units/mail-transfer-agent.target \
277         units/hibernate.target \
278         units/http-daemon.target \
279         units/poweroff.target \
280         units/reboot.target \
281         units/rescue.target \
282         units/rpcbind.target \
283         units/time-sync.target \
284         units/shutdown.target \
285         units/final.target \
286         units/umount.target \
287         units/sigpwr.target \
288         units/sleep.target \
289         units/sockets.target \
290         units/suspend.target \
291         units/swap.target \
292         units/systemd-initctl.socket \
293         units/systemd-shutdownd.socket \
294         units/syslog.socket \
295         units/dev-hugepages.mount \
296         units/dev-mqueue.mount \
297         units/sys-kernel-config.mount \
298         units/sys-kernel-debug.mount \
299         units/sys-fs-fuse-connections.mount \
300         units/tmp.mount \
301         units/printer.target \
302         units/sound.target \
303         units/bluetooth.target \
304         units/smartcard.target \
305         units/systemd-tmpfiles-clean.timer \
306         units/quotaon.service \
307         units/systemd-ask-password-wall.path \
308         units/systemd-ask-password-console.path \
309         units/syslog.target \
310         units/systemd-udevd-control.socket \
311         units/systemd-udevd-kernel.socket \
312         units/system-update.target
313
314 nodist_systemunit_DATA = \
315         units/getty@.service \
316         units/serial-getty@.service \
317         units/console-shell.service \
318         units/console-getty.service \
319         units/systemd-initctl.service \
320         units/systemd-shutdownd.service \
321         units/systemd-modules-load.service \
322         units/systemd-remount-fs.service \
323         units/systemd-update-utmp-runlevel.service \
324         units/systemd-update-utmp-shutdown.service \
325         units/systemd-tmpfiles-setup.service \
326         units/systemd-tmpfiles-clean.service \
327         units/systemd-ask-password-wall.service \
328         units/systemd-ask-password-console.service \
329         units/systemd-sysctl.service \
330         units/emergency.service \
331         units/rescue.service \
332         units/user@.service \
333         units/systemd-hibernate.service \
334         units/systemd-suspend.service \
335         units/systemd-halt.service \
336         units/systemd-poweroff.service \
337         units/systemd-reboot.service \
338         units/systemd-kexec.service \
339         units/systemd-fsck@.service \
340         units/systemd-fsck-root.service \
341         units/systemd-udevd.service \
342         units/systemd-udev-trigger.service \
343         units/systemd-udev-settle.service \
344         units/debug-shell.service
345
346 dist_userunit_DATA = \
347         units/user/default.target \
348         units/user/exit.target
349
350 nodist_userunit_DATA = \
351         units/user/systemd-exit.service
352
353 EXTRA_DIST += \
354         units/getty@.service.m4 \
355         units/serial-getty@.service.m4 \
356         units/console-shell.service.m4.in \
357         units/console-getty.service.m4.in \
358         units/rescue.service.m4.in \
359         units/systemd-initctl.service.in \
360         units/systemd-shutdownd.service.in \
361         units/systemd-modules-load.service.in \
362         units/systemd-remount-fs.service.in \
363         units/systemd-update-utmp-runlevel.service.in \
364         units/systemd-update-utmp-shutdown.service.in \
365         units/systemd-tmpfiles-setup.service.in \
366         units/systemd-tmpfiles-clean.service.in \
367         units/systemd-ask-password-wall.service.in \
368         units/systemd-ask-password-console.service.in \
369         units/systemd-sysctl.service.in \
370         units/emergency.service.in \
371         units/systemd-halt.service.in \
372         units/systemd-poweroff.service.in \
373         units/systemd-reboot.service.in \
374         units/systemd-kexec.service.in \
375         units/user/systemd-exit.service.in \
376         units/systemd-fsck@.service.in \
377         units/systemd-fsck-root.service.in \
378         units/user@.service.in \
379         units/systemd-udevd.service \
380         units/systemd-udev-trigger.service \
381         units/systemd-udev-settle.service \
382         units/debug-shell.service.in \
383         units/systemd-hibernate.service.in \
384         units/systemd-suspend.service.in \
385         units/quotaon.service.in \
386         introspect.awk \
387         man/custom-html.xsl
388
389 if TARGET_FEDORA
390 dist_systemunit_DATA += \
391         units/fedora/rc-local.service \
392         units/fedora/halt-local.service
393 systemgenerator_PROGRAMS += \
394         systemd-rc-local-generator
395 endif
396
397 if TARGET_MANDRIVA
398 dist_systemunit_DATA += \
399         units/fedora/rc-local.service \
400         units/fedora/halt-local.service
401 systemgenerator_PROGRAMS += \
402         systemd-rc-local-generator
403 endif
404
405 if TARGET_FRUGALWARE
406 dist_systemunit_DATA += \
407         units/frugalware/display-manager.service
408 endif
409
410 if TARGET_SUSE
411 dist_systemunit_DATA += \
412         units/suse/rc-local.service \
413         units/suse/halt-local.service
414 systemgenerator_PROGRAMS += \
415         systemd-rc-local-generator
416 endif
417
418 if TARGET_MAGEIA
419 dist_systemunit_DATA += \
420         units/fedora/rc-local.service \
421         units/fedora/halt-local.service
422 systemgenerator_PROGRAMS += \
423         systemd-rc-local-generator
424 endif
425
426 dist_doc_DATA = \
427         README \
428         NEWS \
429         LICENSE.LGPL2.1 \
430         LICENSE.GPL2 \
431         LICENSE.MIT \
432         DISTRO_PORTING
433
434 @INTLTOOL_POLICY_RULE@
435
436 # ------------------------------------------------------------------------------
437 MANPAGES = \
438         man/systemd.1 \
439         man/systemctl.1 \
440         man/systemd-cgls.1 \
441         man/systemd-delta.1 \
442         man/systemd-cgtop.1 \
443         man/systemd-nspawn.1 \
444         man/systemd-tmpfiles.8 \
445         man/systemd-notify.1 \
446         man/systemd.unit.5 \
447         man/systemd.service.5 \
448         man/systemd.socket.5 \
449         man/systemd.mount.5 \
450         man/systemd.automount.5 \
451         man/systemd.swap.5 \
452         man/systemd.timer.5 \
453         man/systemd.path.5 \
454         man/systemd.target.5 \
455         man/systemd.device.5 \
456         man/systemd.snapshot.5 \
457         man/systemd.exec.5 \
458         man/systemd.kill.5 \
459         man/systemd.special.7 \
460         man/systemd.journal-fields.7 \
461         man/kernel-command-line.7 \
462         man/daemon.7 \
463         man/bootup.7 \
464         man/runlevel.8 \
465         man/telinit.8 \
466         man/halt.8 \
467         man/shutdown.8 \
468         man/pam_systemd.8 \
469         man/systemd.conf.5 \
470         man/tmpfiles.d.5 \
471         man/hostname.5 \
472         man/timezone.5 \
473         man/machine-id.5 \
474         man/locale.conf.5 \
475         man/os-release.5 \
476         man/machine-info.5 \
477         man/modules-load.d.5 \
478         man/systemd-modules-load.service.8 \
479         man/sysctl.d.5 \
480         man/systemd-sysctl.service.8 \
481         man/systemd-ask-password.1 \
482         man/systemd-cat.1 \
483         man/systemd-machine-id-setup.1 \
484         man/systemd-detect-virt.1 \
485         man/journald.conf.5 \
486         man/systemd-journald.service.8 \
487         man/journalctl.1 \
488         man/systemd-inhibit.1 \
489         man/systemd-remount-fs.service.8 \
490         man/systemd-update-utmp-runlevel.service.8 \
491         man/systemd-initctl.service.8 \
492         man/systemd-shutdownd.service.8 \
493         man/systemd-suspend.service.8 \
494         man/systemd-halt.service.8 \
495         man/systemd-fsck@.service.8 \
496         man/systemd-ask-password-console.service.8 \
497         man/systemd-analyze.1 \
498         man/systemd-tty-ask-password-agent.1 \
499         man/systemd-getty-generator.8 \
500         man/systemd-system-update-generator.8 \
501         man/systemd-fstab-generator.8 \
502         man/systemd.preset.5 \
503         man/sd-id128.3 \
504         man/sd_id128_to_string.3 \
505         man/sd_id128_randomize.3 \
506         man/sd_id128_get_machine.3 \
507         man/sd-journal.3 \
508         man/sd_journal_print.3 \
509         man/sd_journal_stream_fd.3 \
510         man/sd_journal_open.3 \
511         man/sd_journal_next.3 \
512         man/sd_journal_get_data.3 \
513         man/sd_journal_get_realtime_usec.3 \
514         man/sd_journal_get_cutoff_realtime_usec.3 \
515         man/sd_journal_get_cursor.3 \
516         man/sd_journal_get_fd.3 \
517         man/sd_journal_get_usage.3 \
518         man/sd_journal_add_match.3 \
519         man/sd_journal_seek_head.3
520
521 MANPAGES_ALIAS = \
522         man/reboot.8 \
523         man/poweroff.8 \
524         man/init.1 \
525         man/systemd-modules-load.8 \
526         man/systemd-sysctl.8 \
527         man/systemd-journald.socket.8 \
528         man/systemd-journald.8 \
529         man/systemd-remount-fs.8 \
530         man/systemd-update-utmp-shutdown.service.8 \
531         man/systemd-update-utmp.8 \
532         man/systemd-initctl.socket.8 \
533         man/systemd-initctl.8 \
534         man/systemd-shutdownd.socket.8 \
535         man/systemd-shutdownd.8 \
536         man/systemd-hibernate.service.8 \
537         man/systemd-sleep.8 \
538         man/systemd-shutdown.8 \
539         man/systemd-poweroff.service.8 \
540         man/systemd-reboot.service.8 \
541         man/systemd-kexec.service.8 \
542         man/systemd-fsck.8 \
543         man/systemd-fsck-root.service.8 \
544         man/systemd-ask-password-console.path.8 \
545         man/systemd-ask-password-wall.service.8 \
546         man/systemd-ask-password-wall.path.8 \
547         man/systemd-tmpfiles-setup.service.8 \
548         man/systemd-tmpfiles-clean.service.8 \
549         man/systemd-tmpfiles-clean.timer.8 \
550         man/sd_id128_t.3 \
551         man/SD_ID128_MAKE.3 \
552         man/SD_ID128_FORMAT_STR.3 \
553         man/SD_ID128_FORMAT_VAL.3 \
554         man/sd_id128_equal.3 \
555         man/sd_id128_from_string.3 \
556         man/sd_id128_get_boot.3 \
557         man/sd_journal_printv.3 \
558         man/sd_journal_send.3 \
559         man/sd_journal_sendv.3 \
560         man/sd_journal_perror.3 \
561         man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
562         man/sd_journal_open_directory.3 \
563         man/sd_journal_close.3 \
564         man/sd_journal.3 \
565         man/SD_JOURNAL_RUNTIME_ONLY.3 \
566         man/SD_JOURNAL_SYSTEM_ONLY.3 \
567         man/SD_JOURNAL_LOCAL_ONLY.3 \
568         man/sd_journal_previous.3 \
569         man/sd_journal_next_skip.3 \
570         man/sd_journal_previous_skip.3 \
571         man/SD_JOURNAL_FOREACH.3 \
572         man/SD_JOURNAL_FOREACH_BACKWARDS.3 \
573         man/sd_journal_enumerate_data.3 \
574         man/sd_journal_restart_data.3 \
575         man/SD_JOURNAL_FOREACH_DATA.3 \
576         man/sd_journal_get_monotonic_usec.3 \
577         man/sd_journal_get_cutoff_monotonic_usec.3 \
578         man/sd_journal_process.3 \
579         man/sd_journal_wait.3 \
580         man/SD_JOURNAL_NOP.3 \
581         man/SD_JOURNAL_APPEND.3 \
582         man/SD_JOURNAL_INVALIDATE.3 \
583         man/sd_journal_add_disjunction.3 \
584         man/sd_journal_flush_matches.3 \
585         man/sd_journal_seek_tail.3 \
586         man/sd_journal_seek_monotonic_usec.3 \
587         man/sd_journal_seek_realtime_usec.3 \
588         man/sd_journal_seek_cursor.3
589
590 man/reboot.8: man/halt.8
591 man/poweroff.8: man/halt.8
592 man/init.1: man/systemd.1
593 man/systemd-modules-load.8: man/systemd-modules-load.service.8
594 man/systemd-sysctl.8: man/systemd-sysctl.service.8
595 man/systemd-journald.socket.8: man/systemd-journald.service.8
596 man/systemd-journald.8: man/systemd-journald.service.8
597 man/systemd-remount-fs.8: man/systemd-remount-fs.service.8
598 man/systemd-update-utmp-shutdown.service.8: man/systemd-update-utmp-runlevel.service.8
599 man/systemd-update-utmp.8: man/systemd-update-utmp-runlevel.service.8
600 man/systemd-initctl.socket.8: man/systemd-initctl.service.8
601 man/systemd-initctl.8: man/systemd-initctl.service.8
602 man/systemd-shutdownd.socket.8: man/systemd-shutdownd.service.8
603 man/systemd-shutdownd.8: man/systemd-shutdownd.service.8
604 man/systemd-hibernate.service.8: man/systemd-suspend.service.8
605 man/systemd-sleep.8: man/systemd-suspend.service.8
606 man/systemd-shutdown.8: man/systemd-halt.service.8
607 man/systemd-poweroff.service.8: man/systemd-halt.service.8
608 man/systemd-reboot.service.8: man/systemd-halt.service.8
609 man/systemd-kexec.service.8: man/systemd-halt.service.8
610 man/systemd-fsck.8: man/systemd-fsck@.service.8
611 man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
612 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
613 man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
614 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
615 man/systemd-tmpfiles-setup.service.8: man/systemd-tmpfiles.8
616 man/systemd-tmpfiles-clean.service.8: man/systemd-tmpfiles.8
617 man/systemd-tmpfiles-clean.timer.8: man/systemd-tmpfiles.8
618 man/sd_id128_t.3: man/sd-id128.3
619 man/SD_ID128_MAKE.3: man/sd-id128.3
620 man/SD_ID128_FORMAT_STR.3: man/sd-id128.3
621 man/SD_ID128_FORMAT_VAL.3: man/sd-id128.3
622 man/sd_id128_equal.3: man/sd-id128.3
623 man/sd_id128_from_string.3: man/sd_id128_to_string.3
624 man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
625 man/sd_journal_printv.3: man/sd_journal_print.3
626 man/sd_journal_send.3: man/sd_journal_print.3
627 man/sd_journal_sendv.3: man/sd_journal_print.3
628 man/sd_journal_perror.3: man/sd_journal_print.3
629 man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
630 man/sd_journal_open_directory.3: man/sd_journal_open.3
631 man/sd_journal_close.3: man/sd_journal_open.3
632 man/sd_journal.3: man/sd_journal_open.3
633 man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
634 man/SD_JOURNAL_SYSTEM_ONLY.3: man/sd_journal_open.3
635 man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
636 man/sd_journal_previous.3: man/sd_journal_next.3
637 man/sd_journal_next_skip.3: man/sd_journal_next.3
638 man/sd_journal_previous_skip.3: man/sd_journal_next.3
639 man/SD_JOURNAL_FOREACH.3: man/sd_journal_next.3
640 man/SD_JOURNAL_FOREACH_BACKWARDS.3: man/sd_journal_next.3
641 man/sd_journal_enumerate_data.3: man/sd_journal_get_data.3
642 man/sd_journal_restart_data.3: man/sd_journal_get_data.3
643 man/SD_JOURNAL_FOREACH_DATA.3: man/sd_journal_get_data.3
644 man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
645 man/sd_journal_get_cutoff_monotonic_usec.3: man/sd_journal_get_cutoff_realtime_usec.3
646 man/sd_journal_process.3: man/sd_journal_get_fd.3
647 man/sd_journal_wait.3: man/sd_journal_get_fd.3
648 man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
649 man/SD_JOURNAL_APPEND.3: man/sd_journal_get_fd.3
650 man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
651 man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3
652 man/sd_journal_flush_matches.3: man/sd_journal_add_match.3
653 man/sd_journal_seek_tail.3: man/sd_journal_seek_head.3
654 man/sd_journal_seek_monotonic_usec.3: man/sd_journal_seek_head.3
655 man/sd_journal_seek_realtime_usec.3: man/sd_journal_seek_head.3
656 man/sd_journal_seek_cursor.3: man/sd_journal_seek_head.3
657
658 XML_FILES = \
659         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
660
661 if ENABLE_MANPAGES
662 man_MANS = \
663         $(MANPAGES) \
664         $(MANPAGES_ALIAS)
665
666 noinst_DATA = \
667         ${XML_FILES:.xml=.html}
668
669 CLEANFILES += \
670         $(MANPAGES) \
671         $(MANPAGES_ALIAS) \
672         ${XML_FILES:.xml=.html}
673
674 if HAVE_PYTHON
675 noinst_DATA += \
676         man/index.html
677
678 CLEANFILES += \
679         man/index.html
680
681 man/index.html: make-man-index.py $(XML_FILES)
682         $(AM_V_at)$(MKDIR_P) $(dir $@)
683         $(AM_V_GEN)$(PYTHON) $^ > $@
684
685 EXTRA_DIST += \
686         man/index.html
687 endif
688
689 endif
690
691 EXTRA_DIST += \
692         $(XML_FILES) \
693         ${XML_FILES:.xml=.html} \
694         $(MANPAGES) \
695         $(MANPAGES_ALIAS) \
696         make-man-index.py
697
698 # ------------------------------------------------------------------------------
699 noinst_LTLIBRARIES += \
700         libsystemd-shared.la
701
702 libsystemd_shared_la_SOURCES = \
703         src/shared/linux/auto_dev-ioctl.h \
704         src/shared/linux/fanotify.h \
705         src/shared/linux/seccomp.h \
706         src/shared/linux/seccomp-bpf.h \
707         src/shared/missing.h \
708         src/shared/list.h \
709         src/shared/macro.h \
710         src/shared/def.h \
711         src/shared/util.c \
712         src/shared/util.h \
713         src/shared/virt.c \
714         src/shared/virt.h \
715         src/shared/path-util.c \
716         src/shared/path-util.h \
717         src/shared/hashmap.c \
718         src/shared/hashmap.h \
719         src/shared/set.c \
720         src/shared/set.h \
721         src/shared/strv.c \
722         src/shared/strv.h \
723         src/shared/conf-parser.c \
724         src/shared/conf-parser.h \
725         src/shared/log.c \
726         src/shared/log.h \
727         src/shared/ratelimit.h \
728         src/shared/ratelimit.c \
729         src/shared/exit-status.c \
730         src/shared/exit-status.h \
731         src/shared/utf8.c \
732         src/shared/utf8.h \
733         src/shared/pager.c \
734         src/shared/pager.h \
735         src/shared/ioprio.h \
736         src/shared/socket-util.c \
737         src/shared/socket-util.h \
738         src/shared/conf-files.c \
739         src/shared/conf-files.h \
740         src/shared/cgroup-util.c \
741         src/shared/cgroup-util.h \
742         src/shared/cgroup-show.c \
743         src/shared/cgroup-show.h \
744         src/shared/unit-name.c \
745         src/shared/unit-name.h \
746         src/shared/utmp-wtmp.c \
747         src/shared/utmp-wtmp.h \
748         src/shared/watchdog.c \
749         src/shared/watchdog.h \
750         src/shared/spawn-ask-password-agent.c \
751         src/shared/spawn-ask-password-agent.h \
752         src/shared/specifier.c \
753         src/shared/specifier.h \
754         src/shared/spawn-polkit-agent.c \
755         src/shared/spawn-polkit-agent.h \
756         src/shared/hwclock.c \
757         src/shared/hwclock.h
758
759 #-------------------------------------------------------------------------------
760 noinst_LTLIBRARIES += \
761         libsystemd-dbus.la
762
763 libsystemd_dbus_la_SOURCES = \
764         src/shared/dbus-common.c \
765         src/shared/dbus-common.h \
766         src/shared/dbus-loop.c \
767         src/shared/dbus-loop.h \
768         src/shared/polkit.c \
769         src/shared/polkit.h
770
771 libsystemd_dbus_la_CFLAGS = \
772         $(AM_CFLAGS) \
773         $(DBUS_CFLAGS)
774
775 libsystemd_dbus_la_LIBADD = \
776         $(DBUS_LIBS)
777
778 # ------------------------------------------------------------------------------
779 noinst_LTLIBRARIES += \
780         libsystemd-units.la
781
782 libsystemd_units_la_SOURCES = \
783         src/shared/install.c \
784         src/shared/install.h \
785         src/shared/path-lookup.c \
786         src/shared/path-lookup.h
787
788 libsystemd_units_la_CFLAGS = \
789         $(AM_CFLAGS) \
790         $(DBUS_CFLAGS)
791
792 # ------------------------------------------------------------------------------
793 noinst_LTLIBRARIES += \
794         libsystemd-label.la
795
796 libsystemd_label_la_SOURCES = \
797         src/shared/cgroup-label.c \
798         src/shared/socket-label.c \
799         src/shared/label.c \
800         src/shared/label.h \
801         src/shared/mkdir.c \
802         src/shared/mkdir.h \
803         src/shared/ask-password-api.c \
804         src/shared/ask-password-api.h \
805         src/shared/dev-setup.c \
806         src/shared/dev-setup.h
807
808 libsystemd_label_la_CFLAGS = \
809         $(AM_CFLAGS) \
810         $(SELINUX_CFLAGS)
811
812 libsystemd_label_la_LIBADD = \
813         $(SELINUX_LIBS)
814
815 # ------------------------------------------------------------------------------
816 noinst_LTLIBRARIES += \
817         libsystemd-logs.la
818
819 libsystemd_logs_la_SOURCES = \
820         src/shared/logs-show.c \
821         src/shared/logs-show.h
822
823 libsystemd_logs_la_CFLAGS = \
824         $(AM_CFLAGS)
825
826 libsystemd_logs_la_LIBADD = \
827         libsystemd-journal-internal.la \
828         libsystemd-id128-internal.la \
829         libsystemd-shared.la
830
831 # ------------------------------------------------------------------------------
832 noinst_LTLIBRARIES += \
833         libsystemd-capability.la
834
835 libsystemd_capability_la_SOURCES = \
836         src/shared/capability.c \
837         src/shared/capability.h
838
839 libsystemd_capability_la_CFLAGS = \
840         $(AM_CFLAGS) \
841         $(CAP_CFLAGS)
842
843 libsystemd_capability_la_LIBADD = \
844         $(CAP_LIBS)
845
846 # ------------------------------------------------------------------------------
847 noinst_LTLIBRARIES += \
848         libsystemd-audit.la
849
850 libsystemd_audit_la_SOURCES = \
851         src/shared/audit.c \
852         src/shared/audit.h
853
854 libsystemd_audit_la_LIBADD = \
855         libsystemd-capability.la
856
857 # ------------------------------------------------------------------------------
858 if HAVE_ACL
859 noinst_LTLIBRARIES += \
860         libsystemd-acl.la
861
862 libsystemd_acl_la_SOURCES = \
863         src/shared/acl-util.c \
864         src/shared/acl-util.h
865
866 libsystemd_acl_la_CFLAGS = \
867         $(AM_CFLAGS) \
868         $(ACL_CFLAGS)
869
870 libsystemd_acl_la_LIBADD = \
871         $(ACL_LIBS)
872 endif
873
874 # ------------------------------------------------------------------------------
875 noinst_LTLIBRARIES += \
876         libsystemd-core.la
877
878 libsystemd_core_la_SOURCES = \
879         src/core/unit.c \
880         src/core/unit.h \
881         src/core/job.c \
882         src/core/job.h \
883         src/core/manager.c \
884         src/core/manager.h \
885         src/core/transaction.c \
886         src/core/transaction.h \
887         src/core/load-fragment.c \
888         src/core/load-fragment.h \
889         src/core/service.c \
890         src/core/service.h \
891         src/core/automount.c \
892         src/core/automount.h \
893         src/core/mount.c \
894         src/core/mount.h \
895         src/core/swap.c \
896         src/core/swap.h \
897         src/core/device.c \
898         src/core/device.h \
899         src/core/target.c \
900         src/core/target.h \
901         src/core/snapshot.c \
902         src/core/snapshot.h \
903         src/core/socket.c \
904         src/core/socket.h \
905         src/core/timer.c \
906         src/core/timer.h \
907         src/core/path.c \
908         src/core/path.h \
909         src/core/load-dropin.c \
910         src/core/load-dropin.h \
911         src/core/execute.c \
912         src/core/execute.h \
913         src/core/kill.c \
914         src/core/kill.h \
915         src/core/dbus.c \
916         src/core/dbus.h \
917         src/core/dbus-manager.c \
918         src/core/dbus-manager.h \
919         src/core/dbus-unit.c \
920         src/core/dbus-unit.h \
921         src/core/dbus-job.c \
922         src/core/dbus-job.h \
923         src/core/dbus-service.c \
924         src/core/dbus-service.h \
925         src/core/dbus-socket.c \
926         src/core/dbus-socket.h \
927         src/core/dbus-timer.c \
928         src/core/dbus-timer.h \
929         src/core/dbus-target.c \
930         src/core/dbus-target.h \
931         src/core/dbus-mount.c \
932         src/core/dbus-mount.h \
933         src/core/dbus-automount.c \
934         src/core/dbus-automount.h \
935         src/core/dbus-swap.c \
936         src/core/dbus-swap.h \
937         src/core/dbus-snapshot.c \
938         src/core/dbus-snapshot.h \
939         src/core/dbus-device.c \
940         src/core/dbus-device.h \
941         src/core/dbus-execute.c \
942         src/core/dbus-execute.h \
943         src/core/dbus-kill.c \
944         src/core/dbus-kill.h \
945         src/core/dbus-path.c \
946         src/core/dbus-path.h \
947         src/core/cgroup.c \
948         src/core/cgroup.h \
949         src/core/selinux-setup.c \
950         src/core/selinux-setup.h \
951         src/core/ima-setup.c \
952         src/core/ima-setup.h \
953         src/core/kmod-setup.c \
954         src/core/kmod-setup.h \
955         src/core/locale-setup.h \
956         src/core/locale-setup.c \
957         src/core/hostname-setup.c \
958         src/core/hostname-setup.h \
959         src/core/machine-id-setup.c \
960         src/core/machine-id-setup.h \
961         src/core/mount-setup.c \
962         src/core/mount-setup.h \
963         src/core/loopback-setup.h \
964         src/core/loopback-setup.c \
965         src/core/fdset.c \
966         src/core/fdset.h \
967         src/core/condition.c \
968         src/core/condition.h \
969         src/core/namespace.c \
970         src/core/namespace.h \
971         src/core/tcpwrap.c \
972         src/core/tcpwrap.h \
973         src/core/cgroup-attr.c \
974         src/core/cgroup-attr.h \
975         src/core/securebits.h \
976         src/core/initreq.h \
977         src/core/special.h \
978         src/core/bus-errors.h \
979         src/core/build.h \
980         src/core/sysfs-show.h \
981         src/core/switch-root.h \
982         src/core/switch-root.c \
983         src/core/killall.h \
984         src/core/killall.c \
985         src/core/syscall-list.c \
986         src/core/syscall-list.h
987
988 nodist_libsystemd_core_la_SOURCES = \
989         src/core/load-fragment-gperf.c \
990         src/core/load-fragment-gperf-nulstr.c \
991         src/core/syscall-from-name.h \
992         src/core/syscall-to-name.h
993
994 libsystemd_core_la_CFLAGS = \
995         $(AM_CFLAGS) \
996         $(DBUS_CFLAGS) \
997         $(LIBWRAP_CFLAGS) \
998         $(PAM_CFLAGS) \
999         $(AUDIT_CFLAGS) \
1000         $(KMOD_CFLAGS)
1001
1002 libsystemd_core_la_LIBADD = \
1003         libsystemd-capability.la \
1004         libsystemd-units.la \
1005         libsystemd-label.la \
1006         libsystemd-shared.la \
1007         libsystemd-dbus.la \
1008         libsystemd-id128-internal.la \
1009         libudev.la \
1010         $(LIBWRAP_LIBS) \
1011         $(PAM_LIBS) \
1012         $(AUDIT_LIBS) \
1013         $(CAP_LIBS) \
1014         $(KMOD_LIBS)
1015
1016 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1017         $(AM_V_at)$(MKDIR_P) $(dir $@)
1018         $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
1019
1020 EXTRA_DIST += \
1021         src/core/load-fragment-gperf.gperf.m4
1022
1023 CLEANFILES += \
1024         src/core/load-fragment-gperf.gperf \
1025         src/core/load-fragment-gperf.c \
1026         src/core/load-fragment-gperf-nulstr.c \
1027         src/core/syscall-list.txt \
1028         src/core/syscall-from-name.gperf
1029
1030 BUILT_SOURCES += \
1031         src/core/syscall-from-name.h \
1032         src/core/syscall-to-name.h
1033
1034 src/core/syscall-list.txt: Makefile
1035         $(AM_V_at)$(MKDIR_P) $(dir $@)
1036         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+\(?.*[0-9]+.*\)?/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
1037
1038 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
1039         $(AM_V_at)$(MKDIR_P) $(dir $@)
1040         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1041
1042 src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
1043         $(AM_V_at)$(MKDIR_P) $(dir $@)
1044         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1045
1046 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
1047         $(AM_V_at)$(MKDIR_P) $(dir $@)
1048         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[__NR_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1049
1050 # ------------------------------------------------------------------------------
1051 systemd_SOURCES = \
1052         src/core/main.c
1053
1054 systemd_CFLAGS = \
1055         $(AM_CFLAGS) \
1056         $(DBUS_CFLAGS)
1057
1058 systemd_LDADD = \
1059         libsystemd-core.la \
1060         libsystemd-daemon.la \
1061         libsystemd-id128-internal.la \
1062         libsystemd-dbus.la
1063
1064 dist_pkgsysconf_DATA += \
1065         src/core/system.conf \
1066         src/core/user.conf
1067
1068 dist_dbuspolicy_DATA += \
1069         src/core/org.freedesktop.systemd1.conf
1070
1071 dist_dbussystemservice_DATA += \
1072         src/core/org.freedesktop.systemd1.service
1073
1074 dbusinterface_DATA += \
1075         org.freedesktop.systemd1.Manager.xml \
1076         org.freedesktop.systemd1.Job.xml \
1077         org.freedesktop.systemd1.Unit.xml \
1078         org.freedesktop.systemd1.Service.xml \
1079         org.freedesktop.systemd1.Socket.xml \
1080         org.freedesktop.systemd1.Timer.xml \
1081         org.freedesktop.systemd1.Target.xml \
1082         org.freedesktop.systemd1.Device.xml \
1083         org.freedesktop.systemd1.Mount.xml \
1084         org.freedesktop.systemd1.Automount.xml \
1085         org.freedesktop.systemd1.Snapshot.xml \
1086         org.freedesktop.systemd1.Swap.xml \
1087         org.freedesktop.systemd1.Path.xml
1088
1089 polkitpolicy_in_in_files = \
1090         src/core/org.freedesktop.systemd1.policy.in.in
1091
1092 org.freedesktop.systemd1.%.xml: systemd
1093         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1094                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1095                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1096
1097 pkgconfigdata_DATA = \
1098         src/core/systemd.pc
1099
1100 nodist_rpmmacros_DATA = \
1101         src/core/macros.systemd
1102
1103 EXTRA_DIST += \
1104         src/core/systemd.pc.in \
1105         src/core/macros.systemd.in
1106
1107 CLEANFILES += \
1108         src/core/macros.systemd
1109
1110 # ------------------------------------------------------------------------------
1111 noinst_PROGRAMS += \
1112         test-engine \
1113         test-job-type \
1114         test-ns \
1115         test-loopback \
1116         test-hostname \
1117         test-daemon \
1118         test-cgroup \
1119         test-env-replace \
1120         test-strv \
1121         test-install \
1122         test-watchdog \
1123         test-unit-name \
1124         test-log \
1125         test-unit-file
1126
1127 TESTS += \
1128         test-job-type \
1129         test-env-replace \
1130         test-strv \
1131         test-unit-name \
1132         test-unit-file
1133
1134 test_engine_SOURCES = \
1135         src/test/test-engine.c
1136
1137 test_engine_CFLAGS = \
1138         $(AM_CFLAGS) \
1139         $(DBUS_CFLAGS)
1140
1141 test_engine_LDADD = \
1142         libsystemd-core.la \
1143         libsystemd-daemon.la \
1144         libsystemd-dbus.la
1145
1146 test_job_type_SOURCES = \
1147         src/test/test-job-type.c
1148
1149 test_job_type_CFLAGS = \
1150         $(AM_CFLAGS) \
1151         $(DBUS_CFLAGS)
1152
1153 test_job_type_LDADD = \
1154         libsystemd-core.la \
1155         libsystemd-daemon.la
1156
1157 test_ns_SOURCES = \
1158         src/test/test-ns.c
1159
1160 test_ns_LDADD = \
1161         libsystemd-core.la
1162
1163 test_loopback_SOURCES = \
1164         src/test/test-loopback.c
1165
1166 test_loopback_LDADD = \
1167         libsystemd-shared.la \
1168         libsystemd-core.la
1169
1170 test_hostname_SOURCES = \
1171         src/test/test-hostname.c
1172
1173 test_hostname_LDADD = \
1174         libsystemd-core.la
1175
1176 test_unit_name_SOURCES = \
1177         src/test/test-unit-name.c
1178
1179 test_unit_name_LDADD = \
1180         libsystemd-core.la
1181
1182 test_unit_file_SOURCES = \
1183         src/test/test-unit-file.c
1184
1185 test_unit_file_LDADD = \
1186         libsystemd-core.la
1187
1188 test_log_SOURCES = \
1189         src/test/test-log.c
1190
1191 test_log_LDADD = \
1192         libsystemd-core.la
1193
1194 test_daemon_SOURCES = \
1195         src/test/test-daemon.c
1196
1197 test_daemon_LDADD = \
1198         libsystemd-shared.la \
1199         libsystemd-daemon.la
1200
1201 test_cgroup_SOURCES = \
1202         src/test/test-cgroup.c
1203
1204 test_cgroup_LDADD = \
1205         libsystemd-label.la \
1206         libsystemd-shared.la
1207
1208 test_env_replace_SOURCES = \
1209         src/test/test-env-replace.c
1210
1211 test_env_replace_LDADD = \
1212         libsystemd-shared.la
1213
1214 test_strv_SOURCES = \
1215         src/test/test-strv.c
1216
1217 test_strv_LDADD = \
1218         libsystemd-shared.la
1219
1220 test_install_SOURCES = \
1221         src/test/test-install.c
1222
1223 test_install_CFLAGS = \
1224         $(AM_CFLAGS) \
1225         $(DBUS_CFLAGS)
1226
1227 test_install_LDADD = \
1228         libsystemd-units.la \
1229         libsystemd-label.la \
1230         libsystemd-shared.la
1231
1232 test_watchdog_SOURCES = \
1233         src/test/test-watchdog.c
1234
1235 test_watchdog_LDADD = \
1236         libsystemd-shared.la
1237
1238 # ------------------------------------------------------------------------------
1239 systemd_initctl_SOURCES = \
1240         src/initctl/initctl.c
1241
1242 systemd_initctl_CFLAGS = \
1243         $(AM_CFLAGS) \
1244         $(DBUS_CFLAGS)
1245
1246 systemd_initctl_LDADD = \
1247         libsystemd-shared.la \
1248         libsystemd-daemon.la \
1249         libsystemd-dbus.la
1250
1251 # ------------------------------------------------------------------------------
1252 systemd_update_utmp_SOURCES = \
1253         src/update-utmp/update-utmp.c
1254
1255 systemd_update_utmp_CFLAGS = \
1256         $(AM_CFLAGS) \
1257         $(DBUS_CFLAGS) \
1258         $(AUDIT_CFLAGS)
1259
1260 systemd_update_utmp_LDADD = \
1261         libsystemd-shared.la \
1262         libsystemd-dbus.la \
1263         $(AUDIT_LIBS)
1264
1265 # ------------------------------------------------------------------------------
1266 systemd_shutdownd_SOURCES = \
1267         src/shutdownd/shutdownd.c
1268
1269 systemd_shutdownd_LDADD = \
1270         libsystemd-label.la \
1271         libsystemd-shared.la \
1272         libsystemd-daemon.la
1273
1274 pkginclude_HEADERS += \
1275         src/systemd/sd-shutdown.h
1276
1277 # ------------------------------------------------------------------------------
1278 systemd_shutdown_SOURCES = \
1279         src/core/umount.c \
1280         src/core/umount.h \
1281         src/core/shutdown.c \
1282         src/core/mount-setup.c \
1283         src/core/mount-setup.h \
1284         src/core/killall.h \
1285         src/core/killall.c
1286
1287 systemd_shutdown_LDADD = \
1288         libsystemd-label.la \
1289         libsystemd-shared.la \
1290         libudev.la
1291
1292 # ------------------------------------------------------------------------------
1293 systemd_modules_load_SOURCES = \
1294         src/modules-load/modules-load.c
1295
1296 systemd_modules_load_CFLAGS = \
1297         $(AM_CFLAGS) \
1298         $(KMOD_CFLAGS)
1299
1300 systemd_modules_load_LDADD = \
1301         libsystemd-shared.la \
1302         $(KMOD_LIBS)
1303
1304 # ------------------------------------------------------------------------------
1305 systemd_tmpfiles_SOURCES = \
1306         src/tmpfiles/tmpfiles.c
1307
1308 systemd_tmpfiles_LDADD = \
1309         libsystemd-label.la \
1310         libsystemd-shared.la \
1311         libsystemd-capability.la
1312
1313 # ------------------------------------------------------------------------------
1314 systemd_machine_id_setup_SOURCES = \
1315         src/machine-id-setup/machine-id-setup-main.c \
1316         src/core/machine-id-setup.c \
1317         src/core/machine-id-setup.h
1318
1319 systemd_machine_id_setup_LDADD = \
1320         libsystemd-label.la \
1321         libsystemd-shared.la \
1322         libsystemd-id128-internal.la
1323
1324 # ------------------------------------------------------------------------------
1325 systemd_sysctl_SOURCES = \
1326         src/sysctl/sysctl.c
1327
1328 systemd_sysctl_LDADD = \
1329         libsystemd-shared.la
1330
1331 # ------------------------------------------------------------------------------
1332 systemd_sleep_SOURCES = \
1333         src/sleep/sleep.c
1334
1335 systemd_sleep_LDADD = \
1336         libsystemd-shared.la
1337
1338 # ------------------------------------------------------------------------------
1339 systemd_fsck_SOURCES = \
1340         src/fsck/fsck.c
1341
1342 systemd_fsck_CFLAGS = \
1343         $(AM_CFLAGS) \
1344         $(DBUS_CFLAGS)
1345
1346 systemd_fsck_LDADD = \
1347         libsystemd-shared.la \
1348         libsystemd-dbus.la \
1349         libudev.la
1350
1351 # ------------------------------------------------------------------------------
1352 systemd_timestamp_SOURCES = \
1353         src/timestamp/timestamp.c
1354
1355 systemd_timestamp_LDADD = \
1356         libsystemd-shared.la
1357
1358 # ------------------------------------------------------------------------------
1359 systemd_ac_power_SOURCES = \
1360         src/ac-power/ac-power.c
1361
1362 systemd_ac_power_LDADD = \
1363         libsystemd-shared.la \
1364         libudev.la
1365
1366 # ------------------------------------------------------------------------------
1367 systemd_detect_virt_SOURCES = \
1368         src/detect-virt/detect-virt.c
1369
1370 systemd_detect_virt_LDADD = \
1371         libsystemd-shared.la
1372
1373 # ------------------------------------------------------------------------------
1374 systemd_delta_SOURCES = \
1375         src/delta/delta.c
1376
1377 systemd_delta_LDADD = \
1378         libsystemd-shared.la
1379
1380 # ------------------------------------------------------------------------------
1381 systemd_getty_generator_SOURCES = \
1382         src/getty-generator/getty-generator.c
1383
1384 systemd_getty_generator_LDADD = \
1385         libsystemd-label.la \
1386         libsystemd-shared.la
1387
1388 # ------------------------------------------------------------------------------
1389 systemd_fstab_generator_SOURCES = \
1390         src/fstab-generator/fstab-generator.c \
1391         src/core/mount-setup.c
1392
1393 systemd_fstab_generator_LDADD = \
1394         libsystemd-label.la \
1395         libsystemd-shared.la
1396
1397 # ------------------------------------------------------------------------------
1398 systemd_system_update_generator_SOURCES = \
1399         src/system-update-generator/system-update-generator.c
1400
1401 systemd_system_update_generator_LDADD = \
1402         libsystemd-label.la \
1403         libsystemd-shared.la
1404
1405 # ------------------------------------------------------------------------------
1406 systemd_rc_local_generator_SOURCES = \
1407         src/rc-local-generator/rc-local-generator.c
1408
1409 systemd_rc_local_generator_LDADD = \
1410         libsystemd-label.la \
1411         libsystemd-shared.la
1412
1413 # ------------------------------------------------------------------------------
1414 systemd_remount_fs_SOURCES = \
1415         src/remount-fs/remount-fs.c \
1416         src/core/mount-setup.c \
1417         src/core/mount-setup.h
1418
1419 systemd_remount_fs_LDADD = \
1420         libsystemd-label.la \
1421         libsystemd-shared.la
1422
1423 # ------------------------------------------------------------------------------
1424 systemd_cgroups_agent_SOURCES = \
1425         src/cgroups-agent/cgroups-agent.c
1426
1427 systemd_cgroups_agent_CFLAGS = \
1428         $(AM_CFLAGS) \
1429         $(DBUS_CFLAGS)
1430
1431 systemd_cgroups_agent_LDADD = \
1432         libsystemd-shared.la \
1433         libsystemd-dbus.la
1434
1435 # ------------------------------------------------------------------------------
1436 systemctl_SOURCES = \
1437         src/systemctl/systemctl.c
1438
1439 systemctl_CFLAGS = \
1440         $(AM_CFLAGS) \
1441         $(DBUS_CFLAGS)
1442
1443 systemctl_LDADD = \
1444         libsystemd-units.la \
1445         libsystemd-label.la \
1446         libsystemd-shared.la \
1447         libsystemd-daemon.la \
1448         libsystemd-dbus.la \
1449         libsystemd-logs.la
1450
1451 # ------------------------------------------------------------------------------
1452 systemd_notify_SOURCES = \
1453         src/notify/notify.c \
1454         src/readahead/sd-readahead.c
1455
1456 systemd_notify_LDADD = \
1457         libsystemd-shared.la \
1458         libsystemd-daemon.la
1459
1460 # ------------------------------------------------------------------------------
1461 systemd_ask_password_SOURCES = \
1462         src/ask-password/ask-password.c
1463
1464 systemd_ask_password_LDADD = \
1465         libsystemd-label.la \
1466         libsystemd-shared.la
1467
1468 # ------------------------------------------------------------------------------
1469 systemd_reply_password_SOURCES = \
1470         src/reply-password/reply-password.c
1471
1472 systemd_reply_password_LDADD = \
1473         libsystemd-shared.la
1474
1475 # ------------------------------------------------------------------------------
1476 systemd_cgls_SOURCES = \
1477         src/cgls/cgls.c
1478
1479 systemd_cgls_LDADD = \
1480         libsystemd-shared.la
1481
1482 # ------------------------------------------------------------------------------
1483 systemd_cgtop_SOURCES = \
1484         src/cgtop/cgtop.c
1485
1486 systemd_cgtop_LDADD = \
1487         libsystemd-shared.la
1488
1489 # ------------------------------------------------------------------------------
1490 systemd_nspawn_SOURCES = \
1491         src/nspawn/nspawn.c \
1492         src/core/mount-setup.c \
1493         src/core/mount-setup.h \
1494         src/core/loopback-setup.c \
1495         src/core/loopback-setup.h
1496
1497 systemd_nspawn_LDADD = \
1498         libsystemd-label.la \
1499         libsystemd-capability.la \
1500         libsystemd-shared.la \
1501         libsystemd-daemon.la \
1502         libsystemd-id128-internal.la
1503
1504 # ------------------------------------------------------------------------------
1505 systemd_stdio_bridge_SOURCES = \
1506         src/stdio-bridge/stdio-bridge.c
1507
1508 systemd_stdio_bridge_LDADD = \
1509         libsystemd-shared.la
1510
1511 # ------------------------------------------------------------------------------
1512 systemd_tty_ask_password_agent_SOURCES = \
1513         src/tty-ask-password-agent/tty-ask-password-agent.c
1514
1515 systemd_tty_ask_password_agent_LDADD = \
1516         libsystemd-label.la \
1517         libsystemd-shared.la
1518
1519 # ------------------------------------------------------------------------------
1520 libsystemd_daemon_la_SOURCES = \
1521         src/libsystemd-daemon/sd-daemon.c
1522
1523 libsystemd_daemon_la_CFLAGS = \
1524         $(AM_CFLAGS) \
1525         -fvisibility=hidden \
1526         -DSD_EXPORT_SYMBOLS
1527
1528 libsystemd_daemon_la_LDFLAGS = \
1529         $(AM_LDFLAGS) \
1530         -shared \
1531         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1532         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1533
1534 pkginclude_HEADERS += \
1535         src/systemd/sd-daemon.h
1536
1537 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1538 libsystemd-daemon-install-hook:
1539         if test "$(libdir)" != "$(rootlibdir)"; then \
1540                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1541                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1542                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1543                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1544                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1545         fi
1546
1547 INSTALL_EXEC_HOOKS += \
1548         libsystemd-daemon-install-hook
1549
1550 libsystemd-daemon-uninstall-hook:
1551         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1552
1553 UNINSTALL_EXEC_HOOKS += \
1554         libsystemd-daemon-uninstall-hook
1555
1556 lib_LTLIBRARIES += \
1557         libsystemd-daemon.la
1558
1559 pkgconfiglib_DATA += \
1560         src/libsystemd-daemon/libsystemd-daemon.pc
1561
1562 MANPAGES += \
1563         man/sd-daemon.3 \
1564         man/sd_notify.3 \
1565         man/sd_listen_fds.3 \
1566         man/sd_is_fifo.3 \
1567         man/sd_booted.3
1568
1569 MANPAGES_ALIAS += \
1570         man/sd_is_socket.3 \
1571         man/sd_is_socket_unix.3 \
1572         man/sd_is_socket_inet.3 \
1573         man/sd_is_mq.3 \
1574         man/sd_notifyf.3 \
1575         man/SD_LISTEN_FDS_START.3 \
1576         man/SD_EMERG.3 \
1577         man/SD_ALERT.3 \
1578         man/SD_CRIT.3 \
1579         man/SD_ERR.3 \
1580         man/SD_WARNING.3 \
1581         man/SD_NOTICE.3 \
1582         man/SD_INFO.3 \
1583         man/SD_DEBUG.3
1584
1585 man/sd_is_socket.3: man/sd_is_fifo.3
1586 man/sd_is_socket_unix.3: man/sd_is_fifo.3
1587 man/sd_is_socket_inet.3: man/sd_is_fifo.3
1588 man/sd_is_mq.3: man/sd_is_fifo.3
1589 man/sd_notifyf.3: man/sd_notify.3
1590 man/SD_LISTEN_FDS_START.3: man/sd_listen_fds.3
1591 man/SD_EMERG.3: man/sd-daemon.3
1592 man/SD_ALERT.3: man/sd-daemon.3
1593 man/SD_CRIT.3: man/sd-daemon.3
1594 man/SD_ERR.3: man/sd-daemon.3
1595 man/SD_WARNING.3: man/sd-daemon.3
1596 man/SD_NOTICE.3: man/sd-daemon.3
1597 man/SD_INFO.3: man/sd-daemon.3
1598 man/SD_DEBUG.3: man/sd-daemon.3
1599
1600 EXTRA_DIST += \
1601         src/libsystemd-daemon/libsystemd-daemon.pc.in \
1602         src/libsystemd-daemon/libsystemd-daemon.sym
1603
1604 # ------------------------------------------------------------------------------
1605 if ENABLE_GTK_DOC
1606 SUBDIRS += \
1607         docs/libudev
1608 endif
1609
1610 include_HEADERS += \
1611         src/libudev/libudev.h
1612
1613 lib_LTLIBRARIES += \
1614         libudev.la
1615
1616 libudev_la_SOURCES =\
1617         src/libudev/libudev-private.h \
1618         src/libudev/libudev.c \
1619         src/libudev/libudev-list.c \
1620         src/libudev/libudev-util.c \
1621         src/libudev/libudev-device.c \
1622         src/libudev/libudev-enumerate.c \
1623         src/libudev/libudev-monitor.c \
1624         src/libudev/libudev-queue.c
1625
1626 libudev_la_CFLAGS = \
1627         $(AM_CFLAGS) \
1628         -fvisibility=hidden
1629
1630 libudev_la_LDFLAGS = \
1631         $(AM_LDFLAGS) \
1632         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
1633         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
1634
1635 libudev_la_LIBADD = \
1636         libsystemd-shared.la
1637
1638 pkgconfiglib_DATA += \
1639         src/libudev/libudev.pc
1640
1641 EXTRA_DIST += \
1642         src/libudev/libudev.pc.in \
1643         src/libudev/libudev.sym
1644
1645 CLEANFILES += \
1646         src/libudev/libudev.pc
1647
1648 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1649 libudev-install-move-hook:
1650         if test "$(libdir)" != "$(rootlibdir)"; then \
1651                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
1652                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
1653                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1654                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
1655                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlibdir); \
1656         fi
1657
1658 libudev-uninstall-move-hook:
1659         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
1660
1661 INSTALL_EXEC_HOOKS += libudev-install-move-hook
1662 UNINSTALL_EXEC_HOOKS += libudev-uninstall-move-hook
1663
1664 # ------------------------------------------------------------------------------
1665 noinst_LTLIBRARIES += \
1666         libudev-private.la
1667
1668 libudev_private_la_SOURCES =\
1669         $(libudev_la_SOURCES) \
1670         src/libudev/libudev-device-private.c \
1671         src/libudev/libudev-queue-private.c
1672
1673 libudev_private_la_CFLAGS = \
1674         $(AM_CFLAGS) \
1675         -fvisibility=default
1676
1677 libudev_private_la_LIBADD = \
1678         libsystemd-shared.la
1679
1680 # ------------------------------------------------------------------------------
1681 MANPAGES += \
1682         man/udev.7 \
1683         man/udevadm.8 \
1684         man/systemd-udevd.service.8
1685
1686 MANPAGES_ALIAS += \
1687         man/systemd-udevd.8 \
1688         man/systemd-udevd-control.socket.8 \
1689         man/systemd-udevd-kernel.socket.8
1690
1691 man/systemd-udevd.8: man/systemd-udevd.service.8
1692 man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
1693 man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
1694
1695 udev-confdirs:
1696         -$(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/rules.d
1697
1698 INSTALL_DATA_HOOKS += udev-confdirs
1699
1700 dist_udevrules_DATA += \
1701         rules/99-systemd.rules \
1702         rules/42-usb-hid-pm.rules \
1703         rules/50-udev-default.rules \
1704         rules/60-persistent-storage-tape.rules \
1705         rules/60-persistent-serial.rules \
1706         rules/60-persistent-input.rules \
1707         rules/60-persistent-alsa.rules \
1708         rules/60-persistent-storage.rules \
1709         rules/75-net-description.rules \
1710         rules/75-tty-description.rules \
1711         rules/78-sound-card.rules \
1712         rules/80-drivers.rules \
1713         rules/95-udev-late.rules
1714
1715 udevconfdir = $(sysconfdir)/udev
1716 dist_udevconf_DATA = \
1717         src/udev/udev.conf
1718
1719 sharepkgconfigdir = $(datadir)/pkgconfig
1720 sharepkgconfig_DATA = \
1721         src/udev/udev.pc
1722
1723 EXTRA_DIST += \
1724         rules/99-systemd.rules.in \
1725         src/udev/udev.pc.in
1726
1727 CLEANFILES += \
1728         rules/99-systemd.rules \
1729         src/udev/udev.pc
1730
1731 EXTRA_DIST += \
1732         units/systemd-udevd.service.in \
1733         units/systemd-udev-trigger.service.in \
1734         units/systemd-udev-settle.service.in
1735
1736 CLEANFILES += \
1737         units/systemd-udevd.service \
1738         units/systemd-udev-trigger.service \
1739         units/systemd-udev-settle.service
1740
1741 systemd-install-hook:
1742         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sockets.target.wants
1743         ln -sf ../systemd-udevd-control.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-control.socket
1744         ln -sf ../systemd-udevd-kernel.socket $(DESTDIR)$(systemunitdir)/sockets.target.wants/systemd-udevd-kernel.socket
1745         $(MKDIR_P) $(DESTDIR)$(systemunitdir)/sysinit.target.wants
1746         ln -sf ../systemd-udevd.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udevd.service
1747         ln -sf ../systemd-udev-trigger.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
1748
1749 INSTALL_DATA_HOOKS += systemd-install-hook
1750
1751 bin_PROGRAMS += \
1752         udevadm
1753
1754 rootlibexec_PROGRAMS += \
1755         systemd-udevd
1756
1757 noinst_LTLIBRARIES += \
1758         libudev-core.la
1759
1760 libudev_core_la_SOURCES = \
1761         src/udev/udev.h \
1762         src/udev/udev-event.c \
1763         src/udev/udev-watch.c \
1764         src/udev/udev-node.c \
1765         src/udev/udev-rules.c \
1766         src/udev/udev-ctrl.c \
1767         src/udev/udev-builtin.c \
1768         src/udev/udev-builtin-blkid.c \
1769         src/udev/udev-builtin-firmware.c \
1770         src/udev/udev-builtin-hwdb.c \
1771         src/udev/udev-builtin-input_id.c \
1772         src/udev/udev-builtin-kmod.c \
1773         src/udev/udev-builtin-path_id.c \
1774         src/udev/udev-builtin-usb_id.c \
1775         src/libsystemd-daemon/sd-daemon.c
1776
1777 libudev_core_la_CFLAGS = \
1778         $(AM_CFLAGS) \
1779         $(BLKID_CFLAGS) \
1780         $(KMOD_CFLAGS)
1781
1782 libudev_core_la_LIBADD = \
1783         libudev-private.la \
1784         libsystemd-label.la \
1785         libsystemd-shared.la \
1786         $(BLKID_LIBS) \
1787         $(KMOD_LIBS)
1788
1789 libudev_core_la_CPPFLAGS = \
1790         $(AM_CPPFLAGS) \
1791         -DFIRMWARE_PATH="$(FIRMWARE_PATH)" \
1792         -DUSB_DATABASE=\"$(USB_DATABASE)\" -DPCI_DATABASE=\"$(PCI_DATABASE)\"
1793
1794 if HAVE_ACL
1795 libudev_core_la_SOURCES += \
1796         src/udev/udev-builtin-uaccess.c \
1797         src/login/logind-acl.c \
1798         src/login/sd-login.c
1799
1800 libudev_core_la_LIBADD += \
1801         libsystemd-acl.la
1802 endif
1803
1804 systemd_udevd_SOURCES = \
1805         src/udev/udevd.c
1806
1807 systemd_udevd_LDADD = \
1808         libudev-core.la
1809
1810 udevadm_SOURCES = \
1811         src/udev/udevadm.c \
1812         src/udev/udevadm-info.c \
1813         src/udev/udevadm-control.c \
1814         src/udev/udevadm-monitor.c \
1815         src/udev/udevadm-settle.c \
1816         src/udev/udevadm-trigger.c \
1817         src/udev/udevadm-test.c \
1818         src/udev/udevadm-test-builtin.c
1819
1820 udevadm_LDADD = \
1821         libudev-core.la \
1822         libsystemd-shared.la
1823
1824 # ------------------------------------------------------------------------------
1825 TESTS += \
1826         test/udev-test.pl \
1827         test/rules-test.sh
1828
1829 noinst_PROGRAMS += \
1830         test-libudev \
1831         test-udev
1832
1833 test_libudev_SOURCES = \
1834         src/test/test-libudev.c
1835
1836 test_libudev_LDADD = \
1837         libsystemd-label.la \
1838         libsystemd-shared.la \
1839         libudev.la
1840
1841 test_udev_SOURCES = \
1842         src/test/test-udev.c
1843
1844 test_udev_LDADD = \
1845         libudev-core.la \
1846         libsystemd-shared.la \
1847         $(BLKID_LIBS) \
1848         $(KMOD_LIBS) \
1849         $(SELINUX_LIBS)
1850
1851 if HAVE_ACL
1852 test_udev_LDADD += \
1853         libsystemd-acl.la
1854 endif
1855
1856 check_DATA += \
1857         test/sys
1858
1859 # packed sysfs test tree
1860 test/sys:
1861         $(AM_V_at)$(MKDIR_P) $(dir $@)
1862         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
1863
1864 test-sys-distclean:
1865         -rm -rf test/sys
1866 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
1867
1868 EXTRA_DIST += \
1869         test/sys.tar.xz \
1870         test/udev-test.pl \
1871         test/rules-test.sh \
1872         test/rule-syntax-check.py
1873
1874 # ------------------------------------------------------------------------------
1875 ata_id_SOURCES = \
1876         src/udev/ata_id/ata_id.c
1877
1878 ata_id_LDADD = \
1879         libudev-private.la \
1880         libsystemd-shared.la
1881
1882 udevlibexec_PROGRAMS += \
1883         ata_id
1884
1885 # ------------------------------------------------------------------------------
1886 cdrom_id_SOURCES = \
1887         src/udev/cdrom_id/cdrom_id.c
1888
1889 cdrom_id_LDADD = \
1890         libudev.la \
1891         libsystemd-shared.la
1892
1893 udevlibexec_PROGRAMS += \
1894         cdrom_id
1895
1896 dist_udevrules_DATA += \
1897         rules/60-cdrom_id.rules
1898
1899 # ------------------------------------------------------------------------------
1900 collect_SOURCES = \
1901         src/udev/collect/collect.c
1902
1903 collect_LDADD = \
1904         libudev-private.la
1905
1906 udevlibexec_PROGRAMS += \
1907         collect
1908
1909 # ------------------------------------------------------------------------------
1910 scsi_id_SOURCES =\
1911         src/udev/scsi_id/scsi_id.c \
1912         src/udev/scsi_id/scsi_serial.c \
1913         src/udev/scsi_id/scsi.h \
1914         src/udev/scsi_id/scsi_id.h
1915
1916 scsi_id_LDADD = \
1917         libudev-private.la \
1918         libsystemd-shared.la
1919
1920 udevlibexec_PROGRAMS += \
1921         scsi_id
1922
1923 EXTRA_DIST += \
1924         src/udev/scsi_id/README
1925
1926 # ------------------------------------------------------------------------------
1927 v4l_id_SOURCES = \
1928         src/udev/v4l_id/v4l_id.c
1929
1930 v4l_id_LDADD = \
1931         libudev.la
1932
1933 udevlibexec_PROGRAMS += \
1934         v4l_id
1935
1936 dist_udevrules_DATA += \
1937         rules/60-persistent-v4l.rules
1938
1939 # ------------------------------------------------------------------------------
1940 accelerometer_SOURCES = \
1941         src/udev/accelerometer/accelerometer.c
1942
1943 accelerometer_LDADD = \
1944         libudev.la -lm \
1945         libsystemd-shared.la
1946
1947 udevlibexec_PROGRAMS += \
1948         accelerometer
1949
1950 dist_udevrules_DATA += \
1951         rules/61-accelerometer.rules
1952
1953 # ------------------------------------------------------------------------------
1954 if ENABLE_GUDEV
1955 if ENABLE_GTK_DOC
1956 SUBDIRS += \
1957         docs/gudev
1958 endif
1959
1960 libgudev_includedir = \
1961         $(includedir)/gudev-1.0/gudev
1962
1963 libgudev_include_HEADERS = \
1964         src/gudev/gudev.h \
1965         src/gudev/gudevenums.h \
1966         src/gudev/gudevenumtypes.h \
1967         src/gudev/gudevtypes.h \
1968         src/gudev/gudevclient.h \
1969         src/gudev/gudevdevice.h \
1970         src/gudev/gudevenumerator.h
1971
1972 lib_LTLIBRARIES += libgudev-1.0.la
1973
1974 pkgconfiglib_DATA += \
1975         src/gudev/gudev-1.0.pc
1976
1977 CLEANFILES += \
1978         src/gudev/gudev-1.0.pc
1979
1980 libgudev_1_0_la_SOURCES = \
1981         src/gudev/gudevenums.h \
1982         src/gudev/gudevenumtypes.h \
1983         src/gudev/gudevenumtypes.h\
1984         src/gudev/gudevtypes.h \
1985         src/gudev/gudevclient.h \
1986         src/gudev/gudevclient.c \
1987         src/gudev/gudevdevice.h \
1988         src/gudev/gudevdevice.c \
1989         src/gudev/gudevenumerator.h \
1990         src/gudev/gudevenumerator.c \
1991         src/gudev/gudevprivate.h
1992
1993 nodist_libgudev_1_0_la_SOURCES = \
1994         src/gudev/gudevmarshal.h \
1995         src/gudev/gudevmarshal.c \
1996         src/gudev/gudevenumtypes.h \
1997         src/gudev/gudevenumtypes.c
1998
1999 BUILT_SOURCES += \
2000         $(nodist_libgudev_1_0_la_SOURCES)
2001
2002 libgudev_1_0_la_CPPFLAGS = \
2003         $(AM_CPPFLAGS) \
2004         -I$(top_builddir)/src\
2005         -I$(top_srcdir)/src\
2006         -I$(top_builddir)/src/gudev \
2007         -I$(top_srcdir)/src/gudev \
2008         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2009         -D_GUDEV_COMPILATION \
2010         -DG_LOG_DOMAIN=\"GUdev\"
2011
2012 libgudev_1_0_la_CFLAGS = \
2013         $(AM_CFLAGS) \
2014         -fvisibility=default \
2015         $(GLIB_CFLAGS)
2016
2017 libgudev_1_0_la_LIBADD = \
2018         libudev.la \
2019         $(GLIB_LIBS)
2020
2021 libgudev_1_0_la_LDFLAGS = \
2022         $(AM_LDFLAGS) \
2023         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2024         -export-dynamic -no-undefined \
2025         -export-symbols-regex '^g_udev_.*'
2026
2027 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2028         $(AM_V_at)$(MKDIR_P) $(dir $@)
2029         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2030
2031 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2032         $(AM_V_at)$(MKDIR_P) $(dir $@)
2033         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2034         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2035
2036 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2037         $(AM_V_at)$(MKDIR_P) $(dir $@)
2038         $(AM_V_GEN)glib-mkenums --template $^ > $@
2039
2040 if HAVE_INTROSPECTION
2041 -include $(INTROSPECTION_MAKEFILE)
2042
2043 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2044
2045 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2046
2047 src_gudev_GUdev_1_0_gir_CFLAGS = \
2048         $(INCLUDES) \
2049         -D_GUDEV_COMPILATION \
2050         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2051         -I$(top_srcdir)/src \
2052         -I$(top_builddir)/src \
2053         -I$(top_srcdir)/src/gdev \
2054         -I$(top_builddir)/src/gdev
2055
2056 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2057
2058 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2059         --pkg-export=gudev-1.0 \
2060         --warn-all
2061
2062 src_gudev_GUdev_1_0_gir_FILES = \
2063         src/gudev/gudev.h \
2064         src/gudev/gudevtypes.h \
2065         src/gudev/gudevenums.h \
2066         src/gudev/gudevenumtypes.h \
2067         src/gudev/gudevclient.h \
2068         src/gudev/gudevdevice.h \
2069         src/gudev/gudevenumerator.h \
2070         src/gudev/gudevclient.c \
2071         src/gudev/gudevdevice.c \
2072         src/gudev/gudevenumerator.c
2073
2074 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2075 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2076
2077 girdir = $(datadir)/gir-1.0
2078 gir_DATA = \
2079         src/gudev/GUdev-1.0.gir
2080
2081 typelibsdir = $(libdir)/girepository-1.0
2082 typelibs_DATA = \
2083         src/gudev/GUdev-1.0.typelib
2084
2085 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2086 endif # HAVE_INTROSPECTION
2087
2088 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2089 libgudev-install-move-hook:
2090         if test "$(libdir)" != "$(rootlibdir)"; then \
2091                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2092                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libgudev-1.0.so) && \
2093                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2094                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libgudev-1.0.so && \
2095                 mv $(DESTDIR)$(libdir)/libgudev-1.0.so.* $(DESTDIR)$(rootlibdir); \
2096         fi
2097
2098 libgudev-uninstall-move-hook:
2099         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2100
2101 INSTALL_EXEC_HOOKS += libgudev-install-move-hook
2102 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-move-hook
2103 endif
2104
2105 EXTRA_DIST += \
2106         src/gudev/gudev-1.0.pc.in \
2107         src/gudev/gudevmarshal.list \
2108         src/gudev/gudevenumtypes.h.template \
2109         src/gudev/gudevenumtypes.c.template \
2110         src/gudev/gjs-example.js \
2111         src/gudev/seed-example-enum.js \
2112         src/gudev/seed-example.js
2113
2114
2115 # ------------------------------------------------------------------------------
2116 if ENABLE_KEYMAP
2117 keymap_SOURCES = \
2118         src/udev/keymap/keymap.c
2119
2120 keymap_CPPFLAGS = \
2121         $(AM_CPPFLAGS) -I src/udev/keymap
2122
2123 keymap_LDADD = \
2124         libsystemd-shared.la
2125
2126 nodist_keymap_SOURCES = \
2127         src/udev/keymap/keys-from-name.h \
2128         src/udev/keymap/keys-to-name.h
2129
2130 BUILT_SOURCES += \
2131         $(nodist_keymap_SOURCES)
2132
2133 udevlibexec_PROGRAMS += \
2134         keymap
2135
2136 dist_doc_DATA += \
2137         src/udev/keymap/README.keymap.txt
2138
2139 dist_udevrules_DATA += \
2140         src/udev/keymap/95-keymap.rules \
2141         src/udev/keymap/95-keyboard-force-release.rules
2142
2143 dist_udevhome_SCRIPTS = \
2144         src/udev/keymap/findkeyboards \
2145         src/udev/keymap/keyboard-force-release.sh
2146
2147 TESTS += \
2148         src/udev/keymap/check-keymaps.sh
2149
2150 CLEANFILES += \
2151         src/udev/keymap/keys.txt \
2152         src/udev/keymap/keys-from-name.gperf \
2153         src/udev/keymap/keyboard-force-release.sh
2154
2155 udevkeymapdir = $(udevlibexecdir)/keymaps
2156 dist_udevkeymap_DATA = \
2157         keymaps/acer \
2158         keymaps/acer-aspire_5720 \
2159         keymaps/acer-aspire_8930 \
2160         keymaps/acer-aspire_5920g \
2161         keymaps/acer-aspire_6920 \
2162         keymaps/acer-travelmate_c300 \
2163         keymaps/asus \
2164         keymaps/compaq-e_evo \
2165         keymaps/dell \
2166         keymaps/dell-latitude-xt2 \
2167         keymaps/everex-xt5000 \
2168         keymaps/fujitsu-amilo_li_2732 \
2169         keymaps/fujitsu-amilo_pa_2548 \
2170         keymaps/fujitsu-amilo_pro_edition_v3505 \
2171         keymaps/fujitsu-amilo_pro_v3205 \
2172         keymaps/fujitsu-amilo_si_1520 \
2173         keymaps/fujitsu-esprimo_mobile_v5 \
2174         keymaps/fujitsu-esprimo_mobile_v6 \
2175         keymaps/genius-slimstar-320 \
2176         keymaps/hewlett-packard \
2177         keymaps/hewlett-packard-2510p_2530p \
2178         keymaps/hewlett-packard-compaq_elitebook \
2179         keymaps/hewlett-packard-pavilion \
2180         keymaps/hewlett-packard-presario-2100 \
2181         keymaps/hewlett-packard-tablet \
2182         keymaps/hewlett-packard-tx2 \
2183         keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
2184         keymaps/inventec-symphony_6.0_7.0 \
2185         keymaps/lenovo-3000 \
2186         keymaps/lenovo-ideapad \
2187         keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
2188         keymaps/lenovo-thinkpad_x6_tablet \
2189         keymaps/lenovo-thinkpad_x200_tablet \
2190         keymaps/lg-x110 \
2191         keymaps/logitech-wave \
2192         keymaps/logitech-wave-cordless \
2193         keymaps/logitech-wave-pro-cordless \
2194         keymaps/maxdata-pro_7000 \
2195         keymaps/medion-fid2060 \
2196         keymaps/medionnb-a555 \
2197         keymaps/micro-star \
2198         keymaps/module-asus-w3j \
2199         keymaps/module-ibm \
2200         keymaps/module-lenovo \
2201         keymaps/module-sony \
2202         keymaps/module-sony-old \
2203         keymaps/module-sony-vgn \
2204         keymaps/module-sony-vpc \
2205         keymaps/olpc-xo \
2206         keymaps/onkyo \
2207         keymaps/oqo-model2 \
2208         keymaps/samsung-other \
2209         keymaps/samsung-90x3a \
2210         keymaps/samsung-sq1us \
2211         keymaps/samsung-sx20s \
2212         keymaps/toshiba-satellite_a100 \
2213         keymaps/toshiba-satellite_a110 \
2214         keymaps/toshiba-satellite_m30x \
2215         keymaps/zepto-znote
2216
2217 udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
2218 dist_udevkeymapforcerel_DATA = \
2219         keymaps-force-release/dell-touchpad \
2220         keymaps-force-release/dell-xps \
2221         keymaps-force-release/hp-other \
2222         keymaps-force-release/samsung-other \
2223         keymaps-force-release/samsung-90x3a \
2224         keymaps-force-release/common-volume-keys
2225
2226 src/udev/keymap/keys.txt: Makefile
2227         $(AM_V_at)$(MKDIR_P) $(dir $@)
2228         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
2229
2230 src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
2231         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
2232
2233 src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
2234         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
2235
2236 src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
2237         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2238 endif
2239
2240 EXTRA_DIST += \
2241         src/udev/keymap/check-keymaps.sh \
2242         src/udev/keymap/keyboard-force-release.sh.in
2243
2244 # ------------------------------------------------------------------------------
2245 mtd_probe_SOURCES =  \
2246         src/udev/mtd_probe/mtd_probe.c \
2247         src/udev/mtd_probe/mtd_probe.h \
2248         src/udev/mtd_probe/probe_smartmedia.c
2249
2250 mtd_probe_CPPFLAGS = \
2251         $(AM_CPPFLAGS)
2252
2253 dist_udevrules_DATA += \
2254         rules/75-probe_mtd.rules
2255
2256 udevlibexec_PROGRAMS += \
2257         mtd_probe
2258
2259 # ------------------------------------------------------------------------------
2260 libsystemd_id128_la_SOURCES = \
2261         src/libsystemd-id128/sd-id128.c
2262
2263 libsystemd_id128_la_CFLAGS = \
2264         $(AM_CFLAGS) \
2265         -fvisibility=hidden
2266
2267 libsystemd_id128_la_LDFLAGS = \
2268         $(AM_LDFLAGS) \
2269         -shared \
2270         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2271         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2272
2273 libsystemd_id128_la_LIBADD = \
2274         libsystemd-shared.la
2275
2276 libsystemd_id128_internal_la_SOURCES = \
2277         $(libsystemd_id128_la_SOURCES)
2278
2279 test_id128_SOURCES = \
2280         src/test/test-id128.c
2281
2282 test_id128_LDADD = \
2283         libsystemd-shared.la \
2284         libsystemd-id128-internal.la
2285
2286 noinst_PROGRAMS += \
2287         test-id128
2288
2289 TESTS += \
2290         test-id128
2291
2292 pkginclude_HEADERS += \
2293         src/systemd/sd-id128.h
2294
2295 lib_LTLIBRARIES += \
2296         libsystemd-id128.la
2297
2298 noinst_LTLIBRARIES += \
2299         libsystemd-id128-internal.la
2300
2301 pkgconfiglib_DATA += \
2302         src/libsystemd-id128/libsystemd-id128.pc
2303
2304 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2305 libsystemd-id128-install-hook:
2306         if test "$(libdir)" != "$(rootlibdir)"; then \
2307                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2308                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-id128.so) && \
2309                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2310                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-id128.so && \
2311                 mv $(DESTDIR)$(libdir)/libsystemd-id128.so.* $(DESTDIR)$(rootlibdir); \
2312         fi
2313
2314 INSTALL_EXEC_HOOKS += \
2315         libsystemd-id128-install-hook
2316
2317 libsystemd-id128-uninstall-hook:
2318         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2319
2320 UNINSTALL_EXEC_HOOKS += \
2321         libsystemd-id128-uninstall-hook
2322
2323 EXTRA_DIST += \
2324         src/libsystemd-id128/libsystemd-id128.pc.in \
2325         src/libsystemd-id128/libsystemd-id128.sym
2326
2327 # ------------------------------------------------------------------------------
2328 systemd_journald_SOURCES = \
2329         src/journal/journald.c \
2330         src/journal/journald.h \
2331         src/journal/journald-kmsg.c \
2332         src/journal/journald-kmsg.h \
2333         src/journal/journald-syslog.c \
2334         src/journal/journald-syslog.h \
2335         src/journal/journald-stream.c \
2336         src/journal/journald-stream.h \
2337         src/journal/journald-console.c \
2338         src/journal/journald-console.h \
2339         src/journal/journald-native.c \
2340         src/journal/journald-native.h \
2341         src/journal/journald-rate-limit.c \
2342         src/journal/journald-rate-limit.h \
2343         src/journal/journal-internal.h
2344
2345 nodist_systemd_journald_SOURCES = \
2346         src/journal/journald-gperf.c
2347
2348 systemd_journald_LDADD = \
2349         libsystemd-label.la \
2350         libsystemd-shared.la \
2351         libsystemd-audit.la \
2352         libsystemd-daemon.la \
2353         libsystemd-id128-internal.la \
2354         libsystemd-journal-internal.la \
2355         libudev.la
2356
2357 if ENABLE_LOGIND
2358 systemd_journald_LDADD += \
2359         libsystemd-login-internal.la
2360 endif
2361
2362 if HAVE_ACL
2363 systemd_journald_LDADD += \
2364         libsystemd-acl.la
2365 endif
2366
2367 systemd_cat_SOURCES = \
2368         src/journal/cat.c
2369
2370 systemd_cat_LDADD = \
2371         libsystemd-shared.la \
2372         libsystemd-journal-internal.la
2373
2374 journalctl_SOURCES = \
2375         src/journal/journalctl.c
2376
2377 journalctl_CFLAGS = \
2378         $(AM_CFLAGS)
2379
2380 journalctl_LDADD = \
2381         libsystemd-shared.la \
2382         libsystemd-journal-internal.la \
2383         libsystemd-id128-internal.la \
2384         libsystemd-logs.la
2385
2386 if HAVE_QRENCODE
2387 journalctl_SOURCES += \
2388         src/journal/journal-qrcode.c \
2389         src/journal/journal-qrcode.h
2390
2391 journalctl_CFLAGS += \
2392         $(QRENCODE_CFLAGS)
2393
2394 journalctl_LDADD += \
2395         $(QRENCODE_LIBS)
2396 endif
2397
2398 test_journal_SOURCES = \
2399         src/journal/test-journal.c
2400
2401 test_journal_LDADD = \
2402         libsystemd-shared.la \
2403         libsystemd-journal-internal.la \
2404         libsystemd-id128-internal.la
2405
2406 test_journal_send_SOURCES = \
2407         src/journal/test-journal-send.c
2408
2409 test_journal_send_LDADD = \
2410         libsystemd-shared.la \
2411         libsystemd-journal-internal.la \
2412         libsystemd-id128-internal.la
2413
2414 test_journal_match_SOURCES = \
2415         src/journal/test-journal-match.c
2416
2417 test_journal_match_LDADD = \
2418         libsystemd-shared.la \
2419         libsystemd-journal-internal.la \
2420         libsystemd-id128-internal.la
2421
2422 test_journal_stream_SOURCES = \
2423         src/journal/test-journal-stream.c
2424
2425 test_journal_stream_LDADD = \
2426         libsystemd-shared.la \
2427         libsystemd-journal-internal.la \
2428         libsystemd-id128-internal.la
2429
2430 test_journal_verify_SOURCES = \
2431         src/journal/test-journal-verify.c
2432
2433 test_journal_verify_LDADD = \
2434         libsystemd-shared.la \
2435         libsystemd-journal-internal.la \
2436         libsystemd-id128-internal.la
2437
2438 libsystemd_journal_la_SOURCES = \
2439         src/journal/sd-journal.c \
2440         src/systemd/sd-journal.h \
2441         src/journal/journal-file.c \
2442         src/journal/journal-file.h \
2443         src/journal/journal-vacuum.c \
2444         src/journal/journal-vacuum.h \
2445         src/journal/journal-verify.c \
2446         src/journal/journal-verify.h \
2447         src/journal/lookup3.c \
2448         src/journal/lookup3.h \
2449         src/journal/journal-send.c \
2450         src/journal/sparse-endian.h \
2451         src/journal/journal-def.h \
2452         src/journal/compress.h \
2453         src/journal/mmap-cache.c \
2454         src/journal/mmap-cache.h
2455
2456 libsystemd_journal_la_CFLAGS = \
2457         $(AM_CFLAGS) \
2458         -fvisibility=hidden
2459
2460 libsystemd_journal_la_LDFLAGS = \
2461         $(AM_LDFLAGS) \
2462         -shared \
2463         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
2464         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
2465
2466 libsystemd_journal_la_LIBADD = \
2467         libsystemd-shared.la \
2468         libsystemd-id128-internal.la
2469
2470 libsystemd_journal_internal_la_SOURCES = \
2471         $(libsystemd_journal_la_SOURCES)
2472
2473 libsystemd_journal_internal_la_CFLAGS = \
2474         $(AM_CFLAGS)
2475
2476 libsystemd_journal_internal_la_LIBADD =
2477
2478 if HAVE_XZ
2479 libsystemd_journal_la_SOURCES += \
2480         src/journal/compress.c
2481
2482 libsystemd_journal_la_CFLAGS += \
2483         $(XZ_CFLAGS)
2484
2485 libsystemd_journal_la_LIBADD += \
2486         $(XZ_LIBS)
2487
2488 libsystemd_journal_internal_la_CFLAGS += \
2489         $(XZ_CFLAGS)
2490
2491 libsystemd_journal_internal_la_LIBADD += \
2492         $(XZ_LIBS)
2493
2494 endif
2495
2496 if HAVE_GCRYPT
2497 libsystemd_journal_la_SOURCES += \
2498         src/journal/journal-authenticate.c \
2499         src/journal/journal-authenticate.h \
2500         src/journal/fsprg.c \
2501         src/journal/fsprg.h
2502
2503 libsystemd_journal_la_CFLAGS += \
2504         $(GCRYPT_CFLAGS) \
2505         -Wno-pointer-arith
2506
2507 libsystemd_journal_la_LIBADD += \
2508         $(GCRYPT_LIBS)
2509
2510 libsystemd_journal_internal_la_CFLAGS += \
2511         $(GCRYPT_CFLAGS) \
2512         -Wno-pointer-arith
2513
2514 libsystemd_journal_internal_la_LIBADD += \
2515         $(GCRYPT_LIBS)
2516 endif
2517
2518 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2519 libsystemd-journal-install-hook:
2520         if test "$(libdir)" != "$(rootlibdir)"; then \
2521                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
2522                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-journal.so) && \
2523                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
2524                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-journal.so && \
2525                 mv $(DESTDIR)$(libdir)/libsystemd-journal.so.* $(DESTDIR)$(rootlibdir); \
2526         fi
2527
2528 INSTALL_EXEC_HOOKS += \
2529         libsystemd-journal-install-hook
2530
2531 libsystemd-journal-uninstall-hook:
2532         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
2533
2534 UNINSTALL_EXEC_HOOKS += \
2535         libsystemd-journal-uninstall-hook
2536
2537 noinst_PROGRAMS += \
2538         test-journal \
2539         test-journal-send \
2540         test-journal-match \
2541         test-journal-stream \
2542         test-journal-verify
2543
2544 TESTS += \
2545         test-journal \
2546         test-journal-match \
2547         test-journal-stream \
2548         test-journal-verify
2549
2550 pkginclude_HEADERS += \
2551         src/systemd/sd-journal.h \
2552         src/systemd/sd-messages.h
2553
2554 lib_LTLIBRARIES += \
2555         libsystemd-journal.la
2556
2557 noinst_LTLIBRARIES += \
2558         libsystemd-journal-internal.la
2559
2560 rootlibexec_PROGRAMS += \
2561         systemd-journald
2562
2563 rootbin_PROGRAMS += \
2564         journalctl
2565
2566 bin_PROGRAMS += \
2567         systemd-cat
2568
2569 dist_systemunit_DATA += \
2570         units/systemd-journald.socket
2571
2572 nodist_systemunit_DATA += \
2573         units/systemd-journald.service \
2574         units/systemd-journal-flush.service
2575
2576 dist_pkgsysconf_DATA += \
2577         src/journal/journald.conf
2578
2579 pkgconfiglib_DATA += \
2580         src/journal/libsystemd-journal.pc
2581
2582 journal-install-data-hook:
2583         $(MKDIR_P) -m 0755 \
2584                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
2585                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2586         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
2587                 rm -f systemd-journald.socket && \
2588                 $(LN_S) ../systemd-journald.socket )
2589         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2590                 rm -f systemd-journald.service systemd-journal-flush.service && \
2591                 $(LN_S) ../systemd-journald.service && \
2592                 $(LN_S) ../systemd-journal-flush.service )
2593
2594 INSTALL_DATA_HOOKS += \
2595         journal-install-data-hook
2596
2597 EXTRA_DIST += \
2598         src/journal/libsystemd-journal.pc.in \
2599         src/journal/libsystemd-journal.sym \
2600         units/systemd-journald.service.in \
2601         units/systemd-journal-flush.service.in \
2602         src/journal/journald-gperf.gperf
2603
2604 CLEANFILES += \
2605         src/journal/journald-gperf.c
2606
2607 # ------------------------------------------------------------------------------
2608 if ENABLE_COREDUMP
2609 systemd_coredump_SOURCES = \
2610         src/journal/coredump.c
2611
2612 systemd_coredump_LDADD = \
2613         libsystemd-journal-internal.la \
2614         libsystemd-label.la \
2615         libsystemd-shared.la
2616
2617 if ENABLE_LOGIND
2618 systemd_coredump_LDADD += \
2619         libsystemd-login-internal.la
2620 endif
2621
2622 rootlibexec_PROGRAMS += \
2623         systemd-coredump
2624
2625 sysctl_DATA = \
2626         sysctl.d/coredump.conf
2627
2628 CLEANFILES += \
2629         sysctl.d/coredump.conf
2630 endif
2631
2632 EXTRA_DIST += \
2633         sysctl.d/coredump.conf.in
2634
2635 # ------------------------------------------------------------------------------
2636 if ENABLE_BINFMT
2637 systemd_binfmt_SOURCES = \
2638         src/binfmt/binfmt.c
2639
2640 systemd_binfmt_LDADD = \
2641         libsystemd-shared.la
2642
2643 rootlibexec_PROGRAMS += \
2644         systemd-binfmt
2645
2646 dist_systemunit_DATA += \
2647         units/proc-sys-fs-binfmt_misc.automount \
2648         units/proc-sys-fs-binfmt_misc.mount
2649
2650 nodist_systemunit_DATA += \
2651         units/systemd-binfmt.service
2652
2653 binfmt-install-data-hook:
2654         $(MKDIR_P) -m 0755 \
2655                 $(DESTDIR)$(prefix)/lib/binfmt.d \
2656                 $(DESTDIR)$(sysconfdir)/binfmt.d \
2657                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2658         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2659                 rm -f systemd-binfmt.service \
2660                         proc-sys-fs-binfmt_misc.automount && \
2661                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
2662                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
2663
2664 INSTALL_DATA_HOOKS += \
2665         binfmt-install-data-hook
2666
2667 MANPAGES += \
2668         man/binfmt.d.5 \
2669         man/systemd-binfmt.service.8
2670
2671 MANPAGES_ALIAS +=  \
2672         man/systemd-binfmt.8
2673
2674 man/systemd-binfmt.8: man/systemd-binfmt.service.8
2675 endif
2676
2677 EXTRA_DIST += \
2678         units/systemd-binfmt.service.in
2679
2680 # ------------------------------------------------------------------------------
2681 if ENABLE_VCONSOLE
2682 systemd_vconsole_setup_SOURCES = \
2683         src/vconsole/vconsole-setup.c
2684
2685 systemd_vconsole_setup_LDADD = \
2686         libsystemd-shared.la
2687
2688 rootlibexec_PROGRAMS += \
2689         systemd-vconsole-setup
2690
2691 nodist_systemunit_DATA += \
2692         units/systemd-vconsole-setup.service
2693
2694 vconsole-install-data-hook:
2695         $(MKDIR_P) -m 0755 \
2696                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2697         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2698                 rm -f systemd-vconsole-setup.service && \
2699                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
2700
2701 INSTALL_DATA_HOOKS += \
2702         vconsole-install-data-hook
2703
2704 MANPAGES += \
2705         man/vconsole.conf.5 \
2706         man/systemd-vconsole-setup.service.8
2707
2708 MANPAGES_ALIAS += \
2709         man/systemd-vconsole-setup.8
2710
2711 man/systemd-vconsole-setup.8: man/systemd-vconsole-setup.service.8
2712 endif
2713
2714 EXTRA_DIST += \
2715         units/systemd-vconsole-setup.service.in
2716
2717 # ------------------------------------------------------------------------------
2718 if ENABLE_READAHEAD
2719 systemd_readahead_SOURCES = \
2720         src/readahead/readahead.c \
2721         src/readahead/readahead-collect.c \
2722         src/readahead/readahead-replay.c \
2723         src/readahead/readahead-analyze.c \
2724         src/readahead/readahead-common.c \
2725         src/readahead/readahead-common.h
2726
2727 systemd_readahead_LDADD = \
2728         libsystemd-shared.la \
2729         libsystemd-daemon.la \
2730         libudev.la
2731
2732 dist_doc_DATA += \
2733         src/readahead/sd-readahead.c \
2734         src/systemd/sd-readahead.h
2735
2736 rootlibexec_PROGRAMS += \
2737         systemd-readahead
2738
2739 dist_systemunit_DATA += \
2740         units/systemd-readahead-drop.service \
2741         units/systemd-readahead-done.timer
2742
2743 nodist_systemunit_DATA += \
2744         units/systemd-readahead-collect.service \
2745         units/systemd-readahead-replay.service \
2746         units/systemd-readahead-done.service
2747
2748 MANPAGES += \
2749         man/sd_readahead.3 \
2750         man/sd-readahead.3 \
2751         man/systemd-readahead-replay.service.8
2752
2753 MANPAGES_ALIAS += \
2754         man/systemd-readahead-collect.service.8 \
2755         man/systemd-readahead-done.service.8 \
2756         man/systemd-readahead-done.timer.8 \
2757         man/systemd-readahead.8
2758
2759 man/systemd-readahead-collect.service.8: man/systemd-readahead-replay.service.8
2760 man/systemd-readahead-done.service.8: man/systemd-readahead-replay.service.8
2761 man/systemd-readahead-done.timer.8: man/systemd-readahead-replay.service.8
2762 man/systemd-readahead.8: man/systemd-readahead-replay.service.8
2763
2764 endif
2765
2766 EXTRA_DIST += \
2767         units/systemd-readahead-collect.service.in \
2768         units/systemd-readahead-replay.service.in \
2769         units/systemd-readahead-done.service.in
2770
2771 # ------------------------------------------------------------------------------
2772 if ENABLE_QUOTACHECK
2773 rootlibexec_PROGRAMS += \
2774         systemd-quotacheck
2775
2776 nodist_systemunit_DATA += \
2777         units/systemd-quotacheck.service
2778
2779 systemd_quotacheck_SOURCES = \
2780         src/quotacheck/quotacheck.c
2781
2782 systemd_quotacheck_LDADD = \
2783         libsystemd-shared.la
2784
2785 MANPAGES += \
2786         man/systemd-quotacheck.service.8
2787
2788 MANPAGES_ALIAS += \
2789         man/systemd-quotacheck.8
2790
2791 man/systemd-quotacheck.8: man/systemd-quotacheck.service.8
2792
2793 endif
2794
2795 EXTRA_DIST += \
2796         units/systemd-quotacheck.service.in
2797
2798 nodist_systemunit_DATA += \
2799         units/quotaon.service
2800
2801 # ------------------------------------------------------------------------------
2802 if ENABLE_RANDOMSEED
2803 rootlibexec_PROGRAMS += \
2804         systemd-random-seed
2805
2806 nodist_systemunit_DATA += \
2807         units/systemd-random-seed-save.service \
2808         units/systemd-random-seed-load.service
2809
2810 systemd_random_seed_SOURCES = \
2811         src/random-seed/random-seed.c
2812
2813 systemd_random_seed_LDADD = \
2814         libsystemd-label.la \
2815         libsystemd-shared.la
2816
2817 randomseed-install-data-hook:
2818         $(MKDIR_P) -m 0755 \
2819                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
2820                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2821         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
2822                 rm -f systemd-random-seed-save.service && \
2823                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
2824         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2825                 rm -f systemd-random-seed-load.service && \
2826                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service )
2827
2828 INSTALL_DATA_HOOKS += \
2829         randomseed-install-data-hook
2830
2831 MANPAGES += \
2832         man/systemd-random-seed-load.service.8
2833
2834 MANPAGES_ALIAS +=  \
2835         man/systemd-random-seed-save.service.8 \
2836         man/systemd-random-seed.8
2837
2838 man/systemd-random-seed-save.service.8: man/systemd-random-seed-load.service.8
2839 man/systemd-random-seed.8: man/systemd-random-seed-load.service.8
2840
2841 endif
2842
2843 EXTRA_DIST += \
2844         units/systemd-random-seed-save.service.in \
2845         units/systemd-random-seed-load.service.in
2846
2847 # ------------------------------------------------------------------------------
2848 if HAVE_LIBCRYPTSETUP
2849 rootlibexec_PROGRAMS += \
2850         systemd-cryptsetup
2851
2852 systemgenerator_PROGRAMS += \
2853         systemd-cryptsetup-generator
2854
2855 dist_systemunit_DATA += \
2856         units/cryptsetup.target
2857
2858 systemd_cryptsetup_SOURCES = \
2859         src/cryptsetup/cryptsetup.c
2860
2861 systemd_cryptsetup_CFLAGS = \
2862         $(AM_CFLAGS) \
2863         $(LIBCRYPTSETUP_CFLAGS)
2864
2865 systemd_cryptsetup_LDADD = \
2866         libsystemd-label.la \
2867         libsystemd-shared.la \
2868         libudev.la \
2869         $(LIBCRYPTSETUP_LIBS)
2870
2871 systemd_cryptsetup_generator_SOURCES = \
2872         src/cryptsetup/cryptsetup-generator.c
2873
2874 systemd_cryptsetup_generator_LDADD = \
2875         libsystemd-label.la \
2876         libsystemd-shared.la
2877
2878 cryptsetup-install-data-hook:
2879         $(MKDIR_P) -m 0755 \
2880                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
2881         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2882                 rm -f cryptsetup.target && \
2883                 $(LN_S) ../cryptsetup.target cryptsetup.target )
2884
2885 INSTALL_DATA_HOOKS += \
2886         cryptsetup-install-data-hook
2887
2888 MANPAGES += \
2889         man/systemd-cryptsetup@.service.8 \
2890         man/systemd-cryptsetup-generator.8 \
2891         man/crypttab.5
2892
2893 MANPAGES_ALIAS += \
2894         man/systemd-cryptsetup.8
2895
2896 man/systemd-cryptsetup.8: man/systemd-cryptsetup@.service.8
2897
2898 endif
2899
2900 # ------------------------------------------------------------------------------
2901 if ENABLE_HOSTNAMED
2902 systemd_hostnamed_SOURCES = \
2903         src/hostname/hostnamed.c
2904
2905 systemd_hostnamed_CFLAGS = \
2906         $(AM_CFLAGS) \
2907         $(DBUS_CFLAGS)
2908
2909 systemd_hostnamed_LDADD = \
2910         libsystemd-shared.la \
2911         libsystemd-daemon.la \
2912         libsystemd-dbus.la
2913
2914 rootlibexec_PROGRAMS += \
2915         systemd-hostnamed
2916
2917 nodist_systemunit_DATA += \
2918         units/systemd-hostnamed.service
2919
2920 dist_dbuspolicy_DATA += \
2921         src/hostname/org.freedesktop.hostname1.conf
2922
2923 dist_dbussystemservice_DATA += \
2924         src/hostname/org.freedesktop.hostname1.service
2925
2926 polkitpolicy_files += \
2927         src/hostname/org.freedesktop.hostname1.policy
2928
2929 dbusinterface_DATA += \
2930         org.freedesktop.hostname1.xml
2931
2932 org.freedesktop.hostname1.xml: systemd-hostnamed
2933         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
2934                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
2935                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
2936
2937 hostnamed-install-data-hook:
2938         ( cd $(DESTDIR)$(systemunitdir) && \
2939                 rm -f dbus-org.freedesktop.hostname1.service && \
2940                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
2941
2942 INSTALL_DATA_HOOKS += \
2943         hostnamed-install-data-hook
2944
2945 MANPAGES += \
2946         man/systemd-hostnamed.service.8
2947
2948 MANPAGES_ALIAS += \
2949         man/systemd-hostnamed.8
2950
2951 man/systemd-hostnamed.8: man/systemd-hostnamed.service.8
2952 endif
2953
2954 polkitpolicy_in_files += \
2955         src/hostname/org.freedesktop.hostname1.policy.in
2956
2957 EXTRA_DIST += \
2958         units/systemd-hostnamed.service.in
2959
2960 # ------------------------------------------------------------------------------
2961 if ENABLE_LOCALED
2962 systemd_localed_SOURCES = \
2963         src/locale/localed.c
2964
2965 systemd_localed_CFLAGS = \
2966         $(AM_CFLAGS) \
2967         $(DBUS_CFLAGS)
2968
2969 systemd_localed_LDADD = \
2970         libsystemd-label.la \
2971         libsystemd-shared.la \
2972         libsystemd-daemon.la \
2973         libsystemd-dbus.la
2974
2975 nodist_systemunit_DATA += \
2976         units/systemd-localed.service
2977
2978 rootlibexec_PROGRAMS += \
2979         systemd-localed
2980
2981 dist_dbuspolicy_DATA += \
2982         src/locale/org.freedesktop.locale1.conf
2983
2984 dist_dbussystemservice_DATA += \
2985         src/locale/org.freedesktop.locale1.service
2986
2987 polkitpolicy_files += \
2988         src/locale/org.freedesktop.locale1.policy
2989
2990 dbusinterface_DATA += \
2991         org.freedesktop.locale1.xml
2992
2993 org.freedesktop.locale1.xml: systemd-localed
2994         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
2995                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
2996                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
2997
2998 localed-install-data-hook:
2999         ( cd $(DESTDIR)$(systemunitdir) && \
3000                 rm -f dbus-org.freedesktop.locale1.service && \
3001                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
3002
3003 INSTALL_DATA_HOOKS += \
3004         localed-install-data-hook
3005
3006 MANPAGES += \
3007         man/systemd-localed.service.8
3008
3009 MANPAGES_ALIAS += \
3010         man/systemd-localed.8
3011
3012 man/systemd-localed.8: man/systemd-localed.service.8
3013
3014 dist_pkgdata_DATA += \
3015         src/locale/kbd-model-map
3016
3017 dist_noinst_SCRIPT = \
3018         src/locale/generate-kbd-model-map
3019
3020 update-kbd-model-map:
3021         src/locale/generate-kbd-model-map > src/locale/kbd-model-map
3022
3023 endif
3024
3025 polkitpolicy_in_files += \
3026         src/locale/org.freedesktop.locale1.policy.in
3027
3028 EXTRA_DIST += \
3029         units/systemd-localed.service.in
3030
3031 # ------------------------------------------------------------------------------
3032 if ENABLE_TIMEDATED
3033 systemd_timedated_SOURCES = \
3034         src/timedate/timedated.c
3035
3036 systemd_timedated_CFLAGS = \
3037         $(AM_CFLAGS) \
3038         $(DBUS_CFLAGS)
3039
3040 systemd_timedated_LDADD = \
3041         libsystemd-shared.la \
3042         libsystemd-daemon.la \
3043         libsystemd-dbus.la
3044
3045 rootlibexec_PROGRAMS += \
3046         systemd-timedated
3047
3048 dist_dbussystemservice_DATA += \
3049         src/timedate/org.freedesktop.timedate1.service
3050
3051 dist_dbuspolicy_DATA += \
3052         src/timedate/org.freedesktop.timedate1.conf
3053
3054 nodist_systemunit_DATA += \
3055         units/systemd-timedated.service
3056
3057 polkitpolicy_files += \
3058         src/timedate/org.freedesktop.timedate1.policy
3059
3060 org.freedesktop.timedate1.xml: systemd-timedated
3061         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
3062                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
3063                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
3064
3065 dbusinterface_DATA += \
3066         org.freedesktop.timedate1.xml
3067
3068 timedated-install-data-hook:
3069         $(MKDIR_P) -m 0755 \
3070                 $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
3071                 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
3072         ( cd $(DESTDIR)$(systemunitdir) && \
3073                 rm -f dbus-org.freedesktop.timedate1.service  && \
3074                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
3075
3076 INSTALL_DATA_HOOKS += \
3077         timedated-install-data-hook
3078
3079 MANPAGES += \
3080         man/systemd-timedated.service.8
3081
3082 MANPAGES_ALIAS += \
3083         man/systemd-timedated.8
3084
3085 man/systemd-timedated.8: man/systemd-timedated.service.8
3086 endif
3087
3088 polkitpolicy_in_files += \
3089         src/timedate/org.freedesktop.timedate1.policy.in
3090
3091 EXTRA_DIST += \
3092         units/systemd-timedated.service.in
3093
3094 # ------------------------------------------------------------------------------
3095 if ENABLE_LOGIND
3096 systemd_logind_SOURCES = \
3097         src/login/logind.c \
3098         src/login/logind.h \
3099         src/login/logind-dbus.c \
3100         src/login/logind-device.c \
3101         src/login/logind-device.h \
3102         src/login/logind-button.c \
3103         src/login/logind-button.h \
3104         src/login/logind-seat.c \
3105         src/login/logind-seat.h \
3106         src/login/logind-session.c \
3107         src/login/logind-session.h \
3108         src/login/logind-user.c \
3109         src/login/logind-user.h \
3110         src/login/logind-inhibit.c \
3111         src/login/logind-inhibit.h \
3112         src/login/logind-session-dbus.c \
3113         src/login/logind-seat-dbus.c \
3114         src/login/logind-user-dbus.c \
3115         src/login/logind-acl.h
3116
3117 nodist_systemd_logind_SOURCES = \
3118         src/login/logind-gperf.c
3119
3120 systemd_logind_CFLAGS = \
3121         $(AM_CFLAGS) \
3122         $(DBUS_CFLAGS)
3123
3124 systemd_logind_LDADD = \
3125         libsystemd-label.la \
3126         libsystemd-shared.la \
3127         libsystemd-audit.la \
3128         libsystemd-daemon.la \
3129         libsystemd-dbus.la \
3130         libudev.la
3131
3132 if HAVE_ACL
3133 systemd_logind_SOURCES += \
3134         src/login/logind-acl.c
3135
3136 systemd_logind_LDADD += \
3137         libsystemd-acl.la
3138 endif
3139
3140 systemd_user_sessions_SOURCES = \
3141         src/login/user-sessions.c
3142
3143 systemd_user_sessions_LDADD = \
3144         libsystemd-shared.la
3145
3146 rootlibexec_PROGRAMS += \
3147         systemd-logind \
3148         systemd-user-sessions
3149
3150 loginctl_SOURCES = \
3151         src/login/loginctl.c \
3152         src/login/sysfs-show.c
3153
3154 loginctl_CFLAGS = \
3155         $(AM_CFLAGS) \
3156         $(DBUS_CFLAGS)
3157
3158 loginctl_LDADD = \
3159         libsystemd-shared.la \
3160         libsystemd-dbus.la \
3161         libudev.la
3162
3163 rootbin_PROGRAMS += \
3164         loginctl
3165
3166 systemd_inhibit_SOURCES = \
3167         src/login/inhibit.c
3168
3169 systemd_inhibit_CFLAGS = \
3170         $(AM_CFLAGS) \
3171         $(DBUS_CFLAGS)
3172
3173 systemd_inhibit_LDADD = \
3174         libsystemd-shared.la \
3175         libsystemd-dbus.la
3176
3177 rootbin_PROGRAMS += \
3178         systemd-inhibit
3179
3180 test_login_SOURCES = \
3181         src/login/test-login.c
3182
3183 test_login_LDADD = \
3184         libsystemd-login-internal.la \
3185         libsystemd-shared.la
3186
3187 test_inhibit_SOURCES = \
3188         src/login/test-inhibit.c
3189
3190 test_inhibit_LDADD = \
3191         libsystemd-shared.la \
3192         libsystemd-dbus.la
3193
3194 test_inhibit_CFLAGS = \
3195         $(AM_CFLAGS) \
3196         $(DBUS_CFLAGS)
3197
3198 noinst_PROGRAMS += \
3199         test-login \
3200         test-inhibit
3201
3202 libsystemd_login_la_SOURCES = \
3203         src/login/sd-login.c
3204
3205 libsystemd_login_la_CFLAGS = \
3206         $(AM_CFLAGS) \
3207         -fvisibility=hidden
3208
3209 libsystemd_login_la_LDFLAGS = \
3210         $(AM_LDFLAGS) \
3211         -shared \
3212         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
3213         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
3214
3215 libsystemd_login_la_LIBADD = \
3216         libsystemd-shared.la
3217
3218 libsystemd_login_internal_la_SOURCES = \
3219         $(libsystemd_login_la_SOURCES)
3220
3221 if HAVE_PAM
3222 pam_systemd_la_SOURCES = \
3223         src/login/pam-module.c
3224
3225 pam_systemd_la_CFLAGS = \
3226         $(AM_CFLAGS) \
3227         $(PAM_CFLAGS) \
3228         $(DBUS_CFLAGS) \
3229         -fvisibility=hidden
3230
3231 pam_systemd_la_LDFLAGS = \
3232         $(AM_LDFLAGS) \
3233         -module \
3234         -export-dynamic \
3235         -avoid-version \
3236         -shared \
3237         -export-symbols-regex '^pam_sm_.*'
3238
3239 pam_systemd_la_LIBADD = \
3240         libsystemd-daemon.la \
3241         libsystemd-audit.la \
3242         libsystemd-dbus.la \
3243         libsystemd-shared.la \
3244         $(PAM_LIBS)
3245
3246 pamlib_LTLIBRARIES = \
3247         pam_systemd.la
3248 endif
3249
3250 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3251 libsystemd-login-install-hook:
3252         if test "$(libdir)" != "$(rootlibdir)"; then \
3253                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
3254                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.so) && \
3255                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
3256                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-login.so && \
3257                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
3258         fi
3259
3260 INSTALL_EXEC_HOOKS += \
3261         libsystemd-login-install-hook
3262
3263 libsystemd-login-uninstall-hook:
3264         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
3265
3266 UNINSTALL_EXEC_HOOKS += \
3267         libsystemd-login-uninstall-hook
3268
3269 nodist_systemunit_DATA += \
3270         units/systemd-logind.service \
3271         units/systemd-user-sessions.service
3272
3273 dist_dbussystemservice_DATA += \
3274         src/login/org.freedesktop.login1.service
3275
3276 dist_dbuspolicy_DATA += \
3277         src/login/org.freedesktop.login1.conf
3278
3279 dist_pkgsysconf_DATA += \
3280         src/login/logind.conf
3281
3282 pkginclude_HEADERS += \
3283         src/systemd/sd-login.h
3284
3285 lib_LTLIBRARIES += \
3286         libsystemd-login.la
3287
3288 noinst_LTLIBRARIES += \
3289         libsystemd-login-internal.la
3290
3291 pkgconfiglib_DATA += \
3292         src/login/libsystemd-login.pc
3293
3294 polkitpolicy_files += \
3295         src/login/org.freedesktop.login1.policy
3296
3297 logind-install-data-hook:
3298         $(MKDIR_P) -m 0755 \
3299                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
3300                 $(DESTDIR)$(localstatedir)/lib/systemd
3301         ( cd $(DESTDIR)$(systemunitdir) && \
3302                 rm -f dbus-org.freedesktop.login1.service && \
3303                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
3304         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
3305                 rm -f systemd-logind.service systemd-user-sessions.service && \
3306                 $(LN_S) ../systemd-logind.service systemd-logind.service && \
3307                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service )
3308
3309 INSTALL_DATA_HOOKS += \
3310         logind-install-data-hook
3311
3312 systemd_multi_seat_x_SOURCES = \
3313         src/login/multi-seat-x.c
3314
3315 systemd_multi_seat_x_LDADD = \
3316         libsystemd-label.la \
3317         libsystemd-shared.la \
3318         libudev.la
3319
3320 rootlibexec_PROGRAMS += \
3321         systemd-multi-seat-x
3322
3323 dist_udevrules_DATA += \
3324         src/login/70-uaccess.rules \
3325         src/login/70-power-switch.rules
3326
3327 nodist_udevrules_DATA += \
3328         src/login/71-seat.rules \
3329         src/login/73-seat-late.rules
3330
3331 MANPAGES += \
3332         man/systemd-logind.service.8 \
3333         man/logind.conf.5 \
3334         man/sd-login.3 \
3335         man/loginctl.1 \
3336         man/sd_login_monitor_new.3 \
3337         man/sd_pid_get_session.3 \
3338         man/sd_uid_get_state.3 \
3339         man/sd_session_is_active.3 \
3340         man/sd_seat_get_active.3 \
3341         man/sd_get_seats.3 \
3342         man/systemd-user-sessions.service.8
3343
3344 MANPAGES_ALIAS += \
3345         man/sd_login_monitor_unref.3 \
3346         man/sd_login_monitor_flush.3 \
3347         man/sd_login_monitor_get_fd.3 \
3348         man/sd_login_monitor.3 \
3349         man/sd_session_get_uid.3 \
3350         man/sd_session_get_seat.3 \
3351         man/sd_session_get_service.3 \
3352         man/sd_session_get_state.3 \
3353         man/sd_session_get_type.3 \
3354         man/sd_session_get_class.3 \
3355         man/sd_session_get_display.3 \
3356         man/sd_pid_get_owner_uid.3 \
3357         man/sd_pid_get_unit.3 \
3358         man/sd_uid_is_on_seat.3 \
3359         man/sd_uid_get_sessions.3 \
3360         man/sd_uid_get_seats.3 \
3361         man/sd_seat_get_sessions.3 \
3362         man/sd_seat_can_multi_session.3 \
3363         man/sd_get_sessions.3 \
3364         man/sd_get_uids.3 \
3365         man/systemd-logind.8 \
3366         man/systemd-user-sessions.8
3367
3368 man/systemd-logind.8: man/systemd-logind.service.8
3369 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
3370 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
3371 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
3372 man/sd_login_monitor.3: man/sd_login_monitor_new.3
3373 man/sd_session_get_uid.3: man/sd_session_is_active.3
3374 man/sd_session_get_seat.3: man/sd_session_is_active.3
3375 man/sd_session_get_service.3: man/sd_session_is_active.3
3376 man/sd_session_get_state.3: man/sd_session_is_active.3
3377 man/sd_session_get_type.3: man/sd_session_is_active.3
3378 man/sd_session_get_class.3: man/sd_session_is_active.3
3379 man/sd_session_get_display.3: man/sd_session_is_active.3
3380 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
3381 man/sd_pid_get_unit.3: man/sd_pid_get_session.3
3382 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
3383 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
3384 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
3385 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
3386 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
3387 man/sd_get_sessions.3: man/sd_get_seats.3
3388 man/sd_get_uids.3: man/sd_get_seats.3
3389 man/systemd-user-sessions.8: man/systemd-user-sessions.service.8
3390
3391 CLEANFILES += \
3392         src/login/logind-gperf.c \
3393         src/login/71-seat.rules \
3394         src/login/73-seat-late.rules
3395 endif
3396
3397 polkitpolicy_in_files += \
3398         src/login/org.freedesktop.login1.policy.in
3399
3400 EXTRA_DIST += \
3401         src/login/logind-gperf.gperf \
3402         src/login/libsystemd-login.pc.in \
3403         src/login/libsystemd-login.sym \
3404         src/login/71-seat.rules.in \
3405         src/login/73-seat-late.rules.in \
3406         units/systemd-logind.service.in \
3407         units/systemd-user-sessions.service.in
3408
3409 # ------------------------------------------------------------------------------
3410
3411 if HAVE_PYTHON_DEVEL
3412
3413 pkgpyexec_LTLIBRARIES = \
3414         _journal.la
3415
3416 _journal_la_SOURCES = \
3417         src/python-systemd/_journal.c
3418
3419 _journal_la_CFLAGS = \
3420         $(AM_CFLAGS) \
3421         -fvisibility=default \
3422         -Wno-missing-prototypes \
3423         $(PYTHON_CFLAGS)
3424
3425 _journal_la_LDFLAGS = \
3426         $(AM_LDFLAGS) \
3427         -shared \
3428         -module \
3429         -avoid-version
3430
3431 _journal_la_LIBADD = \
3432         $(PYTHON_LIBS) \
3433         libsystemd-journal.la
3434
3435 dist_pkgpyexec_PYTHON = \
3436         src/python-systemd/journal.py \
3437         src/python-systemd/__init__.py
3438
3439 endif
3440
3441 # ------------------------------------------------------------------------------
3442
3443 SED_PROCESS = \
3444         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3445         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
3446                 -e 's,@rootbindir\@,$(rootbindir),g' \
3447                 -e 's,@bindir\@,$(bindir),g' \
3448                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
3449                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
3450                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
3451                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
3452                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
3453                 -e 's,@userunitdir\@,$(userunitdir),g' \
3454                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
3455                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
3456                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
3457                 -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
3458                 -e 's,@prefix\@,$(prefix),g' \
3459                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
3460                 -e 's,@libdir\@,$(libdir),g' \
3461                 -e 's,@includedir\@,$(includedir),g' \
3462                 -e 's,@VERSION\@,$(VERSION),g' \
3463                 -e 's,@rootprefix\@,$(rootprefix),g' \
3464                 -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
3465                 -e 's,@sushell\@,$(sushell),g' \
3466                 -e 's,@QUOTAON\@,$(QUOTAON),g' \
3467                 -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
3468                 < $< > $@
3469
3470 units/%: units/%.in Makefile
3471         $(SED_PROCESS)
3472
3473 man/%: man/%.in Makefile
3474         $(SED_PROCESS)
3475
3476 sysctl.d/%: sysctl.d/%.in Makefile
3477         $(SED_PROCESS)
3478
3479 %.pc: %.pc.in Makefile
3480         $(SED_PROCESS)
3481
3482 src/core/macros.%: src/core/macros.%.in Makefile
3483         $(SED_PROCESS)
3484
3485 src/%.policy.in: src/%.policy.in.in Makefile
3486         $(SED_PROCESS)
3487
3488 %.rules: %.rules.in Makefile
3489         $(SED_PROCESS)
3490
3491 %.sh: %.sh.in Makefile
3492         $(SED_PROCESS)
3493         $(AM_V_GEN)chmod +x $@
3494
3495 src/%.c: src/%.gperf
3496         $(AM_V_at)$(MKDIR_P) $(dir $@)
3497         $(AM_V_GEN)$(GPERF) < $< > $@
3498
3499 src/%: src/%.m4
3500         $(AM_V_at)$(MKDIR_P) $(dir $@)
3501         $(AM_V_GEN)$(M4) -P $(M4_DEFINES) < $< > $@
3502
3503 M4_PROCESS_SYSTEM = \
3504         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3505         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
3506
3507 M4_PROCESS_USER = \
3508         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3509         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
3510
3511 units/%: units/%.m4 Makefile
3512         $(M4_PROCESS_SYSTEM)
3513
3514 units/user/%: units/%.m4 Makefile
3515         $(M4_PROCESS_USER)
3516
3517 nodist_polkitpolicy_DATA = \
3518         $(polkitpolicy_files) \
3519         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
3520
3521 EXTRA_DIST += \
3522         $(polkitpolicy_in_files) \
3523         $(polkitpolicy_in_in_files)
3524
3525 CLEANFILES += \
3526         $(nodist_systemunit_DATA) \
3527         $(nodist_userunit_DATA) \
3528         $(nodist_man_MANS) \
3529         $(pkgconfigdata_DATA) \
3530         $(pkgconfiglib_DATA) \
3531         $(nodist_polkitpolicy_DATA)
3532
3533 if ENABLE_MANPAGES
3534 XSLTPROC_FLAGS = \
3535         --nonet \
3536         --stringparam man.output.quietly 1 \
3537         --stringparam funcsynopsis.style ansi \
3538         --stringparam man.th.extra1.suppress 1 \
3539         --stringparam man.authors.section.enabled 0 \
3540         --stringparam man.copyright.section.enabled 0
3541
3542 XSLTPROC_PROCESS_MAN = \
3543         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3544         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
3545
3546 XSLTPROC_PROCESS_HTML = \
3547         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
3548         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
3549
3550 man/%.1: man/%.xml
3551         $(XSLTPROC_PROCESS_MAN)
3552
3553 man/%.3: man/%.xml
3554         $(XSLTPROC_PROCESS_MAN)
3555
3556 man/%.5: man/%.xml
3557         $(XSLTPROC_PROCESS_MAN)
3558
3559 man/%.7: man/%.xml
3560         $(XSLTPROC_PROCESS_MAN)
3561
3562 man/%.8: man/%.xml
3563         $(XSLTPROC_PROCESS_MAN)
3564
3565 man/%.html: man/%.xml man/custom-html.xsl
3566         $(XSLTPROC_PROCESS_HTML)
3567
3568 CLEANFILES += \
3569         $(dist_man_MANS) \
3570         ${XML_FILES:.xml=.html}
3571 endif
3572
3573 DBUS_PREPROCESS = $(CPP) -P $(CFLAGS) $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
3574
3575 CLEANFILES += \
3576         $(dbusinterface_DATA)
3577
3578 systemd-install-data-hook:
3579         $(MKDIR_P) -m 0755 \
3580                 $(DESTDIR)$(tmpfilesdir) \
3581                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
3582                 $(DESTDIR)$(prefix)/lib/modules-load.d \
3583                 $(DESTDIR)$(sysconfdir)/modules-load.d \
3584                 $(DESTDIR)$(prefix)/lib/sysctl.d \
3585                 $(DESTDIR)$(sysconfdir)/sysctl.d \
3586                 $(DESTDIR)$(systemshutdowndir) \
3587                 $(DESTDIR)$(systemsleepdir) \
3588                 $(DESTDIR)$(systemgeneratordir) \
3589                 $(DESTDIR)$(usergeneratordir)
3590         $(MKDIR_P) -m 0755 \
3591                 $(DESTDIR)$(systemunitdir) \
3592                 $(DESTDIR)$(userunitdir) \
3593                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
3594                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
3595                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
3596                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
3597                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
3598                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
3599                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
3600                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
3601                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
3602                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
3603                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
3604                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
3605                 $(DESTDIR)$(pkgsysconfdir)/system \
3606                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
3607                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
3608                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
3609                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
3610                 $(DESTDIR)$(pkgsysconfdir)/user \
3611                 $(DESTDIR)$(dbussessionservicedir) \
3612                 $(DESTDIR)$(sysconfdir)/xdg/systemd
3613         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
3614                 rm -f user && \
3615                 $(LN_S) $(pkgsysconfdir)/user user )
3616         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
3617                 rm -f systemd-initctl.socket systemd-shutdownd.socket && \
3618                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
3619                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
3620         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
3621                 rm -f systemd-update-utmp-runlevel.service && \
3622                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3623         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
3624                 rm -f systemd-update-utmp-runlevel.service && \
3625                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3626         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
3627                 rm -f systemd-update-utmp-runlevel.service && \
3628                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3629         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
3630                 rm -f systemd-update-utmp-runlevel.service && \
3631                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3632         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
3633                 rm -f systemd-update-utmp-runlevel.service && \
3634                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
3635         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
3636                 rm -f systemd-update-utmp-shutdown.service && \
3637                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service )
3638         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
3639                 rm -f systemd-remount-fs.service \
3640                         systemd-fsck-root.service \
3641                         tmp.mount && \
3642                 $(LN_S) ../systemd-remount-fs.service systemd-remount-fs.service && \
3643                 $(LN_S) ../systemd-fsck-root.service systemd-fsck-root.service && \
3644                 $(LN_S) ../tmp.mount tmp.mount )
3645         ( cd $(DESTDIR)$(userunitdir) && \
3646                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
3647                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
3648                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
3649                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
3650                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
3651                 $(LN_S) $(systemunitdir)/sound.target sound.target )
3652         ( cd $(DESTDIR)$(systemunitdir) && \
3653                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
3654                 $(LN_S) poweroff.target runlevel0.target && \
3655                 $(LN_S) rescue.target runlevel1.target && \
3656                 $(LN_S) multi-user.target runlevel2.target && \
3657                 $(LN_S) multi-user.target runlevel3.target && \
3658                 $(LN_S) multi-user.target runlevel4.target && \
3659                 $(LN_S) graphical.target runlevel5.target && \
3660                 $(LN_S) reboot.target runlevel6.target )
3661         ( cd $(DESTDIR)$(systemunitdir) && \
3662                 rm -f default.target ctrl-alt-del.target autovt@.service && \
3663                 $(LN_S) graphical.target default.target && \
3664                 $(LN_S) reboot.target ctrl-alt-del.target && \
3665                 $(LN_S) getty@.service autovt@.service )
3666         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
3667                 rm -f getty.target systemd-ask-password-wall.path && \
3668                 $(LN_S) ../getty.target getty.target && \
3669                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path)
3670         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
3671                 rm -f getty@tty1.service && \
3672                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
3673         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
3674                 rm -f remote-fs.target && \
3675                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
3676         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
3677                 rm -f dev-hugepages.mount \
3678                         dev-mqueue.mount \
3679                         sys-kernel-config.mount \
3680                         sys-kernel-debug.mount \
3681                         sys-fs-fuse-connections.mount \
3682                         systemd-modules-load.service \
3683                         systemd-tmpfiles-setup.service \
3684                         systemd-sysctl.service \
3685                         systemd-ask-password-console.path && \
3686                 $(LN_S) ../dev-hugepages.mount dev-hugepages.mount && \
3687                 $(LN_S) ../dev-mqueue.mount dev-mqueue.mount && \
3688                 $(LN_S) ../sys-kernel-config.mount sys-kernel-config.mount && \
3689                 $(LN_S) ../sys-kernel-debug.mount sys-kernel-debug.mount && \
3690                 $(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
3691                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
3692                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
3693                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
3694                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path )
3695         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
3696                 rm -f systemd-tmpfiles-clean.timer && \
3697                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
3698         ( cd $(DESTDIR)$(dbussessionservicedir) && \
3699                 rm -f org.freedesktop.systemd1.service && \
3700                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
3701
3702 if TARGET_FEDORA
3703         ( cd $(DESTDIR)$(systemunitdir) && \
3704                 rm -f display-manager.service single.service && \
3705                 $(LN_S) rescue.service single.service )
3706 endif
3707
3708 if TARGET_MANDRIVA
3709         ( cd $(DESTDIR)$(systemunitdir) && \
3710                 rm -f display-manager.service dm.service single.service && \
3711                 $(LN_S) rescue.service single.service )
3712 endif
3713
3714 if TARGET_DEBIAN_OR_UBUNTU
3715         ( cd $(DESTDIR)$(systemunitdir) && \
3716                 rm -f runlevel5.target && \
3717                 $(LN_S) multi-user.target runlevel5.target )
3718 endif
3719
3720 if TARGET_SUSE
3721         ( cd $(DESTDIR)$(systemunitdir) && \
3722                 rm -f local.service && \
3723                 $(LN_S) rc-local.service local.service )
3724 endif
3725
3726 if TARGET_MAGEIA
3727         ( cd $(DESTDIR)$(systemunitdir) && \
3728                 rm -f display-manager.service )
3729 endif
3730
3731 install-exec-hook: $(INSTALL_EXEC_HOOKS)
3732
3733 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
3734
3735 install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)
3736
3737 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
3738
3739 clean-local:
3740         rm -rf $(abs_srcdir)/install-tree
3741
3742 DISTCHECK_CONFIGURE_FLAGS = \
3743         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
3744         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
3745         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
3746         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
3747         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
3748         --with-rootprefix=$$dc_install_base \
3749         --disable-split-usr
3750
3751 if ENABLE_GTK_DOC
3752 DISTCHECK_CONFIGURE_FLAGS += \
3753         --enable-gtk-doc
3754 endif
3755
3756 upload: all distcheck
3757         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
3758         scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
3759         scp man/*.html tango:public/systemd-man/
3760
3761 doc-sync: all
3762         gtkdoc-rebase --html-dir=docs/libudev/html --online
3763         rsync -av --delete docs/libudev/html/ --omit-dir-times www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/libudev/
3764         gtkdoc-rebase --html-dir=docs/gudev/html --online
3765         rsync -av --delete docs/gudev/html/ --omit-dir-times www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/gudev/
3766         rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/man/
3767
3768 git-tag:
3769         git tag "v$(VERSION)" -m "systemd $(VERSION)"
3770
3771 install-tree: all
3772         rm -rf $(abs_srcdir)/install-tree
3773         make install DESTDIR=$(abs_srcdir)/install-t