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