chiark / gitweb /
907ecb4f7c151e541989ee705a6a29f8f1b4fc4c
[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/sd_pid_get_session.3 \
835         man/sd_uid_get_state.3 \
836         man/sd_session_is_active.3 \
837         man/sd_seat_get_active.3 \
838         man/sd_get_seats.3 \
839         man/sd_login_monitor_new.3 \
840         man/init.1
841
842 man/reboot.8: man/halt.8
843 man/poweroff.8: man/halt.8
844 man/sd_is_socket.3: man/sd_is_fifo.3
845 man/sd_is_socket_unix.3: man/sd_is_fifo.3
846 man/sd_is_socket_inet.3: man/sd_is_fifo.3
847 man/sd_is_mq.3: man/sd_is_fifo.3
848 man/sd_notifyf.3: man/sd_notify.3
849 man/init.1: man/systemd.1
850 man/sd_session_get_uid.3: man/sd_session_is_active.3
851 man/sd_session_get_seat.3: man/sd_session_is_active.3
852 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3
853 man/sd_uid_is_on_seat.3: man/sd_uid_get_state.3
854 man/sd_uid_get_sessions.3: man/sd_uid_get_state.3
855 man/sd_uid_get_seats.3: man/sd_uid_get_state.3
856 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
857 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
858 man/sd_get_sessions.3: man/sd_get_seats.3
859 man/sd_get_uids.3: man/sd_get_seats.3
860 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
861 man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
862 man/sd_login_monitor_get_fd.3: man/sd_login_monitor_new.3
863
864 dist_man_MANS = \
865         $(MANPAGES) \
866         $(MANPAGES_ALIAS)
867
868 nodist_man_MANS = \
869         man/systemd.special.7
870
871 XML_FILES = \
872         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
873
874 XML_IN_FILES = \
875         ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
876
877 dist_noinst_DATA = \
878         ${XML_FILES:.xml=.html}
879
880 nodist_noinst_DATA = \
881         ${XML_IN_FILES:.xml.in=.html}
882
883 EXTRA_DIST += \
884         $(XML_FILES) \
885         $(XML_IN_FILES) \
886         ${nodist_man_MANS:=.in} \
887         ${XML_IN_FILES:.xml.in=.html.in}
888
889 systemd_SOURCES = \
890         src/main.c
891
892 systemd_CFLAGS = \
893         $(AM_CFLAGS) \
894         $(DBUS_CFLAGS) \
895         $(UDEV_CFLAGS)
896
897 systemd_LDADD = \
898         libsystemd-core.la
899
900 test_engine_SOURCES = \
901         src/test-engine.c
902
903 test_engine_CFLAGS = $(systemd_CFLAGS)
904 test_engine_LDADD = $(systemd_LDADD)
905
906 test_job_type_SOURCES = \
907         src/test-job-type.c
908
909 test_job_type_CFLAGS = $(systemd_CFLAGS)
910 test_job_type_LDADD = $(systemd_LDADD)
911
912 test_ns_SOURCES = \
913         src/test-ns.c
914
915 test_ns_CFLAGS = $(systemd_CFLAGS)
916 test_ns_LDADD = $(systemd_LDADD)
917
918 test_loopback_SOURCES = \
919         src/test-loopback.c \
920         src/loopback-setup.c
921
922 test_loopback_LDADD = \
923         libsystemd-basic.la
924
925 test_hostname_SOURCES = \
926         src/test-hostname.c \
927         src/hostname-setup.c
928
929 test_hostname_LDADD = \
930         libsystemd-basic.la
931
932 test_daemon_SOURCES = \
933         src/test-daemon.c
934
935 test_daemon_LDADD = \
936         libsystemd-basic.la \
937         libsystemd-daemon.la
938
939 test_cgroup_SOURCES = \
940         src/test-cgroup.c \
941         src/cgroup-util.c
942
943 test_cgroup_CFLAGS = \
944         $(AM_CFLAGS)
945
946 test_cgroup_LDADD = \
947         libsystemd-basic.la
948
949 test_env_replace_SOURCES = \
950         src/test-env-replace.c
951
952 test_env_replace_CFLAGS = \
953         $(AM_CFLAGS)
954
955 test_env_replace_LDADD = \
956         libsystemd-basic.la
957
958 test_strv_SOURCES = \
959         src/test-strv.c \
960         src/specifier.c
961
962 test_strv_CFLAGS = \
963         $(AM_CFLAGS)
964
965 test_strv_LDADD = \
966         libsystemd-basic.la
967
968 test_login_SOURCES = \
969         src/test-login.c
970
971 test_login_CFLAGS = \
972         $(AM_CFLAGS)
973
974 test_login_LDADD = \
975         libsystemd-basic.la \
976         libsystemd-login.la
977
978 test_install_SOURCES = \
979         src/test-install.c \
980         src/install.c \
981         src/path-lookup.c \
982         src/unit-name.c
983
984 test_install_CFLAGS = \
985         $(AM_CFLAGS) \
986         $(DBUS_CFLAGS)
987
988 test_install_LDADD = \
989         libsystemd-basic.la
990
991 test_id128_SOURCES = \
992         src/test-id128.c \
993         src/sd-id128.c
994
995 test_id128_CFLAGS = \
996         $(AM_CFLAGS)
997
998 test_id128_LDADD = \
999         libsystemd-basic.la
1000
1001 test_journal_SOURCES = \
1002         src/journal/test-journal.c \
1003         src/journal/sd-journal.c \
1004         src/journal/journal-file.c \
1005         src/journal/lookup3.c \
1006         src/journal/journal-send.c \
1007         src/sd-id128.c
1008
1009 test_journal_CFLAGS = \
1010         $(AM_CFLAGS)
1011
1012 test_journal_LDADD = \
1013         libsystemd-basic.la
1014
1015 systemd_journald_SOURCES = \
1016         src/journal/journald.c \
1017         src/journal/sd-journal.c \
1018         src/journal/journal-file.c \
1019         src/journal/lookup3.c \
1020         src/sd-id128.c \
1021         src/acl-util.c \
1022         src/cgroup-util.c
1023
1024 systemd_journald_CFLAGS = \
1025         $(AM_CFLAGS) \
1026         $(ACL_CFLAGS)
1027
1028 systemd_journald_LDADD = \
1029         libsystemd-basic.la \
1030         libsystemd-daemon.la \
1031         $(ACL_LIBS)
1032
1033 systemd_journalctl_SOURCES = \
1034         src/journal/journalctl.c \
1035         src/journal/sd-journal.c \
1036         src/journal/journal-file.c \
1037         src/journal/lookup3.c \
1038         src/sd-id128.c
1039
1040 systemd_journalctl_CFLAGS = \
1041         $(AM_CFLAGS)
1042
1043 systemd_journalctl_LDADD = \
1044         libsystemd-basic.la
1045
1046 systemd_stdout_syslog_bridge_SOURCES = \
1047         src/stdout-syslog-bridge.c \
1048         src/tcpwrap.c
1049
1050 systemd_stdout_syslog_bridge_LDADD = \
1051         libsystemd-basic.la \
1052         libsystemd-daemon.la \
1053         $(LIBWRAP_LIBS)
1054
1055 systemd_initctl_SOURCES = \
1056         src/initctl.c \
1057         src/dbus-common.c
1058
1059 systemd_initctl_CFLAGS = \
1060         $(AM_CFLAGS) \
1061         $(DBUS_CFLAGS)
1062
1063 systemd_initctl_LDADD = \
1064         libsystemd-basic.la \
1065         libsystemd-daemon.la \
1066         $(DBUS_LIBS)
1067
1068 systemd_update_utmp_SOURCES = \
1069         src/update-utmp.c \
1070         src/dbus-common.c \
1071         src/utmp-wtmp.c
1072
1073 systemd_update_utmp_CFLAGS = \
1074         $(AM_CFLAGS) \
1075         $(DBUS_CFLAGS) \
1076         $(AUDIT_CFLAGS)
1077
1078 systemd_update_utmp_LDADD = \
1079         libsystemd-basic.la \
1080         $(DBUS_LIBS) \
1081         $(AUDIT_LIBS)
1082
1083 systemd_random_seed_SOURCES = \
1084         src/random-seed.c
1085
1086 systemd_random_seed_CFLAGS = \
1087         $(AM_CFLAGS)
1088
1089 systemd_random_seed_LDADD = \
1090         libsystemd-basic.la
1091
1092 systemd_shutdownd_SOURCES = \
1093         src/utmp-wtmp.c \
1094         src/shutdownd.c
1095
1096 systemd_shutdownd_CFLAGS = \
1097         $(AM_CFLAGS)
1098
1099 systemd_shutdownd_LDADD = \
1100         libsystemd-basic.la \
1101         libsystemd-daemon.la
1102
1103 systemd_hostnamed_SOURCES = \
1104         src/hostnamed.c \
1105         src/dbus-common.c \
1106         src/polkit.c
1107
1108 systemd_hostnamed_CFLAGS = \
1109         $(AM_CFLAGS) \
1110         $(DBUS_CFLAGS)
1111
1112 systemd_hostnamed_LDADD = \
1113         libsystemd-basic.la \
1114         libsystemd-daemon.la \
1115         $(DBUS_LIBS)
1116
1117 systemd_localed_SOURCES = \
1118         src/localed.c \
1119         src/dbus-common.c \
1120         src/polkit.c
1121
1122 systemd_localed_CFLAGS = \
1123         $(AM_CFLAGS) \
1124         $(DBUS_CFLAGS)
1125
1126 systemd_localed_LDADD = \
1127         libsystemd-basic.la \
1128         libsystemd-daemon.la \
1129         $(DBUS_LIBS)
1130
1131 dist_pkgdata_DATA = \
1132         src/kbd-model-map
1133
1134 dist_noinst_SCRIPT = \
1135         src/generate-kbd-model-map
1136
1137 systemd_timedated_SOURCES = \
1138         src/timedated.c \
1139         src/dbus-common.c \
1140         src/polkit.c
1141
1142 systemd_timedated_CFLAGS = \
1143         $(AM_CFLAGS) \
1144         $(DBUS_CFLAGS)
1145
1146 systemd_timedated_LDADD = \
1147         libsystemd-basic.la \
1148         libsystemd-daemon.la \
1149         $(DBUS_LIBS)
1150
1151 systemd_logind_SOURCES = \
1152         src/logind.c \
1153         src/logind-dbus.c \
1154         src/logind-device.c \
1155         src/logind-seat.c \
1156         src/logind-seat-dbus.c \
1157         src/logind-session.c \
1158         src/logind-session-dbus.c \
1159         src/logind-user.c \
1160         src/logind-user-dbus.c \
1161         src/dbus-common.c \
1162         src/dbus-loop.c \
1163         src/cgroup-util.c \
1164         src/polkit.c
1165
1166 nodist_systemd_logind_SOURCES = \
1167         src/logind-gperf.c
1168
1169 EXTRA_DIST += \
1170         src/logind-gperf.gperf
1171
1172 systemd_logind_CFLAGS = \
1173         $(AM_CFLAGS) \
1174         $(DBUS_CFLAGS) \
1175         $(UDEV_CFLAGS) \
1176         $(ACL_CFLAGS)
1177
1178 systemd_logind_LDADD = \
1179         libsystemd-basic.la \
1180         libsystemd-daemon.la \
1181         $(DBUS_LIBS) \
1182         $(UDEV_LIBS) \
1183         $(ACL_LIBS)
1184
1185 systemd_uaccess_SOURCES = \
1186         src/uaccess.c
1187
1188 if HAVE_ACL
1189 systemd_logind_SOURCES += \
1190         src/logind-acl.c \
1191         src/acl-util.c
1192
1193 systemd_uaccess_SOURCES += \
1194         src/logind-acl.c \
1195         src/acl-util.c
1196 endif
1197
1198 systemd_uaccess_CFLAGS = \
1199         $(AM_CFLAGS) \
1200         $(UDEV_CFLAGS) \
1201         $(ACL_CFLAGS)
1202
1203 systemd_uaccess_LDADD = \
1204         libsystemd-basic.la \
1205         libsystemd-daemon.la \
1206         libsystemd-login.la \
1207         $(UDEV_LIBS) \
1208         $(ACL_LIBS)
1209
1210 systemd_shutdown_SOURCES = \
1211         src/mount-setup.c \
1212         src/umount.c \
1213         src/shutdown.c
1214
1215 systemd_shutdown_CFLAGS = \
1216         $(AM_CFLAGS) \
1217         $(UDEV_CFLAGS)
1218
1219 systemd_shutdown_LDADD = \
1220         libsystemd-basic.la \
1221         $(UDEV_LIBS)
1222
1223 systemd_modules_load_SOURCES = \
1224         src/modules-load.c
1225
1226 systemd_modules_load_CFLAGS = \
1227         $(AM_CFLAGS)
1228
1229 systemd_modules_load_LDADD = \
1230         libsystemd-basic.la
1231
1232 systemd_tmpfiles_SOURCES = \
1233         src/tmpfiles.c
1234
1235 systemd_tmpfiles_CFLAGS = \
1236         $(AM_CFLAGS)
1237
1238 systemd_tmpfiles_LDADD = \
1239         libsystemd-basic.la
1240
1241 systemd_machine_id_setup_SOURCES = \
1242         src/machine-id-setup.c \
1243         src/machine-id-main.c \
1244         src/sd-id128.c
1245
1246 systemd_machine_id_setup_CFLAGS = \
1247         $(AM_CFLAGS)
1248
1249 systemd_machine_id_setup_LDADD = \
1250         libsystemd-basic.la
1251
1252 systemd_sysctl_SOURCES = \
1253         src/sysctl.c
1254
1255 systemd_sysctl_CFLAGS = \
1256         $(AM_CFLAGS)
1257
1258 systemd_sysctl_LDADD = \
1259         libsystemd-basic.la
1260
1261 systemd_binfmt_SOURCES = \
1262         src/binfmt.c
1263
1264 systemd_binfmt_CFLAGS = \
1265         $(AM_CFLAGS)
1266
1267 systemd_binfmt_LDADD = \
1268         libsystemd-basic.la
1269
1270 systemd_fsck_SOURCES = \
1271         src/fsck.c \
1272         src/dbus-common.c
1273
1274 systemd_fsck_CFLAGS = \
1275         $(AM_CFLAGS) \
1276         $(UDEV_CFLAGS) \
1277         $(DBUS_CFLAGS)
1278
1279 systemd_fsck_LDADD = \
1280         libsystemd-basic.la \
1281         $(UDEV_LIBS) \
1282         $(DBUS_LIBS)
1283
1284 systemd_quotacheck_SOURCES = \
1285         src/quotacheck.c
1286
1287 systemd_quotacheck_CFLAGS = \
1288         $(AM_CFLAGS)
1289
1290 systemd_quotacheck_LDADD = \
1291         libsystemd-basic.la
1292
1293 systemd_timestamp_SOURCES = \
1294         src/timestamp.c
1295
1296 systemd_timestamp_CFLAGS = \
1297         $(AM_CFLAGS)
1298
1299 systemd_timestamp_LDADD = \
1300         libsystemd-basic.la
1301
1302 systemd_ac_power_SOURCES = \
1303         src/ac-power.c
1304
1305 systemd_ac_power_CFLAGS = \
1306         $(AM_CFLAGS) \
1307         $(UDEV_CFLAGS)
1308
1309 systemd_ac_power_LDADD = \
1310         libsystemd-basic.la \
1311         $(UDEV_LIBS)
1312
1313 systemd_detect_virt_SOURCES = \
1314         src/detect-virt.c
1315
1316 systemd_detect_virt_CFLAGS = \
1317         $(AM_CFLAGS)
1318
1319 systemd_detect_virt_LDADD = \
1320         libsystemd-basic.la
1321
1322 systemd_cryptsetup_SOURCES = \
1323         src/cryptsetup.c \
1324         src/ask-password-api.c
1325
1326 systemd_cryptsetup_CFLAGS = \
1327         $(LIBCRYPTSETUP_CFLAGS) \
1328         $(UDEV_CFLAGS) \
1329         $(AM_CFLAGS)
1330
1331 systemd_cryptsetup_LDADD = \
1332         $(LIBCRYPTSETUP_LIBS) \
1333         $(UDEV_LIBS) \
1334         libsystemd-basic.la
1335
1336 systemd_cryptsetup_generator_SOURCES = \
1337         src/cryptsetup-generator.c \
1338         src/unit-name.c
1339
1340 systemd_cryptsetup_generator_CFLAGS = \
1341         $(AM_CFLAGS)
1342
1343 systemd_cryptsetup_generator_LDADD = \
1344         libsystemd-basic.la
1345
1346 systemd_getty_generator_SOURCES = \
1347         src/getty-generator.c \
1348         src/unit-name.c
1349
1350 systemd_getty_generator_CFLAGS = \
1351         $(AM_CFLAGS)
1352
1353 systemd_getty_generator_LDADD = \
1354         libsystemd-basic.la
1355
1356 systemd_user_sessions_SOURCES = \
1357         src/user-sessions.c \
1358         src/cgroup-util.c
1359
1360 systemd_user_sessions_CFLAGS = \
1361         $(AM_CFLAGS)
1362
1363 systemd_user_sessions_LDADD = \
1364         libsystemd-basic.la
1365
1366 systemd_vconsole_setup_SOURCES = \
1367         src/vconsole-setup.c
1368
1369 systemd_vconsole_setup_CFLAGS = \
1370         $(AM_CFLAGS)
1371
1372 systemd_vconsole_setup_LDADD = \
1373         libsystemd-basic.la
1374
1375 systemd_remount_api_vfs_SOURCES = \
1376         src/remount-api-vfs.c \
1377         src/mount-setup.c \
1378         src/exit-status.c
1379
1380 systemd_remount_api_vfs_CFLAGS = \
1381         $(AM_CFLAGS)
1382
1383 systemd_remount_api_vfs_LDADD = \
1384         libsystemd-basic.la
1385
1386 systemd_cgroups_agent_SOURCES = \
1387         src/cgroups-agent.c \
1388         src/dbus-common.c
1389
1390 systemd_cgroups_agent_CFLAGS = \
1391         $(AM_CFLAGS) \
1392         $(DBUS_CFLAGS)
1393
1394 systemd_cgroups_agent_LDADD = \
1395         libsystemd-basic.la \
1396         $(DBUS_LIBS)
1397
1398 systemd_kmsg_syslogd_SOURCES = \
1399         src/kmsg-syslogd.c \
1400         src/fdset.c
1401
1402 systemd_kmsg_syslogd_CFLAGS = \
1403         $(AM_CFLAGS)
1404
1405 systemd_kmsg_syslogd_LDADD = \
1406         libsystemd-basic.la \
1407         libsystemd-daemon.la
1408
1409 systemctl_SOURCES = \
1410         src/systemctl.c \
1411         src/utmp-wtmp.c \
1412         src/dbus-common.c \
1413         src/path-lookup.c \
1414         src/cgroup-show.c \
1415         src/cgroup-util.c \
1416         src/exit-status.c \
1417         src/unit-name.c \
1418         src/pager.c \
1419         src/install.c \
1420         src/spawn-agent.c
1421
1422 systemctl_CFLAGS = \
1423         $(AM_CFLAGS) \
1424         $(DBUS_CFLAGS)
1425
1426 systemctl_LDADD = \
1427         libsystemd-basic.la \
1428         libsystemd-daemon.la \
1429         $(DBUS_LIBS)
1430
1431 systemd_loginctl_SOURCES = \
1432         src/loginctl.c \
1433         src/dbus-common.c \
1434         src/cgroup-show.c \
1435         src/cgroup-util.c \
1436         src/pager.c \
1437         src/sysfs-show.c
1438
1439 systemd_loginctl_CFLAGS = \
1440         $(AM_CFLAGS) \
1441         $(DBUS_CFLAGS) \
1442         $(UDEV_CFLAGS)
1443
1444 systemd_loginctl_LDADD = \
1445         libsystemd-basic.la \
1446         $(DBUS_LIBS) \
1447         $(UDEV_LIBS)
1448
1449 systemd_notify_SOURCES = \
1450         src/notify.c \
1451         src/sd-readahead.c
1452
1453 systemd_notify_LDADD = \
1454         libsystemd-basic.la \
1455         libsystemd-daemon.la
1456
1457 systemd_ask_password_SOURCES = \
1458         src/ask-password.c \
1459         src/ask-password-api.c
1460
1461 systemd_ask_password_LDADD = \
1462         libsystemd-basic.la
1463
1464 systemd_reply_password_SOURCES = \
1465         src/reply-password.c
1466
1467 systemd_reply_password_LDADD = \
1468         libsystemd-basic.la
1469
1470 systemd_readahead_collect_SOURCES = \
1471         src/readahead-collect.c \
1472         src/readahead-common.c
1473
1474 systemd_readahead_collect_CFLAGS = \
1475         $(UDEV_CFLAGS)
1476
1477 systemd_readahead_collect_LDADD = \
1478         libsystemd-basic.la \
1479         libsystemd-daemon.la \
1480         $(UDEV_LIBS)
1481
1482 systemd_readahead_replay_SOURCES = \
1483         src/readahead-replay.c \
1484         src/readahead-common.c
1485
1486 systemd_readahead_replay_CFLAGS = \
1487         $(UDEV_CFLAGS)
1488
1489 systemd_readahead_replay_LDADD = \
1490         libsystemd-basic.la \
1491         libsystemd-daemon.la \
1492         $(UDEV_LIBS)
1493
1494 systemd_cgls_SOURCES = \
1495         src/cgls.c \
1496         src/cgroup-show.c \
1497         src/cgroup-util.c \
1498         src/pager.c
1499
1500 systemd_cgls_CFLAGS = \
1501         $(AM_CFLAGS)
1502
1503 systemd_cgls_LDADD = \
1504         libsystemd-basic.la
1505
1506 systemd_nspawn_SOURCES = \
1507         src/nspawn.c \
1508         src/cgroup-util.c \
1509         src/loopback-setup.c
1510
1511 systemd_nspawn_CFLAGS = \
1512         $(AM_CFLAGS)
1513
1514 systemd_nspawn_LDADD = \
1515         libsystemd-basic.la \
1516         libsystemd-daemon.la
1517
1518 systemd_stdio_bridge_SOURCES = \
1519         src/bridge.c
1520
1521 systemd_stdio_bridge_LDADD = \
1522         libsystemd-basic.la
1523
1524 systemadm_SOURCES = \
1525         src/systemadm.vala \
1526         src/systemd-interfaces.vala \
1527         src/wraplabel.vala
1528
1529 systemadm_CFLAGS = \
1530         $(AM_CFLAGS) \
1531         $(GTK_CFLAGS) \
1532         -Wno-unused-variable \
1533         -Wno-unused-function \
1534         -Wno-shadow \
1535         -Wno-format-nonliteral
1536
1537 systemadm_VALAFLAGS = \
1538         --pkg=posix \
1539         --pkg=gtk+-2.0 \
1540         --pkg=gee-1.0 \
1541         -g
1542
1543 systemadm_LDADD = \
1544         $(GTK_LIBS)
1545
1546 systemd_gnome_ask_password_agent_SOURCES = \
1547         src/gnome-ask-password-agent.vala
1548
1549 systemd_gnome_ask_password_agent_CFLAGS = \
1550         $(AM_CFLAGS) \
1551         $(LIBNOTIFY_CFLAGS) \
1552         $(GTK_CFLAGS) \
1553         -Wno-unused-variable \
1554         -Wno-unused-function \
1555         -Wno-shadow \
1556         -Wno-format-nonliteral
1557
1558 systemd_gnome_ask_password_agent_VALAFLAGS = \
1559         --pkg=posix \
1560         --pkg=gtk+-2.0 \
1561         --pkg=linux \
1562         --pkg=gio-unix-2.0 \
1563         --pkg=libnotify
1564 if LIBNOTIFY07
1565 systemd_gnome_ask_password_agent_VALAFLAGS += \
1566         -D LIBNOTIFY07
1567 endif
1568 systemd_gnome_ask_password_agent_VALAFLAGS += \
1569         -g
1570
1571 systemd_gnome_ask_password_agent_LDADD = \
1572         $(LIBNOTIFY_LIBS) \
1573         $(GTK_LIBS)
1574
1575 systemd_tty_ask_password_agent_SOURCES = \
1576         src/tty-ask-password-agent.c \
1577         src/ask-password-api.c \
1578         src/utmp-wtmp.c
1579
1580 systemd_tty_ask_password_agent_LDADD = \
1581         libsystemd-basic.la
1582
1583 pam_systemd_la_SOURCES = \
1584         src/pam-module.c \
1585         src/dbus-common.c
1586
1587 pam_systemd_la_CFLAGS = \
1588         $(AM_CFLAGS) \
1589         $(PAM_CFLAGS) \
1590         $(DBUS_CFLAGS) \
1591         -fvisibility=hidden
1592
1593 pam_systemd_la_LDFLAGS = \
1594         -module \
1595         -export-dynamic \
1596         -avoid-version \
1597         -shared \
1598         -export-symbols-regex '^pam_sm_.*'
1599
1600 pam_systemd_la_LIBADD = \
1601         libsystemd-basic.la \
1602         libsystemd-daemon.la \
1603         $(PAM_LIBS) \
1604         $(DBUS_LIBS)
1605
1606 libsystemd_daemon_la_SOURCES = \
1607         src/sd-daemon.c
1608
1609 libsystemd_daemon_la_CFLAGS = \
1610         $(AM_CFLAGS) \
1611         -fvisibility=hidden \
1612         -DSD_EXPORT_SYMBOLS
1613
1614 libsystemd_daemon_la_LDFLAGS = \
1615         -shared \
1616         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1617         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym
1618
1619 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1620 libsystemd-daemon-install-hook:
1621         if test "$(libdir)" != "$(rootlibdir)"; then \
1622                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1623                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
1624                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
1625                 ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
1626                 mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
1627         fi
1628
1629 libsystemd-daemon-uninstall-hook:
1630         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1631
1632 libsystemd_login_la_SOURCES = \
1633         src/sd-login.c \
1634         src/cgroup-util.c
1635
1636 libsystemd_login_la_CFLAGS = \
1637         $(AM_CFLAGS) \
1638         -fvisibility=hidden
1639
1640 libsystemd_login_la_LDFLAGS = \
1641         -shared \
1642         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
1643         -Wl,--version-script=$(top_srcdir)/src/libsystemd-login.sym
1644
1645 libsystemd_login_la_LIBADD = \
1646         libsystemd-basic.la
1647
1648 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1649 libsystemd-login-install-hook:
1650         if test "$(libdir)" != "$(rootlibdir)"; then \
1651                 mkdir -p $(DESTDIR)$(rootlibdir) && \
1652                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-login.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)/libsystemd-login.so && \
1655                 mv $(DESTDIR)$(libdir)/libsystemd-login.so.* $(DESTDIR)$(rootlibdir); \
1656         fi
1657
1658 libsystemd-login-uninstall-hook:
1659         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
1660
1661 SED_PROCESS = \
1662         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1663         $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
1664                 -e 's,@rootbindir\@,$(rootbindir),g' \
1665                 -e 's,@bindir\@,$(bindir),g' \
1666                 -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
1667                 -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
1668                 -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
1669                 -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
1670                 -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
1671                 -e 's,@systemunitdir\@,$(systemunitdir),g' \
1672                 -e 's,@userunitdir\@,$(userunitdir),g' \
1673                 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
1674                 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
1675                 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
1676                 -e 's,@prefix\@,$(prefix),g' \
1677                 -e 's,@exec_prefix\@,$(exec_prefix),g' \
1678                 -e 's,@libdir\@,$(libdir),g' \
1679                 -e 's,@includedir\@,$(includedir),g' \
1680                 < $< > $@ || rm $@
1681
1682 units/%: units/%.in Makefile
1683         $(SED_PROCESS)
1684
1685 man/%: man/%.in Makefile
1686         $(SED_PROCESS)
1687
1688 %.pc: %.pc.in Makefile
1689         $(SED_PROCESS)
1690
1691 src/%.policy.in: src/%.policy.in.in Makefile
1692         $(SED_PROCESS)
1693
1694 src/%.rules: src/%.rules.in Makefile
1695         $(SED_PROCESS)
1696
1697 src/%.c: src/%.gperf
1698         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1699         $(GPERF) < $< > $@
1700
1701 src/%: src/%.m4
1702         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1703         $(M4) -P $(M4_DEFINES) < $< > $@ || rm $@
1704
1705 src/load-fragment-gperf-nulstr.c: src/load-fragment-gperf.gperf
1706         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1707         $(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 $@
1708
1709 M4_PROCESS_SYSTEM = \
1710         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1711         $(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ || rm $@
1712
1713 M4_PROCESS_USER = \
1714         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1715         $(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@ || rm $@
1716
1717 units/%: units/%.m4 Makefile
1718         $(M4_PROCESS_SYSTEM)
1719
1720 units/user/%: units/%.m4 Makefile
1721         $(M4_PROCESS_USER)
1722
1723 CLEANFILES = \
1724         $(nodist_systemunit_DATA) \
1725         $(nodist_userunit_DATA) \
1726         $(nodist_man_MANS) \
1727         ${XML_IN_FILES:.xml.in=.html} \
1728         $(pkgconfigdata_DATA) \
1729         $(pkgconfiglib_DATA) \
1730         $(nodist_polkitpolicy_DATA) \
1731         src/73-seat-late.rules \
1732         src/99-systemd.rules \
1733         src/load-fragment-gperf.gperf \
1734         src/load-fragment-gperf.c \
1735         src/load-fragment-gperf-nulstr.c \
1736         src/logind-gperf.c
1737
1738 if HAVE_VALAC
1739 CLEANFILES += \
1740         ${systemadm_SOURCES:.vala=.c}
1741 endif
1742
1743 if HAVE_XSLTPROC
1744 XSLTPROC_FLAGS = \
1745         --nonet \
1746         --param funcsynopsis.style "'ansi'"
1747
1748 XSLTPROC_PROCESS_MAN = \
1749         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1750         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1751
1752 XSLTPROC_PROCESS_MAN_IN = \
1753         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1754         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \
1755         mv ${@:.in=} $@
1756
1757 XSLTPROC_PROCESS_HTML = \
1758         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1759         $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
1760
1761 XSLTPROC_PROCESS_HTML_IN = \
1762         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
1763         $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \
1764         mv ${@:.in=} $@
1765
1766 man/%.1: man/%.xml
1767         $(XSLTPROC_PROCESS_MAN)
1768
1769 man/%.1.in: man/%.xml.in
1770         $(XSLTPROC_PROCESS_MAN)
1771
1772 man/%.3: man/%.xml
1773         $(XSLTPROC_PROCESS_MAN)
1774
1775 man/%.3.in: man/%.xml.in
1776         $(XSLTPROC_PROCESS_MAN)
1777
1778 man/%.5: man/%.xml
1779         $(XSLTPROC_PROCESS_MAN)
1780
1781 man/%.5.in: man/%.xml.in
1782         $(XSLTPROC_PROCESS_MAN)
1783
1784 man/%.7: man/%.xml
1785         $(XSLTPROC_PROCESS_MAN)
1786
1787 man/%.7.in: man/%.xml.in
1788         $(XSLTPROC_PROCESS_MAN_IN)
1789
1790 man/%.8: man/%.xml
1791         $(XSLTPROC_PROCESS_MAN)
1792
1793 man/%.8.in: man/%.xml.in
1794         $(XSLTPROC_PROCESS_MAN_IN)
1795
1796 man/%.html: man/%.xml
1797         $(XSLTPROC_PROCESS_HTML)
1798
1799 man/%.html.in: man/%.xml.in
1800         $(XSLTPROC_PROCESS_HTML_IN)
1801
1802 CLEANFILES += \
1803         $(dist_man_MANS) \
1804         ${nodist_man_MANS:=.in} \
1805         ${XML_FILES:.xml=.html} \
1806         ${XML_IN_FILES:.xml.in=.html.in}
1807 endif
1808
1809 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
1810
1811 org.freedesktop.systemd1.%.xml: systemd
1812         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
1813                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1814                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1815
1816 org.freedesktop.hostname1.xml: systemd-hostnamed
1817         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \
1818                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1819                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1820
1821 org.freedesktop.locale1.xml: systemd-localed
1822         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \
1823                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1824                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1825
1826 org.freedesktop.timedate1.xml: systemd-timedated
1827         $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
1828                 $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
1829                 $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
1830
1831 CLEANFILES += \
1832         $(dbusinterface_DATA)
1833
1834 install-data-hook:
1835         $(MKDIR_P) -m 0755 \
1836                 $(DESTDIR)$(tmpfilesdir) \
1837                 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
1838                 $(DESTDIR)$(prefix)/lib/modules-load.d \
1839                 $(DESTDIR)$(sysconfdir)/modules-load.d \
1840                 $(DESTDIR)$(prefix)/lib/sysctl.d \
1841                 $(DESTDIR)$(sysconfdir)/sysctl.d \
1842                 $(DESTDIR)$(systemshutdowndir) \
1843                 $(DESTDIR)$(systemgeneratordir) \
1844                 $(DESTDIR)$(usergeneratordir)
1845 if ENABLE_BINFMT
1846         $(MKDIR_P) -m 0755 \
1847                 $(DESTDIR)$(prefix)/lib/binfmt.d \
1848                 $(DESTDIR)$(sysconfdir)/binfmt.d
1849 endif
1850         $(MKDIR_P) -m 0755 \
1851                 $(DESTDIR)$(systemunitdir) \
1852                 $(DESTDIR)$(userunitdir) \
1853                 $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
1854                 $(DESTDIR)$(systemunitdir)/sockets.target.wants \
1855                 $(DESTDIR)$(systemunitdir)/basic.target.wants \
1856                 $(DESTDIR)$(systemunitdir)/shutdown.target.wants \
1857                 $(DESTDIR)$(systemunitdir)/local-fs.target.wants \
1858                 $(DESTDIR)$(systemunitdir)/runlevel1.target.wants \
1859                 $(DESTDIR)$(systemunitdir)/runlevel2.target.wants \
1860                 $(DESTDIR)$(systemunitdir)/runlevel3.target.wants \
1861                 $(DESTDIR)$(systemunitdir)/runlevel4.target.wants \
1862                 $(DESTDIR)$(systemunitdir)/runlevel5.target.wants \
1863                 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
1864                 $(DESTDIR)$(systemunitdir)/graphical.target.wants \
1865                 $(DESTDIR)$(pkgsysconfdir)/system \
1866                 $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants \
1867                 $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
1868                 $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
1869                 $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
1870                 $(DESTDIR)$(pkgsysconfdir)/user \
1871                 $(DESTDIR)$(dbussessionservicedir) \
1872                 $(DESTDIR)$(sysconfdir)/xdg/systemd
1873         ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
1874                 rm -f user && \
1875                 $(LN_S) $(pkgsysconfdir)/user user )
1876         ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
1877                 rm -f systemd-initctl.socket systemd-stdout-syslog-bridge.socket systemd-shutdownd.socket syslog.socket && \
1878                 $(LN_S) ../systemd-stdout-syslog-bridge.socket systemd-stdout-syslog-bridge.socket && \
1879                 $(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
1880                 $(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
1881                 $(LN_S) ../syslog.socket syslog.socket )
1882         ( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
1883                 rm -f systemd-update-utmp-runlevel.service && \
1884                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1885         ( cd $(DESTDIR)$(systemunitdir)/runlevel2.target.wants && \
1886                 rm -f systemd-update-utmp-runlevel.service && \
1887                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1888         ( cd $(DESTDIR)$(systemunitdir)/runlevel3.target.wants && \
1889                 rm -f systemd-update-utmp-runlevel.service && \
1890                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1891         ( cd $(DESTDIR)$(systemunitdir)/runlevel4.target.wants && \
1892                 rm -f systemd-update-utmp-runlevel.service && \
1893                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1894         ( cd $(DESTDIR)$(systemunitdir)/runlevel5.target.wants && \
1895                 rm -f systemd-update-utmp-runlevel.service && \
1896                 $(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
1897         ( cd $(DESTDIR)$(systemunitdir)/shutdown.target.wants && \
1898                 rm -f systemd-update-utmp-shutdown.service \
1899                         systemd-random-seed-save.service && \
1900                 $(LN_S) ../systemd-update-utmp-shutdown.service systemd-update-utmp-shutdown.service && \
1901                 $(LN_S) ../systemd-random-seed-save.service systemd-random-seed-save.service )
1902         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
1903                 rm -f systemd-remount-api-vfs.service \
1904                         fsck-root.service \
1905                         remount-rootfs.service \
1906                         var-run.mount \
1907                         media.mount && \
1908                 $(LN_S) ../systemd-remount-api-vfs.service systemd-remount-api-vfs.service && \
1909                 $(LN_S) ../fsck-root.service fsck-root.service && \
1910                 $(LN_S) ../remount-rootfs.service remount-rootfs.service && \
1911                 $(LN_S) ../var-run.mount var-run.mount && \
1912                 $(LN_S) ../media.mount media.mount )
1913         ( cd $(DESTDIR)$(userunitdir) && \
1914                 rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \
1915                 $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
1916                 $(LN_S) $(systemunitdir)/sockets.target sockets.target && \
1917                 $(LN_S) $(systemunitdir)/bluetooth.target bluetooth.target && \
1918                 $(LN_S) $(systemunitdir)/printer.target printer.target && \
1919                 $(LN_S) $(systemunitdir)/sound.target sound.target )
1920         ( cd $(DESTDIR)$(systemunitdir) && \
1921                 rm -f runlevel0.target runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target runlevel6.target && \
1922                 $(LN_S) poweroff.target runlevel0.target && \
1923                 $(LN_S) rescue.target runlevel1.target && \
1924                 $(LN_S) multi-user.target runlevel2.target && \
1925                 $(LN_S) multi-user.target runlevel3.target && \
1926                 $(LN_S) multi-user.target runlevel4.target && \
1927                 $(LN_S) graphical.target runlevel5.target && \
1928                 $(LN_S) reboot.target runlevel6.target )
1929         ( cd $(DESTDIR)$(systemunitdir) && \
1930                 rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.login1.service autovt@.service && \
1931                 $(LN_S) graphical.target default.target && \
1932                 $(LN_S) reboot.target ctrl-alt-del.target && \
1933                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
1934                 $(LN_S) getty@.service autovt@.service )
1935         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
1936                 rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path systemd-logind.service && \
1937                 $(LN_S) ../getty.target getty.target && \
1938                 $(LN_S) ../systemd-user-sessions.service systemd-user-sessions.service && \
1939                 $(LN_S) ../systemd-ask-password-wall.path systemd-ask-password-wall.path && \
1940                 $(LN_S) ../systemd-logind.service systemd-logind.service )
1941         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
1942                 rm -f getty@tty1.service && \
1943                 $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service )
1944         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
1945                 rm -f remote-fs.target && \
1946                 $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
1947         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1948                 rm -f dev-hugepages.mount \
1949                         dev-mqueue.mount \
1950                         sys-kernel-config.mount \
1951                         sys-kernel-debug.mount \
1952                         sys-kernel-security.mount \
1953                         sys-fs-fuse-connections.mount \
1954                         systemd-vconsole-setup.service \
1955                         systemd-modules-load.service \
1956                         systemd-random-seed-load.service \
1957                         systemd-tmpfiles-setup.service \
1958                         systemd-sysctl.service \
1959                         systemd-ask-password-console.path \
1960                         systemd-kmsg-syslogd.service \
1961                         cryptsetup.target && \
1962                 $(LN_S) ../dev-hugepages.mount dev-hugepages.mount && \
1963                 $(LN_S) ../dev-mqueue.mount dev-mqueue.mount && \
1964                 $(LN_S) ../sys-kernel-config.mount sys-kernel-config.mount && \
1965                 $(LN_S) ../sys-kernel-debug.mount sys-kernel-debug.mount && \
1966                 $(LN_S) ../sys-kernel-security.mount sys-kernel-security.mount && \
1967                 $(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
1968                 $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
1969                 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
1970                 $(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
1971                 $(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
1972                 $(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
1973                 $(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
1974                 $(LN_S) ../systemd-kmsg-syslogd.service && \
1975                 $(LN_S) ../cryptsetup.target cryptsetup.target )
1976 if ENABLE_BINFMT
1977         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
1978                 rm -f systemd-binfmt.service \
1979                         proc-sys-fs-binfmt_misc.automount && \
1980                 $(LN_S) ../systemd-binfmt.service systemd-binfmt.service && \
1981                 $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount )
1982 endif
1983 if ENABLE_HOSTNAMED
1984         ( cd $(DESTDIR)$(systemunitdir) && \
1985                 rm -f dbus-org.freedesktop.hostname1.service && \
1986                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
1987 endif
1988 if ENABLE_TIMEDATED
1989         ( cd $(DESTDIR)$(systemunitdir) && \
1990                 rm -f dbus-org.freedesktop.timedate1.service  && \
1991                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
1992 endif
1993 if ENABLE_LOCALED
1994         ( cd $(DESTDIR)$(systemunitdir) && \
1995                 rm -f dbus-org.freedesktop.locale1.service && \
1996                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service )
1997 endif
1998         ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
1999                 rm -f systemd-tmpfiles-clean.timer && \
2000                 $(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
2001         ( cd $(DESTDIR)$(dbussessionservicedir) && \
2002                 rm -f org.freedesktop.systemd1.service && \
2003                 $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
2004 if HAVE_PLYMOUTH
2005         $(MKDIR_P) -m 0755 \
2006                 $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) \
2007                 $(DESTDIR)$(systemunitdir)/reboot.target.wants \
2008                 $(DESTDIR)$(systemunitdir)/kexec.target.wants \
2009                 $(DESTDIR)$(systemunitdir)/poweroff.target.wants \
2010                 $(DESTDIR)$(systemunitdir)/halt.target.wants
2011         ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
2012                 rm -f plymouth-start.service plymouth-read-write.service && \
2013                 $(LN_S) ../plymouth-start.service plymouth-start.service && \
2014                 $(LN_S) ../plymouth-read-write.service plymouth-read-write.service )
2015         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2016                 rm -f plymouth-quit.service plymouth-quit-wait.service && \
2017                 $(LN_S) ../plymouth-quit.service plymouth-quit.service && \
2018                 $(LN_S) ../plymouth-quit-wait.service plymouth-quit-wait.service )
2019         ( cd $(DESTDIR)$(systemunitdir)/reboot.target.wants && \
2020                 rm -f plymouth-reboot.service && \
2021                 $(LN_S) ../plymouth-reboot.service plymouth-reboot.service )
2022         ( cd $(DESTDIR)$(systemunitdir)/kexec.target.wants && \
2023                 rm -f plymouth-kexec.service && \
2024                 $(LN_S) ../plymouth-kexec.service plymouth-kexec.service )
2025         ( cd $(DESTDIR)$(systemunitdir)/poweroff.target.wants && \
2026                 rm -f plymouth-poweroff.service && \
2027                 $(LN_S) ../plymouth-poweroff.service plymouth-poweroff.service )
2028         ( cd $(DESTDIR)$(systemunitdir)/halt.target.wants && \
2029                 rm -f plymouth-halt.service && \
2030                 $(LN_S) ../plymouth-halt.service plymouth-halt.service )
2031 endif
2032 if TARGET_MEEGO
2033         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2034         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2035                 rm -f network.target && \
2036                 $(LN_S) $(systemunitdir)/network.target network.target )
2037         ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
2038                 rm -f * )
2039         ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
2040                 rm -f * )
2041         ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
2042                 rm -f * )
2043         ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
2044                 rm -f * )
2045 endif
2046
2047 if TARGET_FEDORA
2048         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2049         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2050                 rm -f rc-local.service && \
2051                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2052         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2053                 rm -f halt-local.service && \
2054                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2055         ( cd $(DESTDIR)$(systemunitdir) && \
2056                 rm -f display-manager.service single.service && \
2057                 $(LN_S) prefdm.service display-manager.service && \
2058                 $(LN_S) rescue.service single.service )
2059         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2060                 rm -f display-manager.service && \
2061                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2062 endif
2063
2064 if TARGET_MANDRIVA
2065         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2066         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2067                 rm -f rc-local.service && \
2068                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2069         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2070                 rm -f halt-local.service && \
2071                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2072         ( cd $(DESTDIR)$(systemunitdir) && \
2073                 rm -f display-manager.service dm.service single.service && \
2074                 $(LN_S) prefdm.service display-manager.service && \
2075                 $(LN_S) prefdm.service dm.service && \
2076                 $(LN_S) rescue.service single.service )
2077         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2078                 rm -f display-manager.service && \
2079                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2080 endif
2081
2082 if TARGET_DEBIAN_OR_UBUNTU
2083         ( cd $(DESTDIR)$(systemunitdir) && \
2084                 rm -f runlevel5.target && \
2085                 $(LN_S) multi-user.target runlevel5.target )
2086 endif
2087
2088 if TARGET_SUSE
2089         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2090         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2091                 rm -f rc-local.service && \
2092                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2093         ( cd $(DESTDIR)$(systemunitdir) && \
2094                 rm -f local.service && \
2095                 $(LN_S) rc-local.service local.service )
2096         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2097                 rm -f halt-local.service && \
2098                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2099 endif
2100
2101 if TARGET_MAGEIA
2102         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
2103         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
2104                 rm -f rc-local.service && \
2105                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
2106         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
2107                 rm -f halt-local.service && \
2108                 $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
2109         ( cd $(DESTDIR)$(systemunitdir) && \
2110                 rm -f display-manager.service && \
2111                 $(LN_S) prefdm.service display-manager.service && \
2112                 $(LN_S) prefdm.service dm.service )
2113         ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
2114                 rm -f display-manager.service && \
2115                 $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
2116 endif
2117
2118 if HAVE_SYSV_COMPAT
2119         ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
2120                 rm -f var-lock.mount && \
2121                 $(LN_S) ../var-lock.mount var-lock.mount )
2122 endif
2123
2124 install-exec-hook: libsystemd-daemon-install-hook libsystemd-login-install-hook
2125
2126 uninstall-hook: libsystemd-daemon-uninstall-hook libsystemd-login-uninstall-hook
2127
2128 DISTCHECK_CONFIGURE_FLAGS = \
2129         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
2130         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
2131         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
2132         --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
2133         --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
2134         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
2135         --with-rootdir=$$dc_install_base/$(rootdir)
2136
2137 upload: all distcheck
2138         cp -v systemd-$(VERSION).tar.bz2 /home/lennart/git.fedora/systemd/
2139         scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/
2140         scp man/*.html tango:public/systemd-man/
2141
2142 git-tag:
2143         git tag "v$(VERSION)" -m "systemd $(VERSION)"
2144
2145 update-kbd-model-map:
2146         src/generate-kbd-model-map > src/kbd-model-map