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