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