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