chiark / gitweb /
journal: add native protocol to journald, and client side API to send journal messages
[elogind.git] / Makefile.am
1 #  This file is part of systemd.
2 #
3 #  Copyright 2010 Lennart Poettering
4 #
5 #  systemd is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #
10 #  systemd is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #  General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 ACLOCAL_AMFLAGS = -I m4
19
20 SUBDIRS = po
21
22 LIBSYSTEMD_LOGIN_CURRENT=0
23 LIBSYSTEMD_LOGIN_REVISION=6
24 LIBSYSTEMD_LOGIN_AGE=0
25
26 LIBSYSTEMD_DAEMON_CURRENT=0
27 LIBSYSTEMD_DAEMON_REVISION=0
28 LIBSYSTEMD_DAEMON_AGE=0
29
30 # Dirs of external packages
31 dbuspolicydir=@dbuspolicydir@
32 dbussessionservicedir=@dbussessionservicedir@
33 dbussystemservicedir=@dbussystemservicedir@
34 dbusinterfacedir=@dbusinterfacedir@
35 udevrulesdir=@udevrulesdir@
36 pamlibdir=@pamlibdir@
37 pkgconfigdatadir=$(datadir)/pkgconfig
38 pkgconfiglibdir=$(libdir)/pkgconfig
39 polkitpolicydir=$(datadir)/polkit-1/actions
40 bashcompletiondir=$(sysconfdir)/bash_completion.d
41
42 # Our own, non-special dirs
43 pkgsysconfdir=$(sysconfdir)/systemd
44 userunitdir=$(prefix)/lib/systemd/user
45 tmpfilesdir=$(prefix)/lib/tmpfiles.d
46 usergeneratordir=$(pkglibexecdir)/user-generators
47 pkgincludedir=$(includedir)/systemd
48
49 # And these are the special ones for /
50 rootdir=@rootdir@
51 rootbindir=$(rootdir)/bin
52 rootlibexecdir=$(rootdir)/lib/systemd
53 systemgeneratordir=$(rootlibexecdir)/system-generators
54 systemshutdowndir=$(rootlibexecdir)/system-shutdown
55 systemunitdir=$(rootdir)/lib/systemd/system
56
57 AM_CPPFLAGS = \
58         -include $(top_builddir)/config.h \
59         -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
60         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
61         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
62         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
63         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
64         -DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
65         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
66         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
67         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
68         -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
69         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
70         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
71         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
72         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
73         -DRUNTIME_DIR=\"/run\" \
74         -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
75         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
76         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
77         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
78         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
79         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
80         -I $(top_srcdir)/src
81
82 if TARGET_GENTOO
83 AM_CPPFLAGS += \
84         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
85         -DKBD_SETFONT=\"/usr/bin/setfont\" \
86         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
87 else
88 if TARGET_ARCH
89 AM_CPPFLAGS += \
90         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
91         -DKBD_SETFONT=\"/usr/bin/setfont\" \
92         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
93 else
94 if TARGET_FRUGALWARE
95 AM_CPPFLAGS += \
96         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
97         -DKBD_SETFONT=\"/usr/bin/setfont\" \
98         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
99 else
100 if TARGET_MANDRIVA
101 AM_CPPFLAGS += \
102         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
103         -DKBD_SETFONT=\"/bin/setfont\" \
104         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
105 else
106 if TARGET_MEEGO
107 AM_CPPFLAGS += \
108         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
109         -DKBD_SETFONT=\"/bin/setfont\" \
110         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
111 else
112 if TARGET_ANGSTROM
113 AM_CPPFLAGS += \
114         -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
115         -DKBD_SETFONT=\"/usr/bin/setfont\" \
116         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
117 else
118 AM_CPPFLAGS += \
119         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
120         -DKBD_SETFONT=\"/bin/setfont\" \
121         -DDEFAULT_FONT=\"latarcyrheb-sun16\"
122 else
123 if TARGET_MAGEIA
124 AM_CPPFLAGS += \
125         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
126         -DKBD_SETFONT=\"/bin/setfont\" \
127         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
128 endif
129 endif
130 endif
131 endif
132 endif
133 endif
134 endif
135
136 rootbin_PROGRAMS = \
137         systemd \
138         systemctl \
139         systemd-loginctl \
140         systemd-notify \
141         systemd-ask-password \
142         systemd-tty-ask-password-agent \
143         systemd-tmpfiles \
144         systemd-machine-id-setup \
145         systemd-journalctl
146
147 bin_PROGRAMS = \
148         systemd-cgls \
149         systemd-stdio-bridge \
150         systemd-nspawn
151
152 dist_bin_SCRIPTS = \
153         src/systemd-analyze
154
155 if HAVE_GTK
156 bin_PROGRAMS += \
157         systemadm \
158         systemd-gnome-ask-password-agent
159 endif
160
161 rootlibexec_PROGRAMS = \
162         systemd-stdout-syslog-bridge \
163         systemd-cgroups-agent \
164         systemd-initctl \
165         systemd-update-utmp \
166         systemd-random-seed \
167         systemd-shutdownd \
168         systemd-shutdown \
169         systemd-modules-load \
170         systemd-remount-api-vfs \
171         systemd-kmsg-syslogd \
172         systemd-vconsole-setup \
173         systemd-reply-password \
174         systemd-readahead-collect \
175         systemd-readahead-replay \
176         systemd-user-sessions \
177         systemd-fsck \
178         systemd-quotacheck \
179         systemd-timestamp \
180         systemd-ac-power \
181         systemd-detect-virt \
182         systemd-sysctl \
183         systemd-logind \
184         systemd-uaccess \
185         systemd-journald
186
187 if ENABLE_BINFMT
188 rootlibexec_PROGRAMS += \
189         systemd-binfmt
190 endif
191
192 if ENABLE_HOSTNAMED
193 rootlibexec_PROGRAMS += \
194         systemd-hostnamed
195 endif
196
197 if ENABLE_TIMEDATED
198 rootlibexec_PROGRAMS += \
199         systemd-timedated
200 endif
201
202 if ENABLE_LOCALED
203 rootlibexec_PROGRAMS += \
204         systemd-localed
205 endif
206
207 systemgenerator_PROGRAMS = \
208         systemd-getty-generator
209
210 if HAVE_LIBCRYPTSETUP
211 rootlibexec_PROGRAMS += \
212         systemd-cryptsetup
213
214 systemgenerator_PROGRAMS += \
215         systemd-cryptsetup-generator
216 endif
217
218 lib_LTLIBRARIES = \
219         libsystemd-daemon.la \
220         libsystemd-login.la
221
222 pkginclude_HEADERS = \
223         src/sd-daemon.h \
224         src/sd-login.h
225
226 noinst_PROGRAMS = \
227         test-engine \
228         test-job-type \
229         test-ns \
230         test-loopback \
231         test-hostname \
232         test-daemon \
233         test-cgroup \
234         test-env-replace \
235         test-strv \
236         test-login \
237         test-install \
238         test-id128 \
239         test-journal
240
241 if HAVE_PAM
242 pamlib_LTLIBRARIES = \
243         pam_systemd.la
244 endif
245
246 dist_pkgsysconf_DATA = \
247         src/system.conf \
248         src/user.conf \
249         src/systemd-logind.conf
250
251 dist_dbuspolicy_DATA = \
252         src/org.freedesktop.systemd1.conf \
253         src/org.freedesktop.login1.conf
254
255 if ENABLE_HOSTNAMED
256 dist_dbuspolicy_DATA += \
257         src/org.freedesktop.hostname1.conf
258 endif
259
260 if ENABLE_TIMEDATED
261 dist_dbuspolicy_DATA += \
262         src/org.freedesktop.timedate1.conf
263 endif
264
265 if ENABLE_LOCALED
266 dist_dbuspolicy_DATA += \
267         src/org.freedesktop.locale1.conf
268 endif
269
270 dist_dbussystemservice_DATA = \
271         src/org.freedesktop.systemd1.service \
272         src/org.freedesktop.login1.service
273
274 if ENABLE_HOSTNAMED
275 dist_dbussystemservice_DATA += \
276         src/org.freedesktop.hostname1.service
277 endif
278
279 if ENABLE_TIMEDATED
280 dist_dbussystemservice_DATA += \
281         src/org.freedesktop.timedate1.service
282 endif
283
284 if ENABLE_LOCALED
285 dist_dbussystemservice_DATA += \
286         src/org.freedesktop.locale1.service
287 endif
288
289 dist_udevrules_DATA = \
290         src/70-uaccess.rules \
291         src/71-seat.rules
292
293 nodist_udevrules_DATA = \
294         src/73-seat-late.rules \
295         src/99-systemd.rules
296
297 dbusinterface_DATA = \
298         org.freedesktop.systemd1.Manager.xml \
299         org.freedesktop.systemd1.Job.xml \
300         org.freedesktop.systemd1.Unit.xml \
301         org.freedesktop.systemd1.Service.xml \
302         org.freedesktop.systemd1.Socket.xml \
303         org.freedesktop.systemd1.Timer.xml \
304         org.freedesktop.systemd1.Target.xml \
305         org.freedesktop.systemd1.Device.xml \
306         org.freedesktop.systemd1.Mount.xml \
307         org.freedesktop.systemd1.Automount.xml \
308         org.freedesktop.systemd1.Snapshot.xml \
309         org.freedesktop.systemd1.Swap.xml \
310         org.freedesktop.systemd1.Path.xml
311
312 if ENABLE_HOSTNAMED
313 dbusinterface_DATA += \
314         org.freedesktop.hostname1.xml
315 endif
316
317 if ENABLE_TIMEDATED
318 dbusinterface_DATA += \
319         org.freedesktop.timedate1.xml
320 endif
321
322 if ENABLE_LOCALED
323 dbusinterface_DATA += \
324         org.freedesktop.locale1.xml
325 endif
326
327 dist_bashcompletion_DATA = \
328         src/systemd-bash-completion.sh
329
330 dist_tmpfiles_DATA = \
331         tmpfiles.d/systemd.conf \
332         tmpfiles.d/tmp.conf \
333         tmpfiles.d/x11.conf
334
335 if HAVE_SYSV_COMPAT
336 dist_tmpfiles_DATA += \
337         tmpfiles.d/legacy.conf
338 endif
339
340 dist_systemunit_DATA = \
341         units/graphical.target \
342         units/multi-user.target \
343         units/emergency.service \
344         units/emergency.target \
345         units/sysinit.target \
346         units/basic.target \
347         units/getty.target \
348         units/halt.target \
349         units/kexec.target \
350         units/local-fs.target \
351         units/local-fs-pre.target \
352         units/remote-fs.target \
353         units/remote-fs-pre.target \
354         units/cryptsetup.target \
355         units/network.target \
356         units/nss-lookup.target \
357         units/mail-transfer-agent.target \
358         units/http-daemon.target \
359         units/poweroff.target \
360         units/reboot.target \
361         units/rescue.target \
362         units/rpcbind.target \
363         units/time-sync.target \
364         units/shutdown.target \
365         units/final.target \
366         units/umount.target \
367         units/sigpwr.target \
368         units/sockets.target \
369         units/swap.target \
370         units/systemd-initctl.socket \
371         units/systemd-stdout-syslog-bridge.socket \
372         units/systemd-shutdownd.socket \
373         units/syslog.socket \
374         units/dev-hugepages.mount \
375         units/dev-mqueue.mount \
376         units/sys-kernel-config.mount \
377         units/sys-kernel-debug.mount \
378         units/sys-kernel-security.mount \
379         units/sys-fs-fuse-connections.mount \
380         units/var-run.mount \
381         units/media.mount \
382         units/remount-rootfs.service \
383         units/printer.target \
384         units/sound.target \
385         units/bluetooth.target \
386         units/smartcard.target \
387         units/systemd-readahead-done.timer \
388         units/systemd-tmpfiles-clean.timer \
389         units/quotaon.service \
390         units/systemd-ask-password-wall.path \
391         units/systemd-ask-password-console.path \
392         units/syslog.target
393
394 if HAVE_SYSV_COMPAT
395 dist_systemunit_DATA += \
396         units/var-lock.mount
397 endif
398
399 if ENABLE_BINFMT
400 dist_systemunit_DATA += \
401         units/proc-sys-fs-binfmt_misc.automount \
402         units/proc-sys-fs-binfmt_misc.mount
403 endif
404
405 nodist_systemunit_DATA = \
406         units/getty@.service \
407         units/serial-getty@.service \
408         units/console-shell.service \
409         units/systemd-initctl.service \
410         units/systemd-stdout-syslog-bridge.service \
411         units/systemd-shutdownd.service \
412         units/systemd-logind.service \
413         units/systemd-kmsg-syslogd.service \
414         units/systemd-modules-load.service \
415         units/systemd-vconsole-setup.service \
416         units/systemd-remount-api-vfs.service \
417         units/systemd-update-utmp-runlevel.service \
418         units/systemd-update-utmp-shutdown.service \
419         units/systemd-random-seed-save.service \
420         units/systemd-random-seed-load.service \
421         units/systemd-readahead-collect.service \
422         units/systemd-readahead-replay.service \
423         units/systemd-readahead-done.service \
424         units/systemd-tmpfiles-setup.service \
425         units/systemd-tmpfiles-clean.service \
426         units/systemd-user-sessions.service \
427         units/systemd-ask-password-wall.service \
428         units/systemd-ask-password-console.service \
429         units/systemd-sysctl.service \
430         units/halt.service \
431         units/poweroff.service \
432         units/reboot.service \
433         units/kexec.service \
434         units/fsck@.service \
435         units/fsck-root.service \
436         units/quotacheck.service \
437         units/rescue.service \
438         units/user@.service
439
440 if ENABLE_BINFMT
441 nodist_systemunit_DATA += \
442         units/systemd-binfmt.service
443 endif
444
445 if ENABLE_HOSTNAMED
446 nodist_systemunit_DATA += \
447         units/systemd-hostnamed.service
448 endif
449
450 if ENABLE_TIMEDATED
451 nodist_systemunit_DATA += \
452         units/systemd-timedated.service
453 endif
454
455 if ENABLE_LOCALED
456 nodist_systemunit_DATA += \
457         units/systemd-localed.service
458 endif
459
460 dist_userunit_DATA = \
461         units/user/default.target \
462         units/user/exit.target
463
464 nodist_userunit_DATA = \
465         units/user/exit.service
466
467 EXTRA_DIST = \
468         units/getty@.service.m4 \
469         units/serial-getty@.service.m4 \
470         units/console-shell.service.m4 \
471         units/rescue.service.m4 \
472         units/systemd-initctl.service.in \
473         units/systemd-stdout-syslog-bridge.service.in \
474         units/systemd-shutdownd.service.in \
475         units/systemd-logind.service.in \
476         units/systemd-kmsg-syslogd.service.in \
477         units/systemd-modules-load.service.in \
478         units/systemd-vconsole-setup.service.in \
479         units/systemd-remount-api-vfs.service.in \
480         units/systemd-update-utmp-runlevel.service.in \
481         units/systemd-update-utmp-shutdown.service.in \
482         units/systemd-random-seed-save.service.in \
483         units/systemd-random-seed-load.service.in \
484         units/systemd-readahead-collect.service.in \
485         units/systemd-readahead-replay.service.in \
486         units/systemd-readahead-done.service.in \
487         units/systemd-tmpfiles-setup.service.in \
488         units/systemd-tmpfiles-clean.service.in \
489         units/systemd-user-sessions.service.in \
490         units/systemd-ask-password-wall.service.in \
491         units/systemd-ask-password-console.service.in \
492         units/systemd-sysctl.service.in \
493         units/halt.service.in \
494         units/poweroff.service.in \
495         units/reboot.service.in \
496         units/kexec.service.in \
497         units/user/exit.service.in \
498         units/fsck@.service.in \
499         units/fsck-root.service.in \
500         units/quotacheck.service.in \
501         units/user@.service.in \
502         systemd.pc.in \
503         libsystemd-daemon.pc.in \
504         libsystemd-login.pc.in \
505         src/libsystemd-daemon.sym \
506         src/libsystemd-login.sym \
507         introspect.awk \
508         src/73-seat-late.rules.in \
509         src/99-systemd.rules.in
510
511 if ENABLE_BINFMT
512 EXTRA_DIST += \
513         units/systemd-binfmt.service.in
514 endif
515
516 if ENABLE_HOSTNAMED
517 EXTRA_DIST += \
518         units/systemd-hostnamed.service.in
519 endif
520
521 if ENABLE_TIMEDATED
522 EXTRA_DIST += \
523         units/systemd-timedated.service.in
524 endif
525
526 if ENABLE_LOCALED
527 EXTRA_DIST += \
528         units/systemd-localed.service.in
529 endif
530
531 if TARGET_FEDORA
532 dist_systemunit_DATA += \
533         units/fedora/prefdm.service \
534         units/fedora/rc-local.service \
535         units/fedora/halt-local.service
536 endif
537
538 if TARGET_MANDRIVA
539 dist_systemunit_DATA += \
540         units/mandriva/prefdm.service \
541         units/fedora/rc-local.service \
542         units/fedora/halt-local.service
543 endif
544
545 if TARGET_FRUGALWARE
546 dist_systemunit_DATA += \
547         units/frugalware/display-manager.service
548 endif
549
550 if TARGET_SUSE
551 dist_systemunit_DATA += \
552         units/suse/rc-local.service \
553         units/suse/halt-local.service
554 endif
555
556 if TARGET_MAGEIA
557 dist_systemunit_DATA += \
558         units/mageia/prefdm.service \
559         units/fedora/rc-local.service \
560         units/fedora/halt-local.service
561 endif
562
563 if HAVE_PLYMOUTH
564 dist_systemunit_DATA += \
565         units/plymouth-start.service \
566         units/plymouth-read-write.service \
567         units/plymouth-quit.service \
568         units/plymouth-quit-wait.service \
569         units/plymouth-reboot.service \
570         units/plymouth-kexec.service \
571         units/plymouth-poweroff.service \
572         units/plymouth-halt.service \
573         units/systemd-ask-password-plymouth.path
574
575 nodist_systemunit_DATA += \
576         units/systemd-ask-password-plymouth.service
577
578 EXTRA_DIST += \
579         units/systemd-ask-password-plymouth.service.in
580 endif
581
582 dist_doc_DATA = \
583         README \
584         LICENSE \
585         DISTRO_PORTING \
586         src/sd-daemon.h \
587         src/sd-daemon.c \
588         src/sd-readahead.h \
589         src/sd-readahead.c
590
591 pkgconfigdata_DATA = \
592         systemd.pc
593
594 pkgconfiglib_DATA = \
595         libsystemd-daemon.pc \
596         libsystemd-login.pc
597
598 # Passed through intltool only
599 polkitpolicy_in_files = \
600         src/org.freedesktop.login1.policy.in
601
602 if ENABLE_HOSTNAMED
603 polkitpolicy_in_files += \
604         src/org.freedesktop.hostname1.policy.in
605 endif
606
607 if ENABLE_TIMEDATED
608 polkitpolicy_in_files += \
609         src/org.freedesktop.timedate1.policy.in
610 endif
611
612 if ENABLE_LOCALED
613 polkitpolicy_in_files += \
614         src/org.freedesktop.locale1.policy.in
615 endif
616
617 # First passed through sed, followed by intltool
618 polkitpolicy_in_in_files = \
619         src/org.freedesktop.systemd1.policy.in.in
620
621 nodist_polkitpolicy_DATA = \
622         $(polkitpolicy_in_files:.policy.in=.policy) \
623         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
624
625 EXTRA_DIST += \
626         $(polkitpolicy_in_files) \
627         $(polkitpolicy_in_in_files)
628
629 @INTLTOOL_POLICY_RULE@
630
631 noinst_LTLIBRARIES = \
632         libsystemd-basic.la \
633         libsystemd-core.la
634
635 libsystemd_basic_la_SOURCES = \
636         src/util.c \
637         src/virt.c \
638         src/label.c \
639         src/hashmap.c \
640         src/set.c \
641         src/strv.c \
642         src/conf-parser.c \
643         src/socket-util.c \
644         src/log.c \
645         src/ratelimit.c \
646         src/exit-status.c
647
648 libsystemd_basic_la_CFLAGS = \
649         $(AM_CFLAGS) \
650         $(SELINUX_CFLAGS)
651
652 libsystemd_basic_la_LIBADD = \
653         $(SELINUX_LIBS) \
654         $(CAP_LIBS)
655
656 libsystemd_core_la_SOURCES = \
657         src/unit.c \
658         src/job.c \
659         src/manager.c \
660         src/path-lookup.c \
661         src/load-fragment.c \
662         src/service.c \
663         src/automount.c \
664         src/mount.c \
665         src/swap.c \
666         src/device.c \
667         src/target.c \
668         src/snapshot.c \
669         src/socket.c \
670         src/timer.c \
671         src/path.c \
672         src/load-dropin.c \
673         src/execute.c \
674         src/utmp-wtmp.c \
675         src/dbus.c \
676         src/dbus-manager.c \
677         src/dbus-unit.c \
678         src/dbus-job.c \
679         src/dbus-service.c \
680         src/dbus-socket.c \
681         src/dbus-timer.c \
682         src/dbus-target.c \
683         src/dbus-mount.c \
684         src/dbus-automount.c \
685         src/dbus-swap.c \
686         src/dbus-snapshot.c \
687         src/dbus-device.c \
688         src/dbus-execute.c \
689         src/dbus-path.c \
690         src/cgroup.c \
691         src/mount-setup.c \
692         src/hostname-setup.c \
693         src/selinux-setup.c \
694         src/loopback-setup.c \
695         src/kmod-setup.c \
696         src/locale-setup.c \
697         src/machine-id-setup.c \
698         src/specifier.c \
699         src/unit-name.c \
700         src/fdset.c \
701         src/namespace.c \
702         src/tcpwrap.c \
703         src/cgroup-util.c \
704         src/condition.c \
705         src/dbus-common.c \
706         src/sd-daemon.c \
707         src/install.c \
708         src/cgroup-attr.c \
709         src/sd-id128.c
710
711 nodist_libsystemd_core_la_SOURCES = \
712         src/load-fragment-gperf.c \
713         src/load-fragment-gperf-nulstr.c
714
715 EXTRA_DIST += \
716         src/load-fragment-gperf.gperf.m4
717
718 libsystemd_core_la_CFLAGS = \
719         $(AM_CFLAGS) \
720         $(DBUS_CFLAGS) \
721         $(UDEV_CFLAGS) \
722         $(LIBWRAP_CFLAGS) \
723         $(PAM_CFLAGS) \
724         $(AUDIT_CFLAGS)
725
726 libsystemd_core_la_LIBADD = \
727         libsystemd-basic.la \
728         $(DBUS_LIBS) \
729         $(UDEV_LIBS) \
730         $(LIBWRAP_LIBS) \
731         $(PAM_LIBS) \
732         $(AUDIT_LIBS) \
733         $(CAP_LIBS)
734
735 # This is needed because automake is buggy in how it generates the
736 # rules for C programs, but not Vala programs.  We therefore can't
737 # list the .h files as dependencies if we want make dist to work.
738
739 EXTRA_DIST += \
740         ${libsystemd_basic_la_SOURCES:.c=.h} \
741         ${libsystemd_core_la_SOURCES:.c=.h} \
742         ${libsystemd_daemon_la_SOURCES:.c=.h} \
743         src/macro.h \
744         src/def.h \
745         src/ioprio.h \
746         src/missing.h \
747         src/list.h \
748         src/securebits.h \
749         src/linux/auto_dev-ioctl.h \
750         src/linux/fanotify.h \
751         src/initreq.h \
752         src/sd-readahead.h \
753         src/special.h \
754         src/dbus-common.h \
755         src/bus-errors.h \
756         src/cgroup-show.h \
757         src/build.h \
758         src/shutdownd.h \
759         src/umount.h \
760         src/readahead-common.h \
761         src/ask-password-api.h \
762         src/pager.h \
763         src/sysfs-show.h \
764         src/polkit.h \
765         src/logind.h \
766         src/logind-device.h \
767         src/logind-seat.h \
768         src/logind-session.h \
769         src/logind-user.h \
770         src/logind-acl.h \
771         src/dbus-loop.h \
772         src/spawn-agent.h
773
774 MANPAGES = \
775         man/systemd.1 \
776         man/systemctl.1 \
777         man/systemadm.1 \
778         man/systemd-cgls.1 \
779         man/systemd-nspawn.1 \
780         man/systemd-tmpfiles.8 \
781         man/systemd-notify.1 \
782         man/sd_notify.3 \
783         man/sd_readahead.3 \
784         man/sd_booted.3 \
785         man/sd_listen_fds.3 \
786         man/sd_is_fifo.3 \
787         man/systemd.unit.5 \
788         man/systemd.service.5 \
789         man/systemd.socket.5 \
790         man/systemd.mount.5 \
791         man/systemd.automount.5 \
792         man/systemd.swap.5 \
793         man/systemd.timer.5 \
794         man/systemd.path.5 \
795         man/systemd.target.5 \
796         man/systemd.device.5 \
797         man/systemd.snapshot.5 \
798         man/systemd.exec.5 \
799         man/daemon.7 \
800         man/sd-daemon.7 \
801         man/sd-readahead.7 \
802         man/runlevel.8 \
803         man/telinit.8 \
804         man/halt.8 \
805         man/shutdown.8 \
806         man/pam_systemd.8 \
807         man/systemd.conf.5 \
808         man/systemd-logind.conf.5 \
809         man/tmpfiles.d.5 \
810         man/hostname.5 \
811         man/timezone.5 \
812         man/machine-id.5 \
813         man/vconsole.conf.5 \
814         man/locale.conf.5 \
815         man/os-release.5 \
816         man/machine-info.5 \
817         man/modules-load.d.5 \
818         man/sysctl.d.5 \
819         man/systemd-ask-password.1 \
820         man/systemd-loginctl.1
821
822 if ENABLE_BINFMT
823 MANPAGES += \
824         man/binfmt.d.5
825 endif
826
827 MANPAGES_ALIAS = \
828         man/reboot.8 \
829         man/poweroff.8 \
830         man/sd_is_socket.3 \
831         man/sd_is_socket_unix.3 \
832         man/sd_is_socket_inet.3 \
833         man/sd_notifyf.3 \
834         man/init.1
835
836 man/reboot.8: man/halt.8
837 man/poweroff.8: man/halt.8
838 man/sd_is_socket.3: man/sd_is_fifo.3
839 man/sd_is_socket_unix.3: man/sd_is_fifo.3
840 man/sd_is_socket_inet.3: man/sd_is_fifo.3
841 man/sd_notifyf.3: man/sd_notify.3
842 man/init.1: man/systemd.1
843
844 dist_man_MANS = \
845         $(MANPAGES) \
846         $(MANPAGES_ALIAS)
847
848 nodist_man_MANS = \
849         man/systemd.special.7
850
851 XML_FILES = \
852         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
853
854 XML_IN_FILES = \
855         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
856
857 dist_noinst_DATA = \
858         ${XML_FILES:.xml=.html}
859
860 nodist_noinst_DATA = \
861         ${XML_IN_FILES:.xml.in=.html}
862
863 EXTRA_DIST += \
864         $(XML_FILES) \
865         $(XML_IN_FILES) \
866         ${nodist_man_MANS:=.in} \
867         ${XML_IN_FILES:.xml.in=.html.in}
868
869 systemd_SOURCES = \
870         src/main.c
871
872 systemd_CFLAGS = \
873         $(AM_CFLAGS) \
874         $(DBUS_CFLAGS) \
875         $(UDEV_CFLAGS)
876
877 systemd_LDADD = \
878         libsystemd-core.la
879
880 test_engine_SOURCES = \
881         src/test-engine.c
882
883 test_engine_CFLAGS = $(systemd_CFLAGS)
884 test_engine_LDADD = $(systemd_LDADD)
885
886 test_job_type_SOURCES = \
887         src/test-job-type.c
888
889 test_job_type_CFLAGS = $(systemd_CFLAGS)
890 test_job_type_LDADD = $(systemd_LDADD)
891
892 test_ns_SOURCES = \
893         src/test-ns.c
894
895 test_ns_CFLAGS = $(systemd_CFLAGS)
896 test_ns_LDADD = $(systemd_LDADD)
897
898 test_loopback_SOURCES = \
899         src/test-loopback.c \
900         src/loopback-setup.c
901
902 test_loopback_LDADD = \
903         libsystemd-basic.la
904
905 test_hostname_SOURCES = \
906         src/test-hostname.c \
907         src/hostname-setup.c
908
909 test_hostname_LDADD = \
910         libsystemd-basic.la
911
912 test_daemon_SOURCES = \
913         src/test-daemon.c
914
915 test_daemon_LDADD = \
916         libsystemd-basic.la \
917         libsystemd-daemon.la
918
919 test_cgroup_SOURCES = \
920         src/test-cgroup.c \
921         src/cgroup-util.c
922
923 test_cgroup_CFLAGS = \
924         $(AM_CFLAGS)
925
926 test_cgroup_LDADD = \
927         libsystemd-basic.la
928
929 test_env_replace_SOURCES = \
930         src/test-env-replace.c
931
932 test_env_replace_CFLAGS = \
933         $(AM_CFLAGS)
934
935 test_env_replace_LDADD = \
936         libsystemd-basic.la
937
938 test_strv_SOURCES = \
939         src/test-strv.c \
940         src/specifier.c
941
942 test_strv_CFLAGS = \
943         $(AM_CFLAGS)
944
945 test_strv_LDADD = \
946         libsystemd-basic.la
947
948 test_login_SOURCES = \
949         src/test-login.c
950
951 test_login_CFLAGS = \
952         $(AM_CFLAGS)
953
954 test_login_LDADD = \
955         libsystemd-basic.la \
956         libsystemd-login.la
957
958 test_install_SOURCES = \
959         src/test-install.c \
960         src/install.c \
961         src/path-lookup.c \
962         src/unit-name.c
963
964 test_install_CFLAGS = \
965         $(AM_CFLAGS) \
966         $(DBUS_CFLAGS)
967
968 test_install_LDADD = \
969         libsystemd-basic.la
970
971 test_id128_SOURCES = \
972         src/test-id128.c \
973         src/sd-id128.c
974
975 test_id128_CFLAGS = \
976         $(AM_CFLAGS)
977
978 test_id128_LDADD = \
979         libsystemd-basic.la
980
981 test_journal_SOURCES = \
982         src/journal/test-journal.c \
983         src/journal/sd-journal.c \
984         src/journal/journal-file.c \
985         src/journal/lookup3.c \
986         src/journal/journal-send.c \
987         src/sd-id128.c
988
989 test_journal_CFLAGS = \
990         $(AM_CFLAGS)
991
992 test_journal_LDADD = \
993         libsystemd-basic.la
994
995 systemd_journald_SOURCES = \
996         src/journal/journald.c \
997         src/journal/sd-journal.c \
998         src/journal/journal-file.c \
999         src/journal/lookup3.c \
1000         src/sd-id128.c \
1001         src/acl-util.c \
1002         src/cgroup-util.c
1003
1004 systemd_journald_CFLAGS = \
1005         $(AM_CFLAGS) \
1006         $(ACL_CFLAGS)
1007
1008 systemd_journald_LDADD = \
1009         libsystemd-basic.la \
1010         libsystemd-daemon.la \
1011         $(ACL_LIBS)
1012
1013 systemd_journalctl_SOURCES = \
1014         src/journal/journalctl.c \
1015         src/journal/sd-journal.c \
1016         src/journal/journal-file.c \
1017         src/journal/lookup3.c \
1018         src/sd-id128.c
1019
1020 systemd_journalctl_CFLAGS = \
1021         $(AM_CFLAGS)
1022
1023 systemd_journalctl_LDADD = \
1024         libsystemd-basic.la
1025
1026 systemd_stdout_syslog_bridge_SOURCES = \
1027         src/stdout-syslog-bridge.c \
1028         src/tcpwrap.c
1029
1030 systemd_stdout_syslog_bridge_LDADD = \
1031         libsystemd-basic.la \
1032         libsystemd-daemon.la \
1033         $(LIBWRAP_LIBS)
1034
1035 systemd_initctl_SOURCES = \
1036         src/initctl.c \
1037         src/dbus-common.c
1038
1039 systemd_initctl_CFLAGS = \
1040         $(AM_CFLAGS) \
1041         $(DBUS_CFLAGS)
1042
1043 systemd_initctl_LDADD = \
1044         libsystemd-basic.la \
1045         libsystemd-daemon.la \
1046         $(DBUS_LIBS)
1047
1048 systemd_update_utmp_SOURCES = \
1049         src/update-utmp.c \
1050         src/dbus-common.c \
1051         src/utmp-wtmp.c
1052
1053 systemd_update_utmp_CFLAGS = \
1054         $(AM_CFLAGS) \
1055         $(DBUS_CFLAGS) \
1056         $(AUDIT_CFLAGS)
1057
1058 systemd_update_utmp_LDADD = \
1059         libsystemd-basic.la \
1060         $(DBUS_LIBS) \
1061         $(AUDIT_LIBS)
1062
1063 systemd_random_seed_SOURCES = \
1064         src/random-seed.c
1065
1066 systemd_random_seed_CFLAGS = \
1067         $(AM_CFLAGS)
1068
1069 systemd_random_seed_LDADD = \
1070         libsystemd-basic.la
1071
1072 systemd_shutdownd_SOURCES = \
1073         src/utmp-wtmp.c \
1074         src/shutdownd.c
1075
1076 systemd_shutdownd_CFLAGS = \
1077         $(AM_CFLAGS)
1078
1079 systemd_shutdownd_LDADD = \
1080         libsystemd-basic.la \
1081         libsystemd-daemon.la
1082
1083 systemd_hostnamed_SOURCES = \
1084         src/hostnamed.c \
1085         src/dbus-common.c \
1086         src/polkit.c
1087
1088 systemd_hostnamed_CFLAGS = \
1089         $(AM_CFLAGS) \
1090         $(DBUS_CFLAGS)
1091
1092 systemd_hostnamed_LDADD = \
1093         libsystemd-basic.la \
1094         libsystemd-daemon.la \
1095         $(DBUS_LIBS)
1096
1097 systemd_localed_SOURCES = \
1098         src/localed.c \
1099         src/dbus-common.c \
1100         src/polkit.c
1101
1102 systemd_localed_CFLAGS = \
1103         $(AM_CFLAGS) \
1104         $(DBUS_CFLAGS)
1105
1106 systemd_localed_LDADD = \
1107         libsystemd-basic.la \
1108         libsystemd-daemon.la \
1109         $(DBUS_LIBS)
1110
1111 dist_pkgdata_DATA = \
1112         src/kbd-model-map
1113
1114 dist_noinst_SCRIPT = \
1115         src/generate-kbd-model-map
1116
1117 systemd_timedated_SOURCES = \
1118         src/timedated.c \
1119         src/dbus-common.c \
1120         src/polkit.c
1121
1122 systemd_timedated_CFLAGS = \
1123         $(AM_CFLAGS) \
1124         $(DBUS_CFLAGS)
1125
1126 systemd_timedated_LDADD = \
1127         libsystemd-basic.la \
1128         libsystemd-daemon.la \
1129         $(DBUS_LIBS)
1130
1131 systemd_logind_SOURCES = \
1132         src/logind.c \
1133         src/logind-dbus.c \
1134         src/logind-device.c \
1135         src/logind-seat.c \
1136         src/logind-seat-dbus.c \
1137         src/logind-session.c \
1138         src/logind-session-dbus.c \
1139         src/logind-user.c \
1140         src/logind-user-dbus.c \
1141         src/dbus-common.c \
1142         src/dbus-loop.c \
1143         src/cgroup-util.c \
1144         src/polkit.c
1145
1146 nodist_systemd_logind_SOURCES = \
1147         src/logind-gperf.c
1148
1149 EXTRA_DIST += \
1150         src/logind-gperf.gperf
1151
1152 systemd_logind_CFLAGS = \
1153         $(AM_CFLAGS) \
1154         $(DBUS_CFLAGS) \
1155         $(UDEV_CFLAGS) \
1156         $(ACL_CFLAGS)
1157
1158 systemd_logind_LDADD = \
1159         libsystemd-basic.la \
1160         libsystemd-daemon.la \
1161         $(DBUS_LIBS) \
1162         $(UDEV_LIBS) \
1163         $(ACL_LIBS)
1164
1165 systemd_uaccess_SOURCES = \
1166         src/uaccess.c
1167
1168 if HAVE_ACL
1169 systemd_logind_SOURCES += \
1170         src/logind-acl.c \
1171         src/acl-util.c
1172
1173 systemd_uaccess_SOURCES += \
1174         src/logind-acl.c \
1175         src/acl-util.c
1176 endif
1177
1178 systemd_uaccess_CFLAGS = \
1179         $(AM_CFLAGS) \
1180         $(UDEV_CFLAGS) \
1181         $(ACL_CFLAGS)
1182
1183 systemd_uaccess_LDADD = \
1184         libsystemd-basic.la \
1185         libsystemd-daemon.la \
1186         libsystemd-login.la \
1187         $(UDEV_LIBS) \
1188         $(ACL_LIBS)
1189
1190 systemd_shutdown_SOURCES = \
1191         src/mount-setup.c \
1192         src/umount.c \
1193         src/shutdown.c
1194
1195 systemd_shutdown_CFLAGS = \
1196         $(AM_CFLAGS) \
1197         $(UDEV_CFLAGS)
1198
1199 systemd_shutdown_LDADD = \
1200         libsystemd-basic.la \
1201         $(UDEV_LIBS)
1202
1203 systemd_modules_load_SOURCES = \
1204         src/modules-load.c
1205
1206 systemd_modules_load_CFLAGS = \
1207         $(AM_CFLAGS)
1208
1209 systemd_modules_load_LDADD = \
1210         libsystemd-basic.la
1211
1212 systemd_tmpfiles_SOURCES = \
1213         src/tmpfiles.c
1214
1215 systemd_tmpfiles_CFLAGS = \
1216         $(AM_CFLAGS)
1217
1218 systemd_tmpfiles_LDADD = \
1219         libsystemd-basic.la
1220
1221 systemd_machine_id_setup_SOURCES = \
1222         src/machine-id-setup.c \
1223         src/machine-id-main.c \
1224         src/sd-id128.c
1225
1226 systemd_machine_id_setup_CFLAGS = \
1227         $(AM_CFLAGS)
1228
1229 systemd_machine_id_setup_LDADD = \
1230         libsystemd-basic.la
1231
1232 systemd_sysctl_SOURCES = \
1233         src/sysctl.c
1234
1235 systemd_sysctl_CFLAGS = \
1236         $(AM_CFLAGS)
1237
1238 systemd_sysctl_LDADD = \
1239         libsystemd-basic.la
1240
1241 systemd_binfmt_SOURCES = \
1242         src/binfmt.c
1243
1244 systemd_binfmt_CFLAGS = \
1245         $(AM_CFLAGS)
1246
1247 systemd_binfmt_LDADD = \
1248         libsystemd-basic.la
1249
1250 systemd_fsck_SOURCES = \
1251         src/fsck.c \
1252         src/dbus-common.c
1253
1254 systemd_fsck_CFLAGS = \
1255         $(AM_CFLAGS) \
1256         $(UDEV_CFLAGS) \
1257         $(DBUS_CFLAGS)
1258
1259 systemd_fsck_LDADD = \
1260         libsystemd-basic.la \
1261         $(UDEV_LIBS) \
1262         $(DBUS_LIBS)
1263
1264 systemd_quotacheck_SOURCES = \
1265         src/quotacheck.c
1266
1267 systemd_quotacheck_CFLAGS = \
1268         $(AM_CFLAGS)
1269
1270 systemd_quotacheck_LDADD = \
1271         libsystemd-basic.la
1272
1273 systemd_timestamp_SOURCES = \
1274         src/timestamp.c
1275
1276 systemd_timestamp_CFLAGS = \
1277         $(AM_CFLAGS)
1278
1279 systemd_timestamp_LDADD = \
1280         libsystemd-basic.la
1281
1282 systemd_ac_power_SOURCES = \
1283         src/ac-power.c
1284
1285 systemd_ac_power_CFLAGS = \
1286         $(AM_CFLAGS) \
1287         $(UDEV_CFLAGS)
1288
1289 systemd_ac_power_LDADD = \
1290         libsystemd-basic.la \
1291         $(UDEV_LIBS)
1292
1293 systemd_detect_virt_SOURCES = \
1294         src/detect-virt.c
1295
1296 systemd_detect_virt_CFLAGS = \
1297         $(AM_CFLAGS)
1298
1299 systemd_detect_virt_LDADD = \
1300         libsystemd-basic.la
1301
1302 systemd_cryptsetup_SOURCES = \
1303         src/cryptsetup.c \
1304         src/ask-password-api.c
1305
1306 systemd_cryptsetup_CFLAGS = \
1307         $(LIBCRYPTSETUP_CFLAGS) \
1308         $(UDEV_CFLAGS) \
1309         $(AM_CFLAGS)
1310
1311 systemd_cryptsetup_LDADD = \
1312         $(LIBCRYPTSETUP_LIBS) \
1313         $(UDEV_LIBS) \
1314         libsystemd-basic.la
1315
1316 systemd_cryptsetup_generator_SOURCES = \
1317         src/cryptsetup-generator.c \
1318         src/unit-name.c
1319
1320 systemd_cryptsetup_generator_CFLAGS = \
1321         $(AM_CFLAGS)
1322
1323 systemd_cryptsetup_generator_LDADD = \
1324         libsystemd-basic.la
1325
1326 systemd_getty_generator_SOURCES = \
1327         src/getty-generator.c \
1328         src/unit-name.c
1329
1330 systemd_getty_generator_CFLAGS = \
1331         $(AM_CFLAGS)
1332
1333 systemd_getty_generator_LDADD = \
1334         libsystemd-basic.la
1335
1336 systemd_user_sessions_SOURCES = \
1337         src/user-sessions.c \
1338         src/cgroup-util.c
1339
1340 systemd_user_sessions_CFLAGS = \
1341         $(AM_CFLAGS)
1342
1343 systemd_user_sessions_LDADD = \
1344         libsystemd-basic.la
1345
1346 systemd_vconsole_setup_SOURCES = \
1347         src/vconsole-setup.c
1348
1349 systemd_vconsole_setup_CFLAGS = \
1350         $(AM_CFLAGS)
1351
1352 systemd_vconsole_setup_LDADD = \
1353         libsystemd-basic.la
1354
1355 systemd_remount_api_vfs_SOURCES = \
1356         src/remount-api-vfs.c \
1357         src/mount-setup.c \
1358         src/exit-status.c
1359
1360 systemd_remount_api_vfs_CFLAGS = \
1361         $(AM_CFLAGS)
1362
1363 systemd_remount_api_vfs_LDADD = \
1364         libsystemd-basic.la
1365
1366 systemd_cgroups_agent_SOURCES = \
1367         src/cgroups-agent.c \
1368         src/dbus-common.c
1369
1370 systemd_cgroups_agent_CFLAGS = \
1371         $(AM_CFLAGS) \
1372         $(DBUS_CFLAGS)
1373
1374 systemd_cgroups_agent_LDADD = \
1375         libsystemd-basic.la \
1376         $(DBUS_LIBS)
1377
1378 systemd_kmsg_syslogd_SOURCES = \
1379         src/kmsg-syslogd.c \
1380         src/fdset.c
1381
1382 systemd_kmsg_syslogd_CFLAGS = \
1383         $(AM_CFLAGS)
1384
1385 systemd_kmsg_syslogd_LDADD = \
1386         libsystemd-basic.la \
1387         libsystemd-daemon.la
1388
1389 systemctl_SOURCES = \
1390         src/systemctl.c \
1391         src/utmp-wtmp.c \
1392         src/dbus-common.c \
1393         src/path-lookup.c \
1394         src/cgroup-show.c \
1395         src/cgroup-util.c \
1396         src/exit-status.c \
1397         src/unit-name.c \
1398         src/pager.c \
1399         src/install.c \
1400         src/spawn-agent.c
1401
1402 systemctl_CFLAGS = \
1403         $(AM_CFLAGS) \
1404         $(DBUS_CFLAGS)
1405
1406 systemctl_LDADD = \
1407         libsystemd-basic.la \
1408         libsystemd-daemon.la \
1409         $(DBUS_LIBS)
1410
1411 systemd_loginctl_SOURCES = \
1412         src/loginctl.c \
1413         src/dbus-common.c \
1414         src/cgroup-show.c \
1415         src/cgroup-util.c \
1416         src/pager.c \
1417         src/sysfs-show.c
1418
1419 systemd_loginctl_CFLAGS = \
1420         $(AM_CFLAGS) \
1421         $(DBUS_CFLAGS) \
1422         $(UDEV_CFLAGS)
1423
1424 systemd_loginctl_LDADD = \
1425         libsystemd-basic.la \
1426         $(DBUS_LIBS) \
1427         $(UDEV_LIBS)
1428
1429 systemd_notify_SOURCES = \
1430         src/notify.c \
1431         src/sd-readahead.c
1432
1433 systemd_notify_LDADD = \
1434         libsystemd-basic.la \
1435         libsystemd-daemon.la
1436
1437 systemd_ask_password_SOURCES = \
1438         src/ask-password.c \
1439         src/ask-password-api.c
1440
1441 systemd_ask_password_LDADD = \
1442         libsystemd-basic.la
1443
1444 systemd_reply_password_SOURCES = \
1445         src/reply-password.c
1446
1447 systemd_reply_password_LDADD = \
1448         libsystemd-basic.la
1449
1450 systemd_readahead_collect_SOURCES = \
1451         src/readahead-collect.c \
1452         src/readahead-common.c
1453
1454 systemd_readahead_collect_CFLAGS = \
1455         $(UDEV_CFLAGS)
1456
1457 systemd_readahead_collect_LDADD = \
1458         libsystemd-basic.la \
1459         libsystemd-daemon.la \
1460         $(UDEV_LIBS)
1461
1462 systemd_readahead_replay_SOURCES = \
1463         src/readahead-replay.c \
1464         src/readahead-common.c
1465
1466 systemd_readahead_replay_CFLAGS = \
1467         $(UDEV_CFLAGS)
1468
1469 systemd_readahead_replay_LDADD = \
1470         libsystemd-basic.la \
1471         libsystemd-daemon.la \
1472         $(UDEV_LIBS)
1473
1474 systemd_cgls_SOURCES = \
1475         src/cgls.c \
1476         src/cgroup-show.c \
1477         src/cgroup-util.c \
1478         src/pager.c
1479
1480 systemd_cgls_CFLAGS = \
1481         $(AM_CFLAGS)
1482
1483 systemd_cgls_LDADD = \
1484         libsystemd-basic.la
1485
1486 systemd_nspawn_SOURCES = \
1487         src/nspawn.c \
1488         src/cgroup-util.c \
1489         src/loopback-setup.c
1490
1491 systemd_nspawn_CFLAGS = \
1492         $(AM_CFLAGS)
1493
1494 systemd_nspawn_LDADD = \
1495         libsystemd-basic.la \
1496         libsystemd-daemon.la
1497
1498 systemd_stdio_bridge_SOURCES = \
1499         src/bridge.c
1500
1501 systemd_stdio_bridge_LDADD = \
1502         libsystemd-basic.la
1503
1504 systemadm_SOURCES = \
1505         src/systemadm.vala \
1506         src/systemd-interfaces.vala \
1507         src/wraplabel.vala
1508
1509 systemadm_CFLAGS = \
1510         $(AM_CFLAGS) \
1511         $(GTK_CFLAGS) \
1512         -Wno-unused-variable \
1513         -Wno-unused-function \
1514         -Wno-shadow \
1515         -Wno-format-nonliteral
1516
1517 systemadm_VALAFLAGS = \
1518         --pkg=posix \
1519         --pkg=gtk+-2.0 \
1520         --pkg=gee-1.0 \
1521         -g
1522
1523 systemadm_LDADD = \
1524         $(GTK_LIBS)
1525
1526 systemd_gnome_ask_password_agent_SOURCES = \
1527         src/gnome-ask-password-agent.vala
1528
1529 systemd_gnome_ask_password_agent_CFLAGS = \
1530         $(AM_CFLAGS) \
1531         $(LIBNOTIFY_CFLAGS) \
1532         $(GTK_CFLAGS) \
1533         -Wno-unused-variable \
1534         -Wno-unused-function \
1535         -Wno-shadow \
1536         -Wno-format-nonliteral
1537
1538 systemd_gnome_ask_password_agent_VALAFLAGS = \
1539         --pkg=posix \
1540         --pkg=gtk+-2.0 \
1541         --pkg=linux \
1542         --pkg=gio-unix-2.0 \
1543         --pkg=libnotify
1544 if LIBNOTIFY07
1545 systemd_gnome_ask_password_agent_VALAFLAGS += \
1546         -D LIBNOTIFY07
1547 endif
1548 systemd_gnome_ask_password_agent_VALAFLAGS += \
1549         -g
1550
1551 systemd_gnome_ask_password_agent_LDADD = \
1552         $(LIBNOTIFY_LIBS) \
1553         $(GTK_LIBS)
1554
1555 systemd_tty_ask_password_agent_SOURCES = \
1556         src/tty-ask-password-agent.c \
1557         src/ask-password-api.c \
1558         src/utmp-wtmp.c
1559
1560 systemd_tty_ask_password_agent_LDADD = \
1561         libsystemd-basic.la
1562
1563 pam_systemd_la_SOURCES = \
1564         src/pam-module.c \
1565         src/dbus-common.c
1566
1567 pam_systemd_la_CFLAGS = \
1568         $(AM_CFLAGS) \
1569         $(PAM_CFLAGS) \
1570         $(DBUS_CFLAGS) \
1571         -fvisibility=hidden
1572
1573 pam_systemd_la_LDFLAGS = \
1574         -module \
1575         -export-dynamic \
1576         -avoid-version \
1577         -shared \
1578         -export-symbols-regex '^pam_sm_.*'
1579
1580 pam_systemd_la_LIBADD = \
1581         libsystemd-basic.la \
1582         libsystemd-daemon.la \
1583         $(PAM_LIBS) \
1584         $(DBUS_LIBS)
1585
1586 libsystemd_daemon_la_SOURCES = \
1587         src/sd-daemon.c
1588
1589 libsystemd_daemon_la_CFLAGS = \
1590         $(AM_CFLAGS) \
1591         -fvisibility=hidden \
1592         -DSD_EXPORT_SYMBOLS
1593
1594 libsystemd_daemon_la_LDFLAGS = \
1595         -shared \
1596         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1597         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym
1598
1599 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1600 libsystemd-daemon-install-hook:
1601         if test "$(libdir)" != "$(rootlibdir)"; then \
1602                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1603                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1604                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1605                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1606                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1607         fi
1608
1609 libsystemd-daemon-uninstall-hook:
1610         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1611
1612 libsystemd_login_la_SOURCES = \
1613         src/sd-login.c \
1614         src/cgroup-util.c
1615
1616 libsystemd_login_la_CFLAGS = \
1617         $(AM_CFLAGS) \
1618         -fvisibility=hidden
1619
1620 libsystemd_login_la_LDFLAGS = \
1621         -shared \
1622         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
1623         -Wl,--version-script=$(top_srcdir)/src/libsystemd-login.sym
1624
1625 libsystemd_login_la_LIBADD = \
1626         libsystemd-basic.la
1627
1628 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1629 libsystemd-login-install-hook:
1630         if test "$(libdir)" != "$(rootlibdir)"; then \
1631                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1632                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.so) && \
1633                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1634                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-login.so && \
1635                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
1636         fi
1637
1638 libsystemd-login-uninstall-hook:
1639         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
1640
1641 SED_PROCESS = \
1642         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1643         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
1644                 -e 's,@rootbindir\@,$(rootbindir),g' \
1645                 -e 's,@bindir\@,$(bindir),g' \
1646                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
1647                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
1648                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
1649                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
1650                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
1651                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
1652                 -e 's,@userunitdir\@,$(userunitdir),g' \
1653                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
1654                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
1655                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
1656                 -e 's,@prefix\@,$(prefix),g' \
1657                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
1658                 -e 's,@libdir\@,$(libdir),g' \
1659                 -e 's,@includedir\@,$(includedir),g' \
1660                 < $< > $@ || rm $@
1661
1662 units/%: units/%.in Makefile
1663         $(SED_PROCESS)
1664
1665 man/%: man/%.in Makefile
1666         $(SED_PROCESS)
1667
1668 %.pc: %.pc.in Makefile
1669         $(SED_PROCESS)
1670
1671 src/%.policy.in: src/%.policy.in.in Makefile
1672         $(SED_PROCESS)
1673
1674 src/%.rules: src/%.rules.in Makefile
1675         $(SED_PROCESS)
1676
1677 src/%.c: src/%.gperf
1678         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1679         $(GPERF) < $< > $@
1680
1681 src/%: src/%.m4
1682         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1683         $(M4) -P $(M4_DEFINES) < $< > $@ || rm $@
1684
1685 src/load-fragment-gperf-nulstr.c: src/load-fragment-gperf.gperf
1686         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1687         $(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 ";" }' < $< > $@ || rm $@
1688
1689 M4_PROCESS_SYSTEM = \
1690         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1691         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ || rm $@
1692
1693 M4_PROCESS_USER = \
1694         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1695         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@ || rm $@
1696
1697 units/%: units/%.m4 Makefile
1698         $(M4_PROCESS_SYSTEM)
1699
1700 units/user/%: units/%.m4 Makefile
1701         $(M4_PROCESS_USER)
1702
1703 CLEANFILES = \
1704         $(nodist_systemunit_DATA) \
1705         $(nodist_userunit_DATA) \
1706         $(nodist_man_MANS) \
1707         ${XML_IN_FILES:.xml.in=.html} \
1708         $(pkgconfigdata_DATA) \
1709         $(pkgconfiglib_DATA) \
1710         $(nodist_polkitpolicy_DATA) \
1711         src/73-seat-late.rules \
1712         src/99-systemd.rules \
1713         src/load-fragment-gperf.gperf \
1714         src/load-fragment-gperf.c \
1715         src/load-fragment-gperf-nulstr.c \
1716         src/logind-gperf.c
1717
1718 if HAVE_VALAC
1719 CLEANFILES += \
1720         ${systemadm_SOURCES:.vala=.c}
1721 endif
1722
1723 if HAVE_XSLTPROC
1724 XSLTPROC_FLAGS = \
1725         --nonet \
1726         --param funcsynopsis.style "'ansi'"
1727
1728 XSLTPROC_PROCESS_MAN = \
1729         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1730         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1731
1732 XSLTPROC_PROCESS_MAN_IN = \
1733         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1734         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
1735         mv ${@:.in=} $@
1736
1737 XSLTPROC_PROCESS_HTML = \
1738         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1739         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
1740
1741 XSLTPROC_PROCESS_HTML_IN = \
1742         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1743         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
1744         mv ${@:.in=} $@
1745
1746 man/%.1: man/%.xml
1747         $(XSLTPROC_PROCESS_MAN)
1748
1749 man/%.1.in: man/%.xml.in
1750         $(XSLTPROC_PROCESS_MAN)
1751
1752 man/%.3: man/%.xml
1753         $(XSLTPROC_PROCESS_MAN)
1754
1755 man/%.3.in: man/%.xml.in
1756         $(XSLTPROC_PROCESS_MAN)
1757
1758 man/%.5: man/%.xml
1759         $(XSLTPROC_PROCESS_MAN)
1760
1761 man/%.5.in: man/%.xml.in
1762         $(XSLTPROC_PROCESS_MAN)
1763
1764 man/%.7: man/%.xml
1765         $(XSLTPROC_PROCESS_MAN)
1766
1767 man/%.7.in: man/%.xml.in
1768         $(XSLTPROC_PROCESS_MAN_IN)
1769
1770 man/%.8: man/%.xml
1771         $(XSLTPROC_PROCESS_MAN)
1772
1773 man/%.8.in: man/%.xml.in
1774         $(XSLTPROC_PROCESS_MAN_IN)
1775
1776 man/%.html: man/%.xml
1777         $(XSLTPROC_PROCESS_HTML)
1778
1779 man/%.html.in: man/%.xml.in
1780         $(XSLTPROC_PROCESS_HTML_IN)
1781
1782 CLEANFILES += \
1783         $(dist_man_MANS) \
1784         ${nodist_man_MANS:=.in} \
1785         ${XML_FILES:.xml=.html} \
1786         ${XML_IN_FILES:.xml.in=.html.in}
1787 endif
1788
1789 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
1790
1791 org.freedesktop.systemd1.%.xml: systemd
1792         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1793                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1794                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1795
1796 org.freedesktop.hostname1.xml: systemd-hostnamed
1797         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
1798                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1799                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1800
1801 org.freedesktop.locale1.xml: systemd-localed
1802         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
1803                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1804                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1805
1806 org.freedesktop.timedate1.xml: systemd-timedated
1807         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
1808                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1809                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1810
1811 CLEANFILES += \
1812         $(dbusinterface_DATA)
1813
1814 install-data-hook:
1815         $(MKDIR_P) -m 0755 \
1816                 $(DESTDIR)$(tmpfilesdir) \
1817                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
1818                 $(DESTDIR)$(prefix)/lib/modules-load.d \
1819                 $(DESTDIR)$(sysconfdir)/modules-load.d \
1820                 $(DESTDIR)$(prefix)/lib/sysctl.d \
1821                 $(DESTDIR)$(sysconfdir)/sysctl.d \
1822                 $(DESTDIR)$(systemshutdowndir) \
1823                 $(DESTDIR)$(systemgeneratordir) \
1824                 $(DESTDIR)$(usergeneratordir)
1825 if ENABLE_BINFMT
1826         $(MKDIR_P) -m 0755 \
1827                 $(DESTDIR)$(prefix)/lib/binfmt.d \
1828                 $(DESTDIR)$(sysconfdir)/binfmt.d
1829 endif
1830         $(MKDIR_P) -m 0755 \
1831                 $(DESTDIR)$(systemunitdir) \
1832                 $(DESTDIR)$(userunitdir) \
1833                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
1834                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1835                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
1836                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1837                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
1838                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
1839                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
1840                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
1841                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
1842                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
1843                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
1844                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
1845                 $(DESTDIR)$(pkgsysconfdir)/system \
1846                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
1847                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
1848                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
1849                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
1850                 $(DESTDIR)$(pkgsysconfdir)/user \
1851                 $(DESTDIR)$(dbussessionservicedir) \
1852                 $(DESTDIR)$(sysconfdir)/xdg/systemd
1853         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
1854                 rm -f user && \
1855                 $(LN_S) $(pkgsysconfdir)/user user )
1856         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1857                 rm -f systemd-initctl.socket systemd-stdout-syslog-bridge.socket systemd-shutdownd.socket syslog.socket && \
1858                 $(LN_S) ../systemd-stdout-syslog-bridge.socket systemd-stdout-syslog-bridge.socket && \
1859                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
1860                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
1861                 $(LN_S) ../syslog.socket syslog.socket )
1862         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
1863                 rm -f systemd-update-utmp-runlevel.service && \
1864                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1865         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
1866                 rm -f systemd-update-utmp-runlevel.service && \
1867                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1868         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
1869                 rm -f systemd-update-utmp-runlevel.service && \
1870                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1871         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
1872                 rm -f systemd-update-utmp-runlevel.service && \
1873                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1874         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
1875                 rm -f systemd-update-utmp-runlevel.service && \
1876                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1877         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1878                 rm -f systemd-update-utmp-shutdown.service \
1879                         systemd-random-seed-save.service && \
1880                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
1881                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1882         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1883                 rm -f systemd-remount-api-vfs.service \
1884                         fsck-root.service \
1885                         remount-rootfs.service \
1886                         var-run.mount \
1887                         media.mount && \
1888                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1889                 $(LN_S) ../fsck-root.service fsck-root.service && \
1890                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1891                 $(LN_S) ../var-run.mount var-run.mount && \
1892                 $(LN_S) ../media.mount media.mount )
1893         ( cd $(DESTDIR)$(userunitdir) && \
1894                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
1895                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1896                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1897                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1898                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
1899                 $(LN_S) $(systemunitdir)/sound.target sound.target )
1900         ( cd $(DESTDIR)$(systemunitdir) && \
1901                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1902                 $(LN_S) poweroff.target runlevel0.target && \
1903                 $(LN_S) rescue.target runlevel1.target && \
1904                 $(LN_S) multi-user.target runlevel2.target && \
1905                 $(LN_S) multi-user.target runlevel3.target && \
1906                 $(LN_S) multi-user.target runlevel4.target && \
1907                 $(LN_S) graphical.target runlevel5.target && \
1908                 $(LN_S) reboot.target runlevel6.target )
1909         ( cd $(DESTDIR)$(systemunitdir) && \
1910                 rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.login1.service autovt@.service && \
1911                 $(LN_S) graphical.target default.target && \
1912                 $(LN_S) reboot.target ctrl-alt-del.target && \
1913                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
1914                 $(LN_S) getty@.service autovt@.service )
1915         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1916                 rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path systemd-logind.service && \
1917                 $(LN_S) ../getty.target getty.target && \
1918                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
1919                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path && \
1920                 $(LN_S) ../systemd-logind.service systemd-logind.service )
1921         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1922                 rm -f getty@tty1.service && \
1923                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
1924         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1925                 rm -f remote-fs.target && \
1926                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1927         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1928                 rm -f dev-hugepages.mount \
1929                         dev-mqueue.mount \
1930                         sys-kernel-config.mount \
1931                         sys-kernel-debug.mount \
1932                         sys-kernel-security.mount \
1933                         sys-fs-fuse-connections.mount \
1934                         systemd-vconsole-setup.service \
1935                         systemd-modules-load.service \
1936                         systemd-random-seed-load.service \
1937                         systemd-tmpfiles-setup.service \
1938                         systemd-sysctl.service \
1939                         systemd-ask-password-console.path \
1940                         systemd-kmsg-syslogd.service \
1941                         cryptsetup.target && \
1942                 $(LN_S) ../dev-hugepages.mount dev-hugepages.mount && \
1943                 $(LN_S) ../dev-mqueue.mount dev-mqueue.mount && \
1944                 $(LN_S) ../sys-kernel-config.mount sys-kernel-config.mount && \
1945                 $(LN_S) ../sys-kernel-debug.mount sys-kernel-debug.mount && \
1946                 $(LN_S) ../sys-kernel-security.mount sys-kernel-security.mount && \
1947                 $(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
1948                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1949                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1950                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1951                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
1952                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
1953                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
1954                 $(LN_S) ../systemd-kmsg-syslogd.service && \
1955                 $(LN_S) ../cryptsetup.target cryptsetup.target )
1956 if ENABLE_BINFMT
1957         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1958                 rm -f systemd-binfmt.service \
1959                         proc-sys-fs-binfmt_misc.automount && \
1960                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
1961                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
1962 endif
1963 if ENABLE_HOSTNAMED
1964         ( cd $(DESTDIR)$(systemunitdir) && \
1965                 rm -f dbus-org.freedesktop.hostname1.service && \
1966                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
1967 endif
1968 if ENABLE_TIMEDATED
1969         ( cd $(DESTDIR)$(systemunitdir) && \
1970                 rm -f dbus-org.freedesktop.timedate1.service  && \
1971                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
1972 endif
1973 if ENABLE_LOCALED
1974         ( cd $(DESTDIR)$(systemunitdir) && \
1975                 rm -f dbus-org.freedesktop.locale1.service && \
1976                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
1977 endif
1978         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1979                 rm -f systemd-tmpfiles-clean.timer && \
1980                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
1981         ( cd $(DESTDIR)$(dbussessionservicedir) && \
1982                 rm -f org.freedesktop.systemd1.service && \
1983                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
1984 if HAVE_PLYMOUTH
1985         $(MKDIR_P) -m 0755 \
1986                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
1987                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
1988                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
1989                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
1990                 $(DESTDIR)$(systemunitdir)/halt.target.wants
1991         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1992                 rm -f plymouth-start.service plymouth-read-write.service && \
1993                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
1994                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
1995         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1996                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
1997                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
1998                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
1999         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
2000                 rm -f plymouth-reboot.service && \
2001                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
2002         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
2003                 rm -f plymouth-kexec.service && \
2004                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
2005         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
2006                 rm -f plymouth-poweroff.service && \
2007                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
2008         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
2009                 rm -f plymouth-halt.service && \
2010                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
2011 endif
2012 if TARGET_MEEGO
2013         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2014         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2015                 rm -f network.target && \
2016                 $(LN_S) $(systemunitdir)/network.target network.target )
2017         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
2018                 rm -f * )
2019         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
2020                 rm -f * )
2021         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
2022                 rm -f * )
2023         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
2024                 rm -f * )
2025 endif
2026
2027 if TARGET_FEDORA
2028         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2029         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2030                 rm -f rc-local.service && \
2031                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2032         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2033                 rm -f halt-local.service && \
2034                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2035         ( cd $(DESTDIR)$(systemunitdir) && \
2036                 rm -f display-manager.service single.service && \
2037                 $(LN_S) prefdm.service display-manager.service && \
2038                 $(LN_S) rescue.service single.service )
2039         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2040                 rm -f display-manager.service && \
2041                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2042 endif
2043
2044 if TARGET_MANDRIVA
2045         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2046         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2047                 rm -f rc-local.service && \
2048                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2049         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2050                 rm -f halt-local.service && \
2051                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2052         ( cd $(DESTDIR)$(systemunitdir) && \
2053                 rm -f display-manager.service dm.service single.service && \
2054                 $(LN_S) prefdm.service display-manager.service && \
2055                 $(LN_S) prefdm.service dm.service && \
2056                 $(LN_S) rescue.service single.service )
2057         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2058                 rm -f display-manager.service && \
2059                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2060 endif
2061
2062 if TARGET_DEBIAN_OR_UBUNTU
2063         ( cd $(DESTDIR)$(systemunitdir) && \
2064                 rm -f runlevel5.target && \
2065                 $(LN_S) multi-user.target runlevel5.target )
2066 endif
2067
2068 if TARGET_SUSE
2069         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2070         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2071                 rm -f rc-local.service && \
2072                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2073         ( cd $(DESTDIR)$(systemunitdir) && \
2074                 rm -f local.service && \
2075                 $(LN_S) rc-local.service local.service )
2076         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2077                 rm -f halt-local.service && \
2078                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2079 endif
2080
2081 if TARGET_MAGEIA
2082         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2083         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2084                 rm -f rc-local.service && \
2085                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2086         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2087                 rm -f halt-local.service && \
2088                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2089         ( cd $(DESTDIR)$(systemunitdir) && \
2090                 rm -f display-manager.service && \
2091                 $(LN_S) prefdm.service display-manager.service && \
2092                 $(LN_S) prefdm.service dm.service )
2093         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2094                 rm -f display-manager.service && \
2095                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2096 endif
2097
2098 if HAVE_SYSV_COMPAT
2099         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
2100                 rm -f var-lock.mount && \
2101                 $(LN_S) ../var-lock.mount var-lock.mount )
2102 endif
2103
2104 install-exec-hook: libsystemd-daemon-install-hook libsystemd-login-install-hook
2105
2106 uninstall-hook: libsystemd-daemon-uninstall-hook libsystemd-login-uninstall-hook
2107
2108 DISTCHECK_CONFIGURE_FLAGS = \
2109         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
2110         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
2111         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
2112         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
2113         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
2114         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
2115         --with-rootdir=$$dc_install_base/$(rootdir)
2116
2117 upload: all distcheck
2118         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
2119         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
2120         scp man/*.html tango:public/systemd-man/
2121
2122 git-tag:
2123         git tag "v$(VERSION)" -m "systemd $(VERSION)"
2124
2125 update-kbd-model-map:
2126         src/generate-kbd-model-map > src/kbd-model-map