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