chiark / gitweb /
7a45029a049b114a97f02f89362ce516b871183e
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #  Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
8 #  Copyright 2013 David Strauss
9 #
10 #  systemd is free software; you can redistribute it and/or modify it
11 #  under the terms of the GNU Lesser General Public License as published by
12 #  the Free Software Foundation; either version 2.1 of the License, or
13 #  (at your option) any later version.
14 #
15 #  systemd is distributed in the hope that it will be useful, but
16 #  WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 #  Lesser General Public License for more details.
19 #
20 #  You should have received a copy of the GNU Lesser General Public License
21 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 SUBDIRS = . po
28
29 # remove targets if the command fails
30 .DELETE_ON_ERROR:
31
32 # keep intermediate files
33 .SECONDARY:
34
35 # Keep the test-suite.log
36 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
37
38 LIBUDEV_CURRENT=5
39 LIBUDEV_REVISION=0
40 LIBUDEV_AGE=4
41
42 LIBGUDEV_CURRENT=1
43 LIBGUDEV_REVISION=3
44 LIBGUDEV_AGE=1
45
46 LIBSYSTEMD_LOGIN_CURRENT=9
47 LIBSYSTEMD_LOGIN_REVISION=1
48 LIBSYSTEMD_LOGIN_AGE=9
49
50 LIBSYSTEMD_DAEMON_CURRENT=0
51 LIBSYSTEMD_DAEMON_REVISION=10
52 LIBSYSTEMD_DAEMON_AGE=0
53
54 LIBSYSTEMD_ID128_CURRENT=0
55 LIBSYSTEMD_ID128_REVISION=26
56 LIBSYSTEMD_ID128_AGE=0
57
58 LIBSYSTEMD_JOURNAL_CURRENT=11
59 LIBSYSTEMD_JOURNAL_REVISION=3
60 LIBSYSTEMD_JOURNAL_AGE=11
61
62 LIBSYSTEMD_BUS_CURRENT=0
63 LIBSYSTEMD_BUS_REVISION=0
64 LIBSYSTEMD_BUS_AGE=0
65
66 # Dirs of external packages
67 dbuspolicydir=@dbuspolicydir@
68 dbussessionservicedir=@dbussessionservicedir@
69 dbussystemservicedir=@dbussystemservicedir@
70 pamlibdir=@pamlibdir@
71 pamconfdir=@pamconfdir@
72 pkgconfigdatadir=$(datadir)/pkgconfig
73 pkgconfiglibdir=$(libdir)/pkgconfig
74 polkitpolicydir=$(datadir)/polkit-1/actions
75 bashcompletiondir=@bashcompletiondir@
76 zshcompletiondir=@zshcompletiondir@
77 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
78 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
79 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
80 varlogdir=$(localstatedir)/log
81 systemdstatedir=$(localstatedir)/lib/systemd
82 catalogstatedir=$(systemdstatedir)/catalog
83
84 # Our own, non-special dirs
85 pkgsysconfdir=$(sysconfdir)/systemd
86 userunitdir=$(prefix)/lib/systemd/user
87 userpresetdir=$(prefix)/lib/systemd/user-preset
88 tmpfilesdir=$(prefix)/lib/tmpfiles.d
89 sysctldir=$(prefix)/lib/sysctl.d
90 networkdir=$(prefix)/lib/systemd/network
91 pkgincludedir=$(includedir)/systemd
92 systemgeneratordir=$(rootlibexecdir)/system-generators
93 usergeneratordir=$(prefix)/lib/systemd/user-generators
94 systemshutdowndir=$(rootlibexecdir)/system-shutdown
95 systemsleepdir=$(rootlibexecdir)/system-sleep
96 systemunitdir=$(rootprefix)/lib/systemd/system
97 systempresetdir=$(rootprefix)/lib/systemd/system-preset
98 udevlibexecdir=$(rootprefix)/lib/udev
99 udevhomedir=$(udevlibexecdir)
100 udevrulesdir=$(udevlibexecdir)/rules.d
101 udevhwdbdir=$(udevlibexecdir)/hwdb.d
102 catalogdir=$(prefix)/lib/systemd/catalog
103 kernelinstalldir = $(prefix)/lib/kernel/install.d
104
105 # And these are the special ones for /
106 rootprefix=@rootprefix@
107 rootbindir=$(rootprefix)/bin
108 rootlibexecdir=$(rootprefix)/lib/systemd
109
110 CLEANFILES = $(BUILT_SOURCES)
111 DISTCLEANFILES =
112 EXTRA_DIST =
113 BUILT_SOURCES =
114 INSTALL_EXEC_HOOKS =
115 UNINSTALL_EXEC_HOOKS =
116 INSTALL_DATA_HOOKS =
117 UNINSTALL_DATA_HOOKS =
118 DISTCLEAN_LOCAL_HOOKS =
119 CLEAN_LOCAL_HOOKS =
120 pkginclude_HEADERS =
121 noinst_LTLIBRARIES =
122 lib_LTLIBRARIES =
123 include_HEADERS =
124 noinst_DATA =
125 pkgconfiglib_DATA =
126 polkitpolicy_in_in_files =
127 polkitpolicy_in_files =
128 polkitpolicy_files =
129 dist_udevrules_DATA =
130 nodist_udevrules_DATA =
131 dist_pkgsysconf_DATA =
132 dist_pkgdata_DATA =
133 dist_dbuspolicy_DATA =
134 dist_dbussystemservice_DATA =
135 check_PROGRAMS =
136 check_DATA =
137 tests=
138 manual_tests =
139 if ENABLE_TESTS
140 noinst_PROGRAMS = $(manual_tests) $(tests)
141 TESTS = $(tests)
142 else
143 noinst_PROGRAMS =
144 TESTS =
145 endif
146 udevlibexec_PROGRAMS =
147
148 AM_CPPFLAGS = \
149         -include $(top_builddir)/config.h \
150         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
151         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
152         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
153         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
154         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
155         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
156         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
157         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
158         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
159         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
160         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
161         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
162         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
163         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
164         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
165         -DROOTPREFIX=\"$(rootprefix)\" \
166         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
167         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
168         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
169         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
170         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
171         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
172         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
173         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
174         -DX_SERVER=\"$(bindir)/X\" \
175         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
176         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
177         -DQUOTACHECK=\"$(QUOTACHECK)\" \
178         -DKEXEC=\"$(KEXEC)\" \
179         -I $(top_srcdir)/src \
180         -I $(top_builddir)/src/shared \
181         -I $(top_srcdir)/src/shared \
182         -I $(top_srcdir)/src/network \
183         -I $(top_srcdir)/src/login \
184         -I $(top_srcdir)/src/journal \
185         -I $(top_srcdir)/src/systemd \
186         -I $(top_builddir)/src/core \
187         -I $(top_srcdir)/src/core \
188         -I $(top_srcdir)/src/libudev \
189         -I $(top_srcdir)/src/udev \
190         -I $(top_srcdir)/src/udev/net \
191         -I $(top_builddir)/src/udev \
192         -I $(top_srcdir)/src/libsystemd-bus \
193         -I $(top_srcdir)/src/libsystemd-rtnl \
194         $(OUR_CPPFLAGS)
195
196 AM_CFLAGS = $(OUR_CFLAGS)
197 AM_LDFLAGS = $(OUR_LDFLAGS)
198
199 # ------------------------------------------------------------------------------
200 define move-to-rootlibdir
201         if test "$(libdir)" != "$(rootlibdir)"; then \
202                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
203                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
204                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
205                 $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
206                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
207         fi
208 endef
209
210 INSTALL_DIRS =
211
212 RUNLEVEL1_TARGET_WANTS =
213 RUNLEVEL2_TARGET_WANTS =
214 RUNLEVEL3_TARGET_WANTS =
215 RUNLEVEL4_TARGET_WANTS =
216 RUNLEVEL5_TARGET_WANTS =
217 SHUTDOWN_TARGET_WANTS =
218 LOCAL_FS_TARGET_WANTS =
219 MULTI_USER_TARGET_WANTS =
220 SYSINIT_TARGET_WANTS =
221 SOCKETS_TARGET_WANTS =
222 TIMERS_TARGET_WANTS =
223
224 SYSTEM_UNIT_ALIASES =
225 USER_UNIT_ALIASES =
226
227 GENERAL_ALIASES =
228
229 install-target-wants-hook:
230         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && $(add-wants)
231         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && $(add-wants)
232         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && $(add-wants)
233         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && $(add-wants)
234         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && $(add-wants)
235         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
236         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
237         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
238         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
239         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
240         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
241         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
242
243 define add-wants
244         [ -z "$$what" ] || ( \
245           dir=$(DESTDIR)$(systemunitdir)/$$wants.wants && \
246           $(MKDIR_P) -m 0755 $$dir && \
247           cd $$dir && \
248           rm -f $$what && \
249           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
250 endef
251
252 install-directories-hook:
253         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
254
255 install-aliases-hook:
256         set -- $(SYSTEM_UNIT_ALIASES) && \
257                 dir=$(systemunitdir) && $(install-aliases)
258         set -- $(USER_UNIT_ALIASES) && \
259                 dir=$(userunitdir) && $(install-aliases)
260         set -- $(GENERAL_ALIASES) && \
261                 dir= && $(install-aliases)
262
263 define install-aliases
264         while [ -n "$$1" ]; do \
265                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
266                 rm -f $(DESTDIR)$$dir/$$2 && \
267                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
268                 shift 2 || exit $$?; \
269         done
270 endef
271
272 INSTALL_EXEC_HOOKS += \
273         install-target-wants-hook \
274         install-directories-hook \
275         install-aliases-hook
276
277 # ------------------------------------------------------------------------------
278 AM_V_M4 = $(AM_V_M4_$(V))
279 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
280 AM_V_M4_0 = @echo "  M4      " $@;
281
282 AM_V_XSLT = $(AM_V_XSLT_$(V))
283 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
284 AM_V_XSLT_0 = @echo "  XSLT    " $@;
285
286 AM_V_GPERF = $(AM_V_GPERF_$(V))
287 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
288 AM_V_GPERF_0 = @echo "  GPERF   " $@;
289
290 AM_V_LN = $(AM_V_LN_$(V))
291 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
292 AM_V_LN_0 = @echo "  LN      " $@;
293
294 # ------------------------------------------------------------------------------
295 rootbin_PROGRAMS = \
296         systemctl \
297         systemd-notify \
298         systemd-ask-password \
299         systemd-tty-ask-password-agent \
300         systemd-machine-id-setup
301
302 bin_PROGRAMS = \
303         systemd-cgls \
304         systemd-cgtop \
305         systemd-nspawn \
306         systemd-detect-virt \
307         systemd-delta \
308         systemd-analyze \
309         systemd-run
310
311 dist_bin_SCRIPTS = \
312         src/kernel-install/kernel-install
313
314 dist_kernelinstall_SCRIPTS = \
315         src/kernel-install/50-depmod.install \
316         src/kernel-install/90-loaderentry.install
317
318 rootlibexec_PROGRAMS = \
319         systemd \
320         systemd-cgroups-agent \
321         systemd-initctl \
322         systemd-update-utmp \
323         systemd-shutdownd \
324         systemd-shutdown \
325         systemd-remount-fs \
326         systemd-reply-password \
327         systemd-fsck \
328         systemd-ac-power \
329         systemd-sysctl \
330         systemd-sleep \
331         systemd-bus-proxyd \
332         systemd-socket-proxyd
333
334 systemgenerator_PROGRAMS = \
335         systemd-getty-generator \
336         systemd-fstab-generator \
337         systemd-system-update-generator
338
339 dist_bashcompletion_DATA = \
340         shell-completion/bash/journalctl \
341         shell-completion/bash/systemctl \
342         shell-completion/bash/systemd-analyze \
343         shell-completion/bash/systemd-run \
344         shell-completion/bash/udevadm \
345         shell-completion/bash/kernel-install
346
347 dist_zshcompletion_DATA = \
348         shell-completion/zsh/_systemctl \
349         shell-completion/zsh/_journalctl \
350         shell-completion/zsh/_udevadm \
351         shell-completion/zsh/_kernel-install \
352         shell-completion/zsh/_systemd-nspawn \
353         shell-completion/zsh/_systemd-analyze \
354         shell-completion/zsh/_systemd-run \
355         shell-completion/zsh/_sd_hosts_or_user_at_host \
356         shell-completion/zsh/_systemd-delta \
357         shell-completion/zsh/_systemd
358
359 dist_sysctl_DATA = \
360         sysctl.d/50-default.conf
361
362 dist_systemunit_DATA = \
363         units/graphical.target \
364         units/multi-user.target \
365         units/emergency.service \
366         units/emergency.target \
367         units/sysinit.target \
368         units/basic.target \
369         units/getty.target \
370         units/halt.target \
371         units/kexec.target \
372         units/local-fs.target \
373         units/local-fs-pre.target \
374         units/initrd.target \
375         units/initrd-fs.target \
376         units/initrd-root-fs.target \
377         units/remote-fs.target \
378         units/remote-fs-pre.target \
379         units/network.target \
380         units/network-online.target \
381         units/nss-lookup.target \
382         units/nss-user-lookup.target \
383         units/hibernate.target \
384         units/hybrid-sleep.target \
385         units/poweroff.target \
386         units/reboot.target \
387         units/rescue.target \
388         units/rpcbind.target \
389         units/time-sync.target \
390         units/shutdown.target \
391         units/final.target \
392         units/umount.target \
393         units/sigpwr.target \
394         units/sleep.target \
395         units/sockets.target \
396         units/timers.target \
397         units/paths.target \
398         units/suspend.target \
399         units/swap.target \
400         units/slices.target \
401         units/system.slice \
402         units/x-.slice \
403         units/systemd-initctl.socket \
404         units/systemd-shutdownd.socket \
405         units/syslog.socket \
406         units/dev-hugepages.mount \
407         units/dev-mqueue.mount \
408         units/sys-kernel-config.mount \
409         units/sys-kernel-debug.mount \
410         units/sys-fs-fuse-connections.mount \
411         units/tmp.mount \
412         units/printer.target \
413         units/sound.target \
414         units/bluetooth.target \
415         units/smartcard.target \
416         units/systemd-ask-password-wall.path \
417         units/systemd-ask-password-console.path \
418         units/systemd-udevd-control.socket \
419         units/systemd-udevd-kernel.socket \
420         units/system-update.target \
421         units/initrd-switch-root.target
422
423 nodist_systemunit_DATA = \
424         units/getty@.service \
425         units/serial-getty@.service \
426         units/console-shell.service \
427         units/console-getty.service \
428         units/container-getty@.service \
429         units/systemd-initctl.service \
430         units/systemd-shutdownd.service \
431         units/systemd-remount-fs.service \
432         units/systemd-update-utmp.service \
433         units/systemd-update-utmp-runlevel.service \
434         units/systemd-ask-password-wall.service \
435         units/systemd-ask-password-console.service \
436         units/systemd-sysctl.service \
437         units/emergency.service \
438         units/rescue.service \
439         units/user@.service \
440         units/systemd-hibernate.service \
441         units/systemd-hybrid-sleep.service \
442         units/systemd-suspend.service \
443         units/systemd-halt.service \
444         units/systemd-poweroff.service \
445         units/systemd-reboot.service \
446         units/systemd-kexec.service \
447         units/systemd-fsck@.service \
448         units/systemd-fsck-root.service \
449         units/systemd-udevd.service \
450         units/systemd-udev-trigger.service \
451         units/systemd-udev-settle.service \
452         units/debug-shell.service \
453         units/initrd-parse-etc.service \
454         units/initrd-cleanup.service \
455         units/initrd-udevadm-cleanup-db.service \
456         units/initrd-switch-root.service \
457         units/systemd-nspawn@.service
458
459 dist_userunit_DATA = \
460         units/user/default.target \
461         units/user/exit.target
462
463 nodist_userunit_DATA = \
464         units/user/systemd-exit.service
465
466 EXTRA_DIST += \
467         units/getty@.service.m4 \
468         units/serial-getty@.service.m4 \
469         units/console-shell.service.m4.in \
470         units/console-getty.service.m4.in \
471         units/container-getty@.service.m4.in \
472         units/rescue.service.m4.in \
473         units/systemd-initctl.service.in \
474         units/systemd-shutdownd.service.in \
475         units/systemd-remount-fs.service.in \
476         units/systemd-update-utmp.service.in \
477         units/systemd-update-utmp-runlevel.service.in \
478         units/systemd-ask-password-wall.service.in \
479         units/systemd-ask-password-console.service.in \
480         units/systemd-sysctl.service.in \
481         units/emergency.service.in \
482         units/systemd-halt.service.in \
483         units/systemd-poweroff.service.in \
484         units/systemd-reboot.service.in \
485         units/systemd-kexec.service.in \
486         units/user/systemd-exit.service.in \
487         units/systemd-fsck@.service.in \
488         units/systemd-fsck-root.service.in \
489         units/user@.service.in \
490         units/systemd-udevd.service \
491         units/systemd-udev-trigger.service \
492         units/systemd-udev-settle.service \
493         units/debug-shell.service.in \
494         units/systemd-hibernate.service.in \
495         units/systemd-hybrid-sleep.service.in \
496         units/systemd-suspend.service.in \
497         units/quotaon.service.in \
498         units/initrd-parse-etc.service.in \
499         units/initrd-cleanup.service.in \
500         units/initrd-udevadm-cleanup-db.service.in \
501         units/initrd-switch-root.service.in \
502         units/systemd-nspawn@.service.in
503
504 CLEANFILES += \
505         units/console-shell.service.m4 \
506         units/console-getty.service.m4 \
507         units/container-getty@.service.m4 \
508         units/rescue.service.m4
509
510 if HAVE_SYSV_COMPAT
511 nodist_systemunit_DATA += \
512         units/rc-local.service \
513         units/halt-local.service
514
515 systemgenerator_PROGRAMS += \
516         systemd-rc-local-generator
517 endif
518
519 EXTRA_DIST += \
520         units/rc-local.service.in \
521         units/halt-local.service.in
522
523 # automake is broken and can't handle files with a dash in front
524 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
525 units-install-hook:
526         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
527
528 units-uninstall-hook:
529         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
530
531 INSTALL_DATA_HOOKS += units-install-hook
532 UNINSTALL_DATA_HOOKS += units-uninstall-hook
533
534 dist_doc_DATA = \
535         README \
536         NEWS \
537         LICENSE.LGPL2.1 \
538         LICENSE.GPL2 \
539         LICENSE.MIT \
540         DISTRO_PORTING
541
542 @INTLTOOL_POLICY_RULE@
543
544 # ------------------------------------------------------------------------------
545
546 MANPAGES =
547 MANPAGES_ALIAS =
548
549 include Makefile-man.am
550
551 .PHONY: man
552 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
553
554 XML_FILES = \
555         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
556 HTML_FILES = \
557         ${XML_FILES:.xml=.html}
558 HTML_ALIAS = \
559         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
560
561 if ENABLE_MANPAGES
562 man_MANS = \
563         $(MANPAGES) \
564         $(MANPAGES_ALIAS)
565
566 noinst_DATA += \
567         $(HTML_FILES) \
568         $(HTML_ALIAS)
569
570 CLEANFILES += \
571         $(man_MANS) \
572         $(HTML_FILES) \
573         $(HTML_ALIAS)
574
575 docs/html/man:
576         $(AM_V_at)$(MKDIR_P) $(dir $@)
577         $(AM_V_LN)$(LN_S) -f ../../man $@
578
579 noinst_DATA += \
580         docs/html/man
581
582 CLEANFILES += \
583         docs/html/man
584
585 if HAVE_PYTHON
586 man/index.html: man/systemd.index.html
587         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
588
589 noinst_DATA += \
590         man/index.html
591
592 CLEANFILES += \
593         man/index.html
594
595 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
596 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
597 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
598
599 update-man-list: make-man-rules.py $(XML_GLOB)
600         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
601         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
602         @echo "Makefile-man.am has been regenerated"
603
604 man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
605         $(AM_V_at)$(MKDIR_P) $(dir $@)
606         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
607
608 man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
609         $(AM_V_at)$(MKDIR_P) $(dir $@)
610         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
611
612 EXTRA_DIST += \
613         man/systemd.index.xml \
614         man/index.html \
615         man/systemd.directives.xml
616
617 CLEANFILES += \
618         man/systemd.index.xml \
619         man/systemd.directives.xml
620
621 endif
622
623 endif
624
625 EXTRA_DIST += \
626         $(XML_FILES) \
627         $(HTML_FILES) \
628         $(HTML_ALIAS) \
629         $(man_MANS) \
630         make-man-index.py \
631         make-directive-index.py \
632         xml_helper.py
633
634 # ------------------------------------------------------------------------------
635 noinst_LTLIBRARIES += \
636         libsystemd-rtnl.la
637
638 libsystemd_rtnl_la_SOURCES = \
639         src/systemd/sd-rtnl.h \
640         src/libsystemd-rtnl/sd-rtnl.c \
641         src/libsystemd-rtnl/rtnl-internal.h \
642         src/libsystemd-rtnl/rtnl-message.c \
643         src/libsystemd-rtnl/rtnl-util.h \
644         src/libsystemd-rtnl/rtnl-util.c
645
646 test_rtnl_SOURCES = \
647         src/libsystemd-rtnl/test-rtnl.c
648
649 test_rtnl_LDADD = \
650         libsystemd-rtnl.la \
651         libsystemd-bus-internal.la \
652         libsystemd-id128-internal.la \
653         libsystemd-shared.la
654
655 tests += test-rtnl
656
657 # ------------------------------------------------------------------------------
658 noinst_LTLIBRARIES += \
659         libsystemd-shared.la
660
661 libsystemd_shared_la_SOURCES = \
662         src/shared/linux/auto_dev-ioctl.h \
663         src/shared/linux/fanotify.h \
664         src/shared/linux/seccomp.h \
665         src/shared/linux/seccomp-bpf.h \
666         src/shared/ioprio.h \
667         src/shared/missing.h \
668         src/shared/initreq.h \
669         src/shared/securebits.h \
670         src/shared/special.h \
671         src/shared/list.h \
672         src/shared/macro.h \
673         src/shared/def.h \
674         src/shared/sparse-endian.h \
675         src/shared/refcnt.h \
676         src/shared/udev-util.h \
677         src/shared/bus-errors.h \
678         src/shared/device-nodes.c \
679         src/shared/device-nodes.h \
680         src/shared/util.c \
681         src/shared/util.h \
682         src/shared/virt.c \
683         src/shared/virt.h \
684         src/shared/efivars.c \
685         src/shared/efivars.h \
686         src/shared/path-util.c \
687         src/shared/path-util.h \
688         src/shared/time-util.c \
689         src/shared/time-util.h \
690         src/shared/hashmap.c \
691         src/shared/hashmap.h \
692         src/shared/set.c \
693         src/shared/set.h \
694         src/shared/fdset.c \
695         src/shared/fdset.h \
696         src/shared/prioq.c \
697         src/shared/prioq.h \
698         src/shared/sleep-config.c \
699         src/shared/sleep-config.h \
700         src/shared/strv.c \
701         src/shared/strv.h \
702         src/shared/env-util.c \
703         src/shared/env-util.h \
704         src/shared/strbuf.c \
705         src/shared/strbuf.h \
706         src/shared/strxcpyx.c \
707         src/shared/strxcpyx.h \
708         src/shared/conf-parser.c \
709         src/shared/conf-parser.h \
710         src/shared/log.c \
711         src/shared/log.h \
712         src/shared/ratelimit.h \
713         src/shared/ratelimit.c \
714         src/shared/exit-status.c \
715         src/shared/exit-status.h \
716         src/shared/utf8.c \
717         src/shared/utf8.h \
718         src/shared/gunicode.c \
719         src/shared/gunicode.h \
720         src/shared/pager.c \
721         src/shared/pager.h \
722         src/shared/socket-util.c \
723         src/shared/socket-util.h \
724         src/shared/conf-files.c \
725         src/shared/conf-files.h \
726         src/shared/cgroup-util.c \
727         src/shared/cgroup-util.h \
728         src/shared/cgroup-show.c \
729         src/shared/cgroup-show.h \
730         src/shared/unit-name.c \
731         src/shared/unit-name.h \
732         src/shared/utmp-wtmp.c \
733         src/shared/utmp-wtmp.h \
734         src/shared/watchdog.c \
735         src/shared/watchdog.h \
736         src/shared/spawn-ask-password-agent.c \
737         src/shared/spawn-ask-password-agent.h \
738         src/shared/replace-var.c \
739         src/shared/replace-var.h \
740         src/shared/spawn-polkit-agent.c \
741         src/shared/spawn-polkit-agent.h \
742         src/shared/hwclock.c \
743         src/shared/hwclock.h \
744         src/shared/time-dst.c \
745         src/shared/time-dst.h \
746         src/shared/calendarspec.c \
747         src/shared/calendarspec.h \
748         src/shared/fileio.c \
749         src/shared/fileio.h \
750         src/shared/output-mode.h \
751         src/shared/MurmurHash3.c \
752         src/shared/MurmurHash3.h \
753         src/shared/acpi-fpdt.h \
754         src/shared/acpi-fpdt.c \
755         src/shared/boot-timestamps.h \
756         src/shared/boot-timestamps.c \
757         src/shared/mkdir.c \
758         src/shared/mkdir.h \
759         src/shared/smack-util.c \
760         src/shared/smack-util.h \
761         src/shared/apparmor-util.c \
762         src/shared/apparmor-util.h \
763         src/shared/ima-util.c \
764         src/shared/ima-util.h \
765         src/shared/ptyfwd.c \
766         src/shared/ptyfwd.h \
767         src/shared/net-util.c \
768         src/shared/net-util.h \
769         src/shared/errno-list.c \
770         src/shared/errno-list.h \
771         src/shared/syscall-list.c \
772         src/shared/syscall-list.h \
773         src/shared/audit.c \
774         src/shared/audit.h
775
776 nodist_libsystemd_shared_la_SOURCES = \
777         src/shared/errno-from-name.h \
778         src/shared/errno-to-name.h \
779         src/shared/syscall-from-name.h \
780         src/shared/syscall-to-name.h
781
782 # ------------------------------------------------------------------------------
783 noinst_LTLIBRARIES += \
784         libsystemd-units.la
785
786 libsystemd_units_la_SOURCES = \
787         src/shared/install.c \
788         src/shared/install.h \
789         src/shared/install-printf.c \
790         src/shared/install-printf.h \
791         src/shared/path-lookup.c \
792         src/shared/path-lookup.h \
793         src/shared/specifier.c \
794         src/shared/specifier.h
795
796 libsystemd_units_la_CFLAGS = \
797         $(AM_CFLAGS)
798
799 # ------------------------------------------------------------------------------
800 noinst_LTLIBRARIES += \
801         libsystemd-label.la
802
803 libsystemd_label_la_SOURCES = \
804         src/shared/socket-label.c \
805         src/shared/label.c \
806         src/shared/label.h \
807         src/shared/selinux-util.c \
808         src/shared/selinux-util.h \
809         src/shared/mkdir-label.c \
810         src/shared/ask-password-api.c \
811         src/shared/ask-password-api.h \
812         src/shared/fileio-label.c \
813         src/shared/fileio-label.h \
814         src/shared/dev-setup.c \
815         src/shared/dev-setup.h
816
817 libsystemd_label_la_CFLAGS = \
818         $(AM_CFLAGS) \
819         $(SELINUX_CFLAGS)
820
821 libsystemd_label_la_LIBADD = \
822         $(SELINUX_LIBS)
823
824 # ------------------------------------------------------------------------------
825 noinst_LTLIBRARIES += \
826         libsystemd-logs.la
827
828 libsystemd_logs_la_SOURCES = \
829         src/shared/logs-show.c \
830         src/shared/logs-show.h
831
832 # ------------------------------------------------------------------------------
833 noinst_LTLIBRARIES += \
834         libsystemd-capability.la
835
836 libsystemd_capability_la_SOURCES = \
837         src/shared/capability.c \
838         src/shared/capability.h
839
840 libsystemd_capability_la_CFLAGS = \
841         $(AM_CFLAGS) \
842         $(CAP_CFLAGS)
843
844 libsystemd_capability_la_LIBADD = \
845         $(CAP_LIBS)
846
847 # ------------------------------------------------------------------------------
848 if HAVE_ACL
849 noinst_LTLIBRARIES += \
850         libsystemd-acl.la
851
852 libsystemd_acl_la_SOURCES = \
853         src/shared/acl-util.c \
854         src/shared/acl-util.h
855
856 libsystemd_acl_la_CFLAGS = \
857         $(AM_CFLAGS) \
858         $(ACL_CFLAGS)
859
860 libsystemd_acl_la_LIBADD = \
861         $(ACL_LIBS)
862 endif
863
864 # ------------------------------------------------------------------------------
865 noinst_LTLIBRARIES += \
866         libsystemd-core.la
867
868 libsystemd_core_la_SOURCES = \
869         src/core/unit.c \
870         src/core/unit.h \
871         src/core/unit-printf.c \
872         src/core/unit-printf.h \
873         src/core/job.c \
874         src/core/job.h \
875         src/core/manager.c \
876         src/core/manager.h \
877         src/core/transaction.c \
878         src/core/transaction.h \
879         src/core/load-fragment.c \
880         src/core/load-fragment.h \
881         src/core/service.c \
882         src/core/service.h \
883         src/core/automount.c \
884         src/core/automount.h \
885         src/core/mount.c \
886         src/core/mount.h \
887         src/core/swap.c \
888         src/core/swap.h \
889         src/core/device.c \
890         src/core/device.h \
891         src/core/target.c \
892         src/core/target.h \
893         src/core/snapshot.c \
894         src/core/snapshot.h \
895         src/core/socket.c \
896         src/core/socket.h \
897         src/core/timer.c \
898         src/core/timer.h \
899         src/core/path.c \
900         src/core/path.h \
901         src/core/slice.c \
902         src/core/slice.h \
903         src/core/scope.c \
904         src/core/scope.h \
905         src/core/load-dropin.c \
906         src/core/load-dropin.h \
907         src/core/execute.c \
908         src/core/execute.h \
909         src/core/kill.c \
910         src/core/kill.h \
911         src/core/dbus.c \
912         src/core/dbus.h \
913         src/core/dbus-manager.c \
914         src/core/dbus-manager.h \
915         src/core/dbus-unit.c \
916         src/core/dbus-unit.h \
917         src/core/dbus-job.c \
918         src/core/dbus-job.h \
919         src/core/dbus-service.c \
920         src/core/dbus-service.h \
921         src/core/dbus-socket.c \
922         src/core/dbus-socket.h \
923         src/core/dbus-timer.c \
924         src/core/dbus-timer.h \
925         src/core/dbus-target.c \
926         src/core/dbus-target.h \
927         src/core/dbus-mount.c \
928         src/core/dbus-mount.h \
929         src/core/dbus-automount.c \
930         src/core/dbus-automount.h \
931         src/core/dbus-swap.c \
932         src/core/dbus-swap.h \
933         src/core/dbus-snapshot.c \
934         src/core/dbus-snapshot.h \
935         src/core/dbus-device.c \
936         src/core/dbus-device.h \
937         src/core/dbus-path.c \
938         src/core/dbus-path.h \
939         src/core/dbus-slice.c \
940         src/core/dbus-slice.h \
941         src/core/dbus-scope.c \
942         src/core/dbus-scope.h \
943         src/core/dbus-execute.c \
944         src/core/dbus-execute.h \
945         src/core/dbus-kill.c \
946         src/core/dbus-kill.h \
947         src/core/dbus-cgroup.c \
948         src/core/dbus-cgroup.h \
949         src/core/dbus-client-track.c \
950         src/core/dbus-client-track.h \
951         src/core/cgroup.c \
952         src/core/cgroup.h \
953         src/core/selinux-access.c \
954         src/core/selinux-access.h \
955         src/core/selinux-setup.c \
956         src/core/selinux-setup.h \
957         src/core/smack-setup.c \
958         src/core/smack-setup.h \
959         src/core/ima-setup.c \
960         src/core/ima-setup.h \
961         src/core/locale-setup.h \
962         src/core/locale-setup.c \
963         src/core/hostname-setup.c \
964         src/core/hostname-setup.h \
965         src/core/machine-id-setup.c \
966         src/core/machine-id-setup.h \
967         src/core/mount-setup.c \
968         src/core/mount-setup.h \
969         src/core/loopback-setup.h \
970         src/core/loopback-setup.c \
971         src/core/condition.c \
972         src/core/condition.h \
973         src/core/namespace.c \
974         src/core/namespace.h \
975         src/core/tcpwrap.c \
976         src/core/tcpwrap.h \
977         src/core/build.h \
978         src/core/sysfs-show.h \
979         src/core/switch-root.h \
980         src/core/switch-root.c \
981         src/core/killall.h \
982         src/core/killall.c \
983         src/core/audit-fd.c \
984         src/core/audit-fd.h \
985         src/core/async.c \
986         src/core/async.h
987
988 if HAVE_KMOD
989 libsystemd_core_la_SOURCES += \
990         src/core/kmod-setup.c \
991         src/core/kmod-setup.h
992 endif
993
994 nodist_libsystemd_core_la_SOURCES = \
995         src/core/load-fragment-gperf.c \
996         src/core/load-fragment-gperf-nulstr.c
997
998 libsystemd_core_la_CFLAGS = \
999         $(AM_CFLAGS) \
1000         $(LIBWRAP_CFLAGS) \
1001         $(PAM_CFLAGS) \
1002         $(AUDIT_CFLAGS) \
1003         $(KMOD_CFLAGS) \
1004         -pthread
1005
1006 libsystemd_core_la_LIBADD = \
1007         libsystemd-capability.la \
1008         libsystemd-units.la \
1009         libsystemd-label.la \
1010         libsystemd-id128-internal.la \
1011         libsystemd-daemon-internal.la \
1012         libudev-internal.la \
1013         libsystemd-shared.la \
1014         libsystemd-rtnl.la \
1015         libsystemd-bus-internal.la \
1016         $(LIBWRAP_LIBS) \
1017         $(PAM_LIBS) \
1018         $(AUDIT_LIBS) \
1019         $(CAP_LIBS) \
1020         $(KMOD_LIBS)
1021
1022 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1023         $(AM_V_at)$(MKDIR_P) $(dir $@)
1024         $(AM_V_GEN)$(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 ";" }' < $< > $@
1025
1026 EXTRA_DIST += \
1027         src/core/load-fragment-gperf.gperf.m4
1028
1029 CLEANFILES += \
1030         src/core/load-fragment-gperf.gperf \
1031         src/core/load-fragment-gperf.c \
1032         src/core/load-fragment-gperf-nulstr.c \
1033         src/shared/syscall-list.txt \
1034         src/shared/syscall-from-name.gperf \
1035         src/shared/errno-list.txt \
1036         src/shared/errno-from-name.gperf
1037
1038 BUILT_SOURCES += \
1039         src/shared/syscall-from-name.h \
1040         src/shared/syscall-to-name.h \
1041         src/shared/errno-from-name.h \
1042         src/shared/errno-to-name.h
1043
1044 src/shared/syscall-list.txt:
1045         $(AM_V_at)$(MKDIR_P) $(dir $@)
1046         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
1047
1048 src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt
1049         $(AM_V_at)$(MKDIR_P) $(dir $@)
1050         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1051
1052 src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf
1053         $(AM_V_at)$(MKDIR_P) $(dir $@)
1054         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1055
1056 src/shared/syscall-to-name.h: src/shared/syscall-list.txt
1057         $(AM_V_at)$(MKDIR_P) $(dir $@)
1058         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1059
1060 src/shared/errno-list.txt:
1061         $(AM_V_at)$(MKDIR_P) $(dir $@)
1062         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
1063
1064 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1065         $(AM_V_at)$(MKDIR_P) $(dir $@)
1066         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1067
1068 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1069         $(AM_V_at)$(MKDIR_P) $(dir $@)
1070         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1071
1072 src/shared/errno-to-name.h: src/shared/errno-list.txt
1073         $(AM_V_at)$(MKDIR_P) $(dir $@)
1074         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1075
1076 # ------------------------------------------------------------------------------
1077 systemd_SOURCES = \
1078         src/core/main.c
1079
1080 systemd_LDADD = \
1081         libsystemd-core.la \
1082         $(RT_LIBS)
1083
1084 dist_pkgsysconf_DATA += \
1085         src/core/system.conf \
1086         src/core/user.conf
1087
1088 dist_dbuspolicy_DATA += \
1089         src/core/org.freedesktop.systemd1.conf
1090
1091 dist_dbussystemservice_DATA += \
1092         src/core/org.freedesktop.systemd1.service
1093
1094 polkitpolicy_in_in_files += \
1095         src/core/org.freedesktop.systemd1.policy.in.in
1096
1097 pkgconfigdata_DATA = \
1098         src/core/systemd.pc
1099
1100 nodist_rpmmacros_DATA = \
1101         src/core/macros.systemd
1102
1103 EXTRA_DIST += \
1104         src/core/systemd.pc.in \
1105         src/core/macros.systemd.in
1106
1107 CLEANFILES += \
1108         src/core/macros.systemd \
1109         src/core/org.freedesktop.systemd1.policy.in
1110
1111 # ------------------------------------------------------------------------------
1112 manual_tests += \
1113         test-engine \
1114         test-ns \
1115         test-loopback \
1116         test-hostname \
1117         test-daemon \
1118         test-cgroup \
1119         test-install \
1120         test-watchdog \
1121         test-log
1122
1123 tests += \
1124         test-job-type \
1125         test-env-replace \
1126         test-strbuf \
1127         test-strv \
1128         test-path-util \
1129         test-strxcpyx \
1130         test-unit-name \
1131         test-unit-file \
1132         test-utf8 \
1133         test-ellipsize \
1134         test-util \
1135         test-namespace \
1136         test-date \
1137         test-sleep \
1138         test-replace-var \
1139         test-sched-prio \
1140         test-calendarspec \
1141         test-strip-tab-ansi \
1142         test-cgroup-util \
1143         test-cgroup-mask \
1144         test-prioq \
1145         test-fileio \
1146         test-time \
1147         test-hashmap \
1148         test-list \
1149         test-tables \
1150         test-device-nodes
1151
1152 EXTRA_DIST += \
1153         test/sched_idle_bad.service \
1154         test/sched_idle_ok.service \
1155         test/sched_rr_bad.service \
1156         test/sched_rr_ok.service \
1157         test/sched_rr_change.service \
1158         test/son.service \
1159         test/daughter.service \
1160         test/parent.slice
1161
1162 EXTRA_DIST += \
1163         src/test/test-helper.h
1164
1165 test_device_nodes_SOURCES = \
1166         src/test/test-device-nodes.c
1167
1168 test_device_nodes_LDADD = \
1169         libsystemd-shared.la
1170
1171 test_engine_SOURCES = \
1172         src/test/test-engine.c
1173
1174 test_engine_LDADD = \
1175         libsystemd-core.la \
1176         $(RT_LIBS)
1177
1178 test_job_type_SOURCES = \
1179         src/test/test-job-type.c
1180
1181 test_job_type_LDADD = \
1182         libsystemd-core.la \
1183         $(RT_LIBS)
1184
1185 test_ns_SOURCES = \
1186         src/test/test-ns.c
1187
1188 test_ns_LDADD = \
1189         libsystemd-core.la
1190
1191 test_loopback_SOURCES = \
1192         src/test/test-loopback.c
1193
1194 test_loopback_LDADD = \
1195         libsystemd-core.la
1196
1197 test_hostname_SOURCES = \
1198         src/test/test-hostname.c
1199
1200 test_hostname_LDADD = \
1201         libsystemd-core.la
1202
1203 if ENABLE_EFI
1204 manual_tests += \
1205         test-boot-timestamp
1206
1207 test_boot_timestamp_SOURCES = \
1208         src/test/test-boot-timestamps.c
1209
1210 test_boot_timestamp_LDADD = \
1211         libsystemd-shared.la
1212 endif
1213
1214 test_unit_name_SOURCES = \
1215         src/test/test-unit-name.c
1216
1217 test_unit_name_LDADD = \
1218         libsystemd-core.la \
1219         $(RT_LIBS)
1220
1221 test_unit_file_SOURCES = \
1222         src/test/test-unit-file.c
1223
1224 test_unit_file_LDADD = \
1225         libsystemd-core.la \
1226         $(RT_LIBS)
1227
1228 test_utf8_SOURCES = \
1229         src/test/test-utf8.c
1230
1231 test_utf8_LDADD = \
1232         libsystemd-shared.la
1233
1234 test_util_SOURCES = \
1235         src/test/test-util.c
1236
1237 test_util_LDADD = \
1238         libsystemd-core.la
1239
1240 test_namespace_SOURCES = \
1241         src/test/test-namespace.c
1242
1243 test_namespace_LDADD = \
1244         libsystemd-core.la
1245
1246 test_hashmap_SOURCES = \
1247         src/test/test-hashmap.c
1248
1249 test_hashmap_LDADD = \
1250         libsystemd-core.la
1251
1252 test_list_SOURCES = \
1253         src/test/test-list.c
1254
1255 test_list_LDADD = \
1256         libsystemd-core.la
1257
1258 test_tables_SOURCES = \
1259         src/test/test-tables.c \
1260         src/shared/test-tables.h
1261
1262 test_tables_LDADD = \
1263         libsystemd-logs.la \
1264         libsystemd-journal-internal.la \
1265         libsystemd-core.la \
1266         $(RT_LIBS)
1267
1268 test_prioq_SOURCES = \
1269         src/test/test-prioq.c
1270
1271 test_prioq_LDADD = \
1272         libsystemd-core.la
1273
1274 test_fileio_SOURCES = \
1275         src/test/test-fileio.c
1276
1277 test_fileio_LDADD = \
1278         libsystemd-core.la
1279
1280 test_time_SOURCES = \
1281         src/test/test-time.c
1282
1283 test_time_LDADD = \
1284         libsystemd-core.la
1285
1286 test_log_SOURCES = \
1287         src/test/test-log.c
1288
1289 test_log_LDADD = \
1290         libsystemd-core.la
1291
1292 test_ellipsize_SOURCES = \
1293         src/test/test-ellipsize.c
1294
1295 test_ellipsize_LDADD = \
1296         libsystemd-core.la
1297
1298 test_date_SOURCES = \
1299         src/test/test-date.c
1300
1301 test_date_LDADD = \
1302         libsystemd-core.la
1303
1304 test_sleep_SOURCES = \
1305         src/test/test-sleep.c
1306
1307 test_sleep_LDADD = \
1308         libsystemd-core.la
1309
1310 test_replace_var_SOURCES = \
1311         src/test/test-replace-var.c
1312
1313 test_replace_var_LDADD = \
1314         libsystemd-shared.la
1315
1316 test_calendarspec_SOURCES = \
1317         src/test/test-calendarspec.c
1318
1319 test_calendarspec_LDADD = \
1320         libsystemd-shared.la
1321
1322 test_strip_tab_ansi_SOURCES = \
1323         src/test/test-strip-tab-ansi.c
1324
1325 test_strip_tab_ansi_LDADD = \
1326         libsystemd-shared.la
1327
1328 test_daemon_SOURCES = \
1329         src/test/test-daemon.c
1330
1331 test_daemon_LDADD = \
1332         libsystemd-daemon-internal.la \
1333         libsystemd-shared.la
1334
1335 test_cgroup_SOURCES = \
1336         src/test/test-cgroup.c
1337
1338 test_cgroup_LDADD = \
1339         libsystemd-label.la \
1340         libsystemd-shared.la
1341
1342 test_cgroup_mask_SOURCES = \
1343         src/test/test-cgroup-mask.c
1344
1345 test_cgroup_mask_CFLAGS = \
1346         $(AM_CFLAGS) \
1347         $(DBUS_CFLAGS) \
1348         -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
1349
1350 test_cgroup_mask_LDADD = \
1351         libsystemd-core.la \
1352         $(RT_LIBS)
1353
1354 test_cgroup_util_SOURCES = \
1355         src/test/test-cgroup-util.c
1356
1357 test_cgroup_util_LDADD = \
1358         libsystemd-label.la \
1359         libsystemd-daemon-internal.la \
1360         libsystemd-shared.la
1361
1362 test_env_replace_SOURCES = \
1363         src/test/test-env-replace.c
1364
1365 test_env_replace_LDADD = \
1366         libsystemd-shared.la
1367
1368 test_strbuf_SOURCES = \
1369         src/test/test-strbuf.c
1370
1371 test_strbuf_LDADD = \
1372         libsystemd-shared.la
1373
1374 test_strv_SOURCES = \
1375         src/test/test-strv.c
1376
1377 test_strv_LDADD = \
1378         libsystemd-units.la \
1379         libsystemd-id128-internal.la \
1380         libsystemd-shared.la
1381
1382 test_path_util_SOURCES = \
1383         src/test/test-path-util.c
1384
1385 test_path_util_LDADD = \
1386         libsystemd-shared.la
1387
1388 test_strxcpyx_SOURCES = \
1389         src/test/test-strxcpyx.c
1390
1391 test_strxcpyx_LDADD = \
1392         libsystemd-shared.la
1393
1394 test_install_SOURCES = \
1395         src/test/test-install.c
1396
1397 test_install_LDADD = \
1398         libsystemd-units.la \
1399         libsystemd-label.la \
1400         libsystemd-id128-internal.la \
1401         libsystemd-shared.la
1402
1403 test_watchdog_SOURCES = \
1404         src/test/test-watchdog.c
1405
1406 test_watchdog_LDADD = \
1407         libsystemd-shared.la
1408
1409 test_sched_prio_SOURCES = \
1410         src/test/test-sched-prio.c
1411
1412 test_sched_prio_CFLAGS = \
1413         $(AM_CFLAGS) \
1414         -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
1415
1416 test_sched_prio_LDADD = \
1417         libsystemd-core.la \
1418         $(RT_LIBS)
1419
1420 # ------------------------------------------------------------------------------
1421 ## .PHONY so it always rebuilds it
1422 .PHONY: coverage lcov-run lcov-report
1423
1424 # run lcov from scratch, always
1425 coverage:
1426         $(MAKE) lcov-run
1427         $(MAKE) lcov-report
1428
1429 coverage_dir = coverage
1430 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1431
1432 if ENABLE_COVERAGE
1433 # reset run coverage tests
1434 lcov-run:
1435         @rm -rf $(coverage_dir)
1436         lcov $(coverage_opts) --zerocounters
1437         -$(MAKE) check
1438
1439 # generate report based on current coverage data
1440 lcov-report:
1441         $(MKDIR_P) $(coverage_dir)
1442         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1443                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1444         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1445         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1446
1447 # lcov doesn't work properly with vpath builds, make sure that bad
1448 # output is not uploaded by mistake.
1449 coverage-sync: coverage
1450         test "$(builddir)" = "$(srcdir)"
1451         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1452
1453 else
1454 lcov-run lcov-report:
1455         echo "Need to reconfigure with --enable-coverage"
1456 endif
1457
1458 # ------------------------------------------------------------------------------
1459 systemd_analyze_SOURCES = \
1460         src/analyze/analyze.c
1461
1462 systemd_analyze_LDADD = \
1463         libsystemd-bus-internal.la \
1464         libsystemd-id128-internal.la \
1465         libsystemd-daemon-internal.la \
1466         libsystemd-shared.la
1467
1468 # ------------------------------------------------------------------------------
1469 systemd_initctl_SOURCES = \
1470         src/initctl/initctl.c
1471
1472 systemd_initctl_LDADD = \
1473         libsystemd-bus-internal.la \
1474         libsystemd-id128-internal.la \
1475         libsystemd-daemon-internal.la \
1476         libsystemd-shared.la
1477
1478 # ------------------------------------------------------------------------------
1479 systemd_update_utmp_SOURCES = \
1480         src/update-utmp/update-utmp.c
1481
1482 systemd_update_utmp_CFLAGS = \
1483         $(AM_CFLAGS) \
1484         $(AUDIT_CFLAGS)
1485
1486 systemd_update_utmp_LDADD = \
1487         libsystemd-bus-internal.la \
1488         libsystemd-id128-internal.la \
1489         libsystemd-daemon-internal.la \
1490         libsystemd-shared.la \
1491         $(AUDIT_LIBS)
1492
1493 # ------------------------------------------------------------------------------
1494 systemd_shutdownd_SOURCES = \
1495         src/shutdownd/shutdownd.c
1496
1497 systemd_shutdownd_LDADD = \
1498         libsystemd-label.la \
1499         libsystemd-daemon-internal.la \
1500         libsystemd-shared.la
1501
1502 dist_doc_DATA += \
1503         src/systemd/sd-shutdown.h
1504
1505 # ------------------------------------------------------------------------------
1506 systemd_shutdown_SOURCES = \
1507         src/core/umount.c \
1508         src/core/umount.h \
1509         src/core/shutdown.c \
1510         src/core/mount-setup.c \
1511         src/core/mount-setup.h \
1512         src/core/killall.h \
1513         src/core/killall.c
1514
1515 systemd_shutdown_LDADD = \
1516         libsystemd-label.la \
1517         libudev-internal.la \
1518         libsystemd-shared.la
1519
1520 # ------------------------------------------------------------------------------
1521 if HAVE_KMOD
1522 systemd_modules_load_SOURCES = \
1523         src/modules-load/modules-load.c
1524
1525 systemd_modules_load_CFLAGS = \
1526         $(AM_CFLAGS) \
1527         $(KMOD_CFLAGS)
1528
1529 systemd_modules_load_LDADD = \
1530         libsystemd-shared.la \
1531         $(KMOD_LIBS)
1532
1533 rootlibexec_PROGRAMS += \
1534         systemd-modules-load
1535
1536 nodist_systemunit_DATA += \
1537         units/systemd-modules-load.service
1538
1539 SYSINIT_TARGET_WANTS += \
1540         systemd-modules-load.service
1541
1542 if ENABLE_TMPFILES
1543 nodist_systemunit_DATA += \
1544         units/kmod-static-nodes.service
1545
1546 SYSINIT_TARGET_WANTS += \
1547         kmod-static-nodes.service
1548 endif
1549 endif
1550
1551 EXTRA_DIST += \
1552         units/systemd-modules-load.service.in \
1553         units/kmod-static-nodes.service.in
1554
1555 # ------------------------------------------------------------------------------
1556 if ENABLE_TMPFILES
1557 systemd_tmpfiles_SOURCES = \
1558         src/tmpfiles/tmpfiles.c \
1559         src/shared/specifier.c \
1560         src/shared/specifier.h
1561
1562 systemd_tmpfiles_LDADD = \
1563         libsystemd-label.la \
1564         libsystemd-capability.la \
1565         libsystemd-id128-internal.la \
1566         libsystemd-shared.la
1567
1568 rootbin_PROGRAMS += \
1569         systemd-tmpfiles
1570
1571 dist_systemunit_DATA += \
1572         units/systemd-tmpfiles-clean.timer
1573
1574 nodist_systemunit_DATA += \
1575         units/systemd-tmpfiles-setup-dev.service \
1576         units/systemd-tmpfiles-setup.service \
1577         units/systemd-tmpfiles-clean.service
1578
1579 dist_tmpfiles_DATA = \
1580         tmpfiles.d/systemd.conf \
1581         tmpfiles.d/tmp.conf \
1582         tmpfiles.d/x11.conf
1583
1584 if HAVE_SYSV_COMPAT
1585 dist_tmpfiles_DATA += \
1586         tmpfiles.d/legacy.conf
1587 endif
1588
1589 SYSINIT_TARGET_WANTS += \
1590         systemd-tmpfiles-setup-dev.service \
1591         systemd-tmpfiles-setup.service
1592
1593 dist_zshcompletion_DATA += \
1594         shell-completion/zsh/_systemd-tmpfiles
1595
1596 TIMERS_TARGET_WANTS += \
1597         systemd-tmpfiles-clean.timer
1598
1599 INSTALL_DIRS += \
1600         $(tmpfilesdir) \
1601         $(sysconfdir)/tmpfiles.d
1602 endif
1603
1604 EXTRA_DIST += \
1605         units/systemd-tmpfiles-setup-dev.service.in \
1606         units/systemd-tmpfiles-setup.service.in \
1607         units/systemd-tmpfiles-clean.service.in
1608
1609 # ------------------------------------------------------------------------------
1610 systemd_machine_id_setup_SOURCES = \
1611         src/machine-id-setup/machine-id-setup-main.c \
1612         src/core/machine-id-setup.c \
1613         src/core/machine-id-setup.h
1614
1615 systemd_machine_id_setup_LDADD = \
1616         libsystemd-label.la \
1617         libsystemd-id128-internal.la \
1618         libsystemd-shared.la
1619
1620 # ------------------------------------------------------------------------------
1621 systemd_sysctl_SOURCES = \
1622         src/sysctl/sysctl.c
1623
1624 systemd_sysctl_LDADD = \
1625         libsystemd-shared.la
1626
1627 # ------------------------------------------------------------------------------
1628 systemd_sleep_SOURCES = \
1629         src/sleep/sleep.c
1630
1631 systemd_sleep_LDADD = \
1632         libsystemd-shared.la
1633
1634 # ------------------------------------------------------------------------------
1635 systemd_fsck_SOURCES = \
1636         src/fsck/fsck.c
1637
1638 systemd_fsck_LDADD = \
1639         libsystemd-bus-internal.la \
1640         libsystemd-id128-internal.la \
1641         libsystemd-daemon-internal.la \
1642         libudev-internal.la \
1643         libsystemd-shared.la
1644
1645 # ------------------------------------------------------------------------------
1646 systemd_ac_power_SOURCES = \
1647         src/ac-power/ac-power.c
1648
1649 systemd_ac_power_LDADD = \
1650         libudev-internal.la \
1651         libsystemd-shared.la
1652
1653 # ------------------------------------------------------------------------------
1654 systemd_detect_virt_SOURCES = \
1655         src/detect-virt/detect-virt.c
1656
1657 systemd_detect_virt_LDADD = \
1658         libsystemd-shared.la
1659
1660 systemd-detect-virt-install-hook:
1661         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1662
1663 INSTALL_EXEC_HOOKS += \
1664         systemd-detect-virt-install-hook
1665
1666 # ------------------------------------------------------------------------------
1667 systemd_delta_SOURCES = \
1668         src/delta/delta.c
1669
1670 systemd_delta_LDADD = \
1671         libsystemd-shared.la
1672
1673 # ------------------------------------------------------------------------------
1674 systemd_getty_generator_SOURCES = \
1675         src/getty-generator/getty-generator.c
1676
1677 systemd_getty_generator_LDADD = \
1678         libsystemd-label.la \
1679         libsystemd-shared.la
1680
1681 # ------------------------------------------------------------------------------
1682 systemd_fstab_generator_SOURCES = \
1683         src/fstab-generator/fstab-generator.c \
1684         src/core/mount-setup.c
1685
1686 systemd_fstab_generator_LDADD = \
1687         libsystemd-label.la \
1688         libsystemd-shared.la
1689
1690 # ------------------------------------------------------------------------------
1691 systemd_system_update_generator_SOURCES = \
1692         src/system-update-generator/system-update-generator.c
1693
1694 systemd_system_update_generator_LDADD = \
1695         libsystemd-label.la \
1696         libsystemd-shared.la
1697
1698 if ENABLE_EFI
1699 # ------------------------------------------------------------------------------
1700 systemgenerator_PROGRAMS +=  \
1701         systemd-efi-boot-generator
1702
1703 systemd_efi_boot_generator_SOURCES = \
1704         src/efi-boot-generator/efi-boot-generator.c
1705
1706 systemd_efi_boot_generator_LDADD = \
1707         libsystemd-label.la \
1708         libsystemd-shared.la
1709
1710 # ------------------------------------------------------------------------------
1711 bootctl_SOURCES = \
1712         src/boot/boot.h \
1713         src/boot/boot-loader.h \
1714         src/boot/bootctl.c \
1715         src/boot/boot-loader.c \
1716         src/boot/boot-efi.c
1717
1718 bootctl_LDADD = \
1719         libsystemd-shared.la \
1720         libsystemd-id128-internal.la \
1721         libsystemd-daemon-internal.la
1722
1723 bin_PROGRAMS += \
1724         bootctl
1725
1726 dist_zshcompletion_DATA += \
1727         shell-completion/zsh/_bootctl
1728
1729 endif
1730
1731 # ------------------------------------------------------------------------------
1732 if HAVE_BLKID
1733 systemgenerator_PROGRAMS +=  \
1734         systemd-gpt-auto-generator
1735
1736 systemd_gpt_auto_generator_SOURCES = \
1737         src/gpt-auto-generator/gpt-auto-generator.c
1738
1739 systemd_gpt_auto_generator_LDADD = \
1740         libsystemd-label.la \
1741         libsystemd-id128-internal.la \
1742         libudev-internal.la \
1743         libsystemd-shared.la \
1744         $(BLKID_LIBS)
1745
1746 systemd_gpt_auto_generator_CFLAGS = \
1747         $(AM_CFLAGS) \
1748         $(BLKID_CFLAGS)
1749 endif
1750
1751 # ------------------------------------------------------------------------------
1752 systemd_rc_local_generator_SOURCES = \
1753         src/rc-local-generator/rc-local-generator.c
1754
1755 systemd_rc_local_generator_LDADD = \
1756         libsystemd-label.la \
1757         libsystemd-shared.la
1758
1759 # ------------------------------------------------------------------------------
1760 systemd_remount_fs_SOURCES = \
1761         src/remount-fs/remount-fs.c \
1762         src/core/mount-setup.c \
1763         src/core/mount-setup.h
1764
1765 systemd_remount_fs_LDADD = \
1766         libsystemd-label.la \
1767         libsystemd-shared.la
1768
1769 # ------------------------------------------------------------------------------
1770 systemd_cgroups_agent_SOURCES = \
1771         src/cgroups-agent/cgroups-agent.c
1772
1773 systemd_cgroups_agent_LDADD = \
1774         libsystemd-bus-internal.la \
1775         libsystemd-id128-internal.la \
1776         libsystemd-daemon-internal.la \
1777         libsystemd-shared.la
1778
1779 # ------------------------------------------------------------------------------
1780 systemctl_SOURCES = \
1781         src/systemctl/systemctl.c
1782
1783 systemctl_LDADD = \
1784         libsystemd-units.la \
1785         libsystemd-label.la \
1786         libsystemd-bus-internal.la \
1787         libsystemd-logs.la \
1788         libsystemd-login-internal.la \
1789         libsystemd-journal-internal.la \
1790         libsystemd-id128-internal.la \
1791         libsystemd-daemon-internal.la \
1792         libsystemd-shared.la
1793
1794 # ------------------------------------------------------------------------------
1795 systemd_notify_SOURCES = \
1796         src/notify/notify.c \
1797         src/readahead/sd-readahead.c
1798
1799 systemd_notify_LDADD = \
1800         libsystemd-daemon-internal.la \
1801         libsystemd-shared.la
1802
1803 # ------------------------------------------------------------------------------
1804 systemd_ask_password_SOURCES = \
1805         src/ask-password/ask-password.c
1806
1807 systemd_ask_password_LDADD = \
1808         libsystemd-label.la \
1809         libsystemd-shared.la
1810
1811 # ------------------------------------------------------------------------------
1812 systemd_reply_password_SOURCES = \
1813         src/reply-password/reply-password.c
1814
1815 systemd_reply_password_LDADD = \
1816         libsystemd-shared.la
1817
1818 # ------------------------------------------------------------------------------
1819 systemd_cgls_SOURCES = \
1820         src/cgls/cgls.c
1821
1822 systemd_cgls_LDADD = \
1823         libsystemd-shared.la
1824
1825 # ------------------------------------------------------------------------------
1826 systemd_cgtop_SOURCES = \
1827         src/cgtop/cgtop.c
1828
1829 systemd_cgtop_LDADD = \
1830         libsystemd-shared.la
1831
1832 # ------------------------------------------------------------------------------
1833 systemd_nspawn_SOURCES = \
1834         src/nspawn/nspawn.c \
1835         src/core/mount-setup.c \
1836         src/core/mount-setup.h \
1837         src/core/loopback-setup.c \
1838         src/core/loopback-setup.h
1839
1840 systemd_nspawn_LDADD = \
1841         libsystemd-label.la \
1842         libsystemd-capability.la \
1843         libsystemd-bus-internal.la \
1844         libsystemd-id128-internal.la \
1845         libsystemd-daemon-internal.la \
1846         libsystemd-shared.la \
1847         libsystemd-rtnl.la
1848
1849 # ------------------------------------------------------------------------------
1850 systemd_run_SOURCES = \
1851         src/run/run.c
1852
1853 systemd_run_LDADD = \
1854         libsystemd-label.la \
1855         libsystemd-capability.la \
1856         libsystemd-bus-internal.la \
1857         libsystemd-daemon-internal.la \
1858         libsystemd-id128-internal.la \
1859         libsystemd-shared.la
1860
1861 # ------------------------------------------------------------------------------
1862 systemd_bus_proxyd_SOURCES = \
1863         src/bus-proxyd/bus-proxyd.c
1864
1865 systemd_bus_proxyd_LDADD = \
1866         libsystemd-bus-internal.la \
1867         libsystemd-daemon-internal.la \
1868         libsystemd-id128-internal.la \
1869         libsystemd-shared.la
1870
1871 bus-proxyd-install-hook:
1872         $(AM_V_LN)$(LN_S) -f ../../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
1873
1874 bus-proxyd-uninstall-hook:
1875         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
1876
1877 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
1878 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
1879 # ------------------------------------------------------------------------------
1880 systemd_tty_ask_password_agent_SOURCES = \
1881         src/tty-ask-password-agent/tty-ask-password-agent.c
1882
1883 systemd_tty_ask_password_agent_LDADD = \
1884         libsystemd-label.la \
1885         libsystemd-shared.la
1886
1887 # ------------------------------------------------------------------------------
1888 libsystemd_daemon_la_SOURCES = \
1889         src/libsystemd-daemon/libsystemd-daemon.sym \
1890         src/libsystemd-daemon/sd-daemon.c
1891
1892 libsystemd_daemon_internal_la_SOURCES = \
1893         $(libsystemd_daemon_la_SOURCES)
1894
1895 libsystemd_daemon_internal_la_CPPFLAGS = \
1896         $(AM_CPPFLAGS) \
1897         -DSD_DAEMON_DISABLE_MQ
1898
1899 libsystemd_daemon_la_CFLAGS = \
1900         $(AM_CFLAGS) \
1901         -fvisibility=hidden \
1902         -DSD_EXPORT_SYMBOLS
1903
1904 libsystemd_daemon_la_LDFLAGS = \
1905         $(AM_LDFLAGS) \
1906         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1907         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1908
1909 libsystemd_daemon_la_LIBADD =  \
1910         $(RT_LIBS)
1911
1912 pkginclude_HEADERS += \
1913         src/systemd/sd-daemon.h
1914
1915 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1916 libsystemd-daemon-install-hook:
1917         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
1918
1919 libsystemd-daemon-uninstall-hook:
1920         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1921
1922 INSTALL_EXEC_HOOKS += libsystemd-daemon-install-hook
1923 UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
1924
1925 lib_LTLIBRARIES += \
1926         libsystemd-daemon.la
1927
1928 noinst_LTLIBRARIES += \
1929         libsystemd-daemon-internal.la
1930
1931 pkgconfiglib_DATA += \
1932         src/libsystemd-daemon/libsystemd-daemon.pc
1933
1934 EXTRA_DIST += \
1935         src/libsystemd-daemon/libsystemd-daemon.pc.in
1936
1937 # ------------------------------------------------------------------------------
1938 libsystemd_bus_la_SOURCES = \
1939         src/libsystemd-bus/libsystemd-bus.sym \
1940         src/systemd/sd-bus.h \
1941         src/systemd/sd-bus-protocol.h \
1942         src/systemd/sd-bus-vtable.h \
1943         src/systemd/sd-memfd.h \
1944         src/systemd/sd-utf8.h \
1945         src/systemd/sd-event.h \
1946         src/libsystemd-bus/sd-bus.c \
1947         src/libsystemd-bus/bus-control.c \
1948         src/libsystemd-bus/bus-control.h \
1949         src/libsystemd-bus/bus-error.c \
1950         src/libsystemd-bus/bus-error.h \
1951         src/libsystemd-bus/bus-internal.c \
1952         src/libsystemd-bus/bus-internal.h \
1953         src/libsystemd-bus/bus-socket.c \
1954         src/libsystemd-bus/bus-socket.h \
1955         src/libsystemd-bus/bus-kernel.c \
1956         src/libsystemd-bus/bus-kernel.h \
1957         src/libsystemd-bus/bus-container.c \
1958         src/libsystemd-bus/bus-container.h \
1959         src/libsystemd-bus/bus-message.c \
1960         src/libsystemd-bus/bus-message.h \
1961         src/libsystemd-bus/bus-creds.c \
1962         src/libsystemd-bus/bus-creds.h \
1963         src/libsystemd-bus/bus-signature.c \
1964         src/libsystemd-bus/bus-signature.h \
1965         src/libsystemd-bus/bus-type.c \
1966         src/libsystemd-bus/bus-type.h \
1967         src/libsystemd-bus/bus-match.c \
1968         src/libsystemd-bus/bus-match.h \
1969         src/libsystemd-bus/bus-bloom.c \
1970         src/libsystemd-bus/bus-bloom.h \
1971         src/libsystemd-bus/bus-introspect.c \
1972         src/libsystemd-bus/bus-introspect.h \
1973         src/libsystemd-bus/bus-objects.c \
1974         src/libsystemd-bus/bus-objects.h \
1975         src/libsystemd-bus/bus-convenience.c \
1976         src/libsystemd-bus/kdbus.h \
1977         src/libsystemd-bus/sd-memfd.c \
1978         src/libsystemd-bus/bus-util.c \
1979         src/libsystemd-bus/bus-util.h \
1980         src/libsystemd-bus/sd-utf8.c \
1981         src/libsystemd-bus/sd-event.c \
1982         src/libsystemd-bus/event-util.h
1983
1984 libsystemd_bus_la_LIBADD = \
1985         libsystemd-id128-internal.la \
1986         libsystemd-daemon-internal.la \
1987         libsystemd-shared.la
1988
1989 libsystemd_bus_la_CFLAGS = \
1990         $(AM_CFLAGS) \
1991         -pthread
1992
1993 libsystemd_bus_la_LDFLAGS = \
1994         $(AM_LDFLAGS) \
1995         -version-info $(LIBSYSTEMD_BUS_CURRENT):$(LIBSYSTEMD_BUS_REVISION):$(LIBSYSTEMD_BUS_AGE) \
1996         -Wl,--version-script=$(top_srcdir)/src/libsystemd-bus/libsystemd-bus.sym
1997
1998 pkgconfiglib_DATA += \
1999         src/libsystemd-bus/libsystemd-bus.pc
2000
2001 EXTRA_DIST += \
2002         src/libsystemd-bus/libsystemd-bus.pc.in
2003
2004 lib_LTLIBRARIES += \
2005         libsystemd-bus.la
2006
2007 libsystemd_bus_internal_la_SOURCES = \
2008         $(libsystemd_bus_la_SOURCES)
2009
2010 libsystemd_bus_internal_la_CFLAGS = \
2011         $(libsystemd_bus_la_CFLAGS)
2012
2013 noinst_LTLIBRARIES += \
2014         libsystemd-bus-internal.la
2015
2016 libsystemd_bus_dump_la_SOURCES = \
2017         src/libsystemd-bus/bus-dump.c \
2018         src/libsystemd-bus/bus-dump.h
2019
2020 libsystemd_bus_dump_la_CFLAGS = \
2021         $(AM_CFLAGS)
2022         $(CAP_CFLAGS)
2023
2024 noinst_LTLIBRARIES += \
2025         libsystemd-bus-dump.la
2026
2027 tests += \
2028         test-bus-marshal \
2029         test-bus-signature \
2030         test-bus-chat \
2031         test-bus-server \
2032         test-bus-match \
2033         test-bus-kernel \
2034         test-bus-kernel-bloom \
2035         test-bus-kernel-benchmark \
2036         test-bus-memfd \
2037         test-bus-zero-copy \
2038         test-bus-introspect \
2039         test-bus-objects \
2040         test-bus-error \
2041         test-bus-creds \
2042         test-event
2043
2044 bin_PROGRAMS += \
2045         busctl
2046
2047 test_bus_marshal_SOURCES = \
2048         src/libsystemd-bus/test-bus-marshal.c
2049
2050 test_bus_marshal_LDADD = \
2051         libsystemd-bus-internal.la \
2052         libsystemd-id128-internal.la \
2053         libsystemd-daemon-internal.la \
2054         libsystemd-shared.la \
2055         libsystemd-bus-dump.la \
2056         libsystemd-capability.la \
2057         $(GLIB_LIBS) \
2058         $(DBUS_LIBS) \
2059         $(CAP_LIBS)
2060
2061 test_bus_marshal_CFLAGS = \
2062         $(AM_CFLAGS) \
2063         $(GLIB_CFLAGS) \
2064         $(DBUS_CFLAGS) \
2065         $(CAP_CFLAGS)
2066
2067 test_bus_signature_SOURCES = \
2068         src/libsystemd-bus/test-bus-signature.c
2069
2070 test_bus_signature_LDADD = \
2071         libsystemd-shared.la \
2072         libsystemd-bus-internal.la
2073
2074 test_bus_chat_SOURCES = \
2075         src/libsystemd-bus/test-bus-chat.c
2076
2077 test_bus_chat_CFLAGS = \
2078         $(AM_CFLAGS) \
2079         -pthread
2080
2081 test_bus_chat_LDADD = \
2082         libsystemd-bus-internal.la \
2083         libsystemd-id128-internal.la \
2084         libsystemd-daemon-internal.la \
2085         libsystemd-shared.la
2086
2087 test_bus_server_SOURCES = \
2088         src/libsystemd-bus/test-bus-server.c
2089
2090 test_bus_server_CFLAGS = \
2091         $(AM_CFLAGS) \
2092         -pthread
2093
2094 test_bus_server_LDADD = \
2095         libsystemd-bus-internal.la \
2096         libsystemd-id128-internal.la \
2097         libsystemd-daemon-internal.la \
2098         libsystemd-shared.la
2099
2100 test_bus_objects_SOURCES = \
2101         src/libsystemd-bus/test-bus-objects.c
2102
2103 test_bus_objects_CFLAGS = \
2104         $(AM_CFLAGS) \
2105         $(CAP_CFLAGS) \
2106         -pthread
2107
2108 test_bus_objects_LDADD = \
2109         libsystemd-bus-internal.la \
2110         libsystemd-id128-internal.la \
2111         libsystemd-daemon-internal.la \
2112         libsystemd-shared.la \
2113         libsystemd-bus-dump.la \
2114         libsystemd-capability.la \
2115         $(CAP_LIBS)
2116
2117 test_bus_error_SOURCES = \
2118         src/libsystemd-bus/test-bus-error.c
2119
2120 test_bus_error_LDADD = \
2121         libsystemd-bus-internal.la \
2122         libsystemd-id128-internal.la \
2123         libsystemd-daemon-internal.la \
2124         libsystemd-shared.la
2125
2126 test_bus_creds_SOURCES = \
2127         src/libsystemd-bus/test-bus-creds.c
2128
2129 test_bus_creds_LDADD = \
2130         libsystemd-bus-internal.la \
2131         libsystemd-id128-internal.la \
2132         libsystemd-daemon-internal.la \
2133         libsystemd-shared.la \
2134         libsystemd-bus-dump.la \
2135         libsystemd-capability.la
2136
2137 test_bus_match_SOURCES = \
2138         src/libsystemd-bus/test-bus-match.c
2139
2140 test_bus_match_LDADD = \
2141         libsystemd-bus-internal.la \
2142         libsystemd-id128-internal.la \
2143         libsystemd-daemon-internal.la \
2144         libsystemd-shared.la
2145
2146 test_bus_kernel_SOURCES = \
2147         src/libsystemd-bus/test-bus-kernel.c
2148
2149 test_bus_kernel_LDADD = \
2150         libsystemd-bus-internal.la \
2151         libsystemd-id128-internal.la \
2152         libsystemd-daemon-internal.la \
2153         libsystemd-shared.la \
2154         libsystemd-bus-dump.la \
2155         libsystemd-capability.la \
2156         $(CAP_LIBS)
2157
2158 test_bus_kernel_CFLAGS = \
2159         $(AM_CFLAGS) \
2160         $(CAP_CFLAGS)
2161
2162 test_bus_kernel_bloom_SOURCES = \
2163         src/libsystemd-bus/test-bus-kernel-bloom.c
2164
2165 test_bus_kernel_bloom_LDADD = \
2166         libsystemd-bus-internal.la \
2167         libsystemd-id128-internal.la \
2168         libsystemd-daemon-internal.la \
2169         libsystemd-shared.la
2170
2171 test_bus_kernel_benchmark_SOURCES = \
2172         src/libsystemd-bus/test-bus-kernel-benchmark.c
2173
2174 test_bus_kernel_benchmark_LDADD = \
2175         libsystemd-bus-internal.la \
2176         libsystemd-id128-internal.la \
2177         libsystemd-daemon-internal.la \
2178         libsystemd-shared.la
2179
2180 test_bus_memfd_SOURCES = \
2181         src/libsystemd-bus/test-bus-memfd.c
2182
2183 test_bus_memfd_LDADD = \
2184         libsystemd-bus-internal.la \
2185         libsystemd-shared.la
2186
2187 test_bus_zero_copy_SOURCES = \
2188         src/libsystemd-bus/test-bus-zero-copy.c
2189
2190 test_bus_zero_copy_LDADD = \
2191         libsystemd-bus-internal.la \
2192         libsystemd-id128-internal.la \
2193         libsystemd-daemon-internal.la \
2194         libsystemd-shared.la \
2195         libsystemd-bus-dump.la \
2196         libsystemd-capability.la \
2197         $(CAP_LIBS)
2198
2199 test_bus_zero_copy_CFLAGS = \
2200         $(AM_CFLAGS) \
2201         $(CAP_CFLAGS)
2202
2203 test_bus_introspect_SOURCES = \
2204         src/libsystemd-bus/test-bus-introspect.c
2205
2206 test_bus_introspect_LDADD = \
2207         libsystemd-shared.la \
2208         libsystemd-bus-internal.la
2209
2210 test_event_SOURCES = \
2211         src/libsystemd-bus/test-event.c
2212
2213 test_event_LDADD = \
2214         libsystemd-bus-internal.la \
2215         libsystemd-id128-internal.la \
2216         libsystemd-daemon-internal.la \
2217         libsystemd-shared.la
2218
2219 busctl_SOURCES = \
2220         src/libsystemd-bus/busctl.c
2221
2222 busctl_LDADD = \
2223         libsystemd-bus-internal.la \
2224         libsystemd-id128-internal.la \
2225         libsystemd-daemon-internal.la \
2226         libsystemd-shared.la \
2227         libsystemd-bus-dump.la \
2228         libsystemd-capability.la \
2229         $(CAP_LIBS)
2230
2231 busctl_CFLAGS = \
2232         $(AM_CFLAGS) \
2233         $(CAP_CFLAGS)
2234
2235 # ------------------------------------------------------------------------------
2236 if ENABLE_GTK_DOC
2237 SUBDIRS += \
2238         docs/libudev
2239
2240 noinst_DATA += \
2241         docs/html/libudev \
2242         docs/html/gudev
2243 endif
2244
2245 include_HEADERS += \
2246         src/libudev/libudev.h
2247
2248 lib_LTLIBRARIES += \
2249         libudev.la
2250
2251 libudev_la_SOURCES =\
2252         src/libudev/libudev.sym \
2253         src/libudev/libudev-private.h \
2254         src/libudev/libudev.c \
2255         src/libudev/libudev-list.c \
2256         src/libudev/libudev-util.c \
2257         src/libudev/libudev-device.c \
2258         src/libudev/libudev-enumerate.c \
2259         src/libudev/libudev-monitor.c \
2260         src/libudev/libudev-queue.c \
2261         src/libudev/libudev-hwdb-def.h \
2262         src/libudev/libudev-hwdb.c
2263
2264 libudev_la_CFLAGS = \
2265         $(AM_CFLAGS) \
2266         -fvisibility=hidden
2267
2268 libudev_la_LDFLAGS = \
2269         $(AM_LDFLAGS) \
2270         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2271         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2272
2273 libudev_la_LIBADD = \
2274         libsystemd-daemon-internal.la \
2275         libsystemd-id128-internal.la \
2276         libsystemd-shared.la
2277
2278 pkgconfiglib_DATA += \
2279         src/libudev/libudev.pc
2280
2281 EXTRA_DIST += \
2282         src/libudev/libudev.pc.in
2283
2284 CLEANFILES += \
2285         src/libudev/libudev.pc \
2286         docs/html/libudev \
2287         docs/html/gudev
2288
2289 docs/html/libudev:
2290         $(AM_V_at)$(MKDIR_P) $(dir $@)
2291         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2292
2293 docs/html/gudev:
2294         $(AM_V_at)$(MKDIR_P) $(dir $@)
2295         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2296
2297 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2298 libudev-install-hook:
2299         libname=libudev.so && $(move-to-rootlibdir)
2300
2301 libudev-uninstall-hook:
2302         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2303
2304 INSTALL_EXEC_HOOKS += libudev-install-hook
2305 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2306
2307 # ------------------------------------------------------------------------------
2308 noinst_LTLIBRARIES += \
2309         libudev-internal.la
2310
2311 libudev_internal_la_SOURCES =\
2312         $(libudev_la_SOURCES) \
2313         src/libudev/libudev-device-private.c \
2314         src/libudev/libudev-queue-private.c
2315
2316 libudev_internal_la_CFLAGS = \
2317         $(AM_CFLAGS) \
2318         -fvisibility=default
2319
2320 # ------------------------------------------------------------------------------
2321 INSTALL_DIRS += \
2322         $(sysconfdir)/udev/rules.d \
2323         $(sysconfdir)/udev/hwdb.d
2324
2325 dist_network_DATA = \
2326         network/99-default.link
2327
2328 dist_udevrules_DATA += \
2329         rules/99-systemd.rules \
2330         rules/42-usb-hid-pm.rules \
2331         rules/50-udev-default.rules \
2332         rules/60-drm.rules \
2333         rules/60-keyboard.rules \
2334         rules/60-persistent-storage-tape.rules \
2335         rules/60-persistent-serial.rules \
2336         rules/60-persistent-input.rules \
2337         rules/60-persistent-alsa.rules \
2338         rules/60-persistent-storage.rules \
2339         rules/64-btrfs.rules \
2340         rules/75-net-description.rules \
2341         rules/75-tty-description.rules \
2342         rules/78-sound-card.rules \
2343         rules/80-net-setup-link.rules \
2344         rules/95-udev-late.rules
2345
2346 dist_udevhwdb_DATA = \
2347         hwdb/20-pci-vendor-model.hwdb \
2348         hwdb/20-pci-classes.hwdb \
2349         hwdb/20-usb-vendor-model.hwdb \
2350         hwdb/20-usb-classes.hwdb \
2351         hwdb/20-bluetooth-vendor-product.hwdb \
2352         hwdb/20-acpi-vendor.hwdb \
2353         hwdb/20-OUI.hwdb \
2354         hwdb/60-keyboard.hwdb
2355
2356 udevconfdir = $(sysconfdir)/udev
2357 dist_udevconf_DATA = \
2358         src/udev/udev.conf
2359
2360 sharepkgconfigdir = $(datadir)/pkgconfig
2361 sharepkgconfig_DATA = \
2362         src/udev/udev.pc
2363
2364 EXTRA_DIST += \
2365         rules/99-systemd.rules.in \
2366         src/udev/udev.pc.in
2367
2368 CLEANFILES += \
2369         rules/99-systemd.rules \
2370         src/udev/udev.pc
2371
2372 EXTRA_DIST += \
2373         units/systemd-udevd.service.in \
2374         units/systemd-udev-trigger.service.in \
2375         units/systemd-udev-settle.service.in
2376
2377 CLEANFILES += \
2378         units/systemd-udevd.service \
2379         units/systemd-udev-trigger.service \
2380         units/systemd-udev-settle.service
2381
2382 SOCKETS_TARGET_WANTS += \
2383         systemd-udevd-control.socket \
2384         systemd-udevd-kernel.socket
2385 SYSINIT_TARGET_WANTS += \
2386         systemd-udevd.service \
2387         systemd-udev-trigger.service
2388
2389 rootbin_PROGRAMS += \
2390         udevadm
2391
2392 rootlibexec_PROGRAMS += \
2393         systemd-udevd
2394
2395 noinst_LTLIBRARIES += \
2396         libudev-core.la
2397
2398 src/udev/keyboard-keys.txt:
2399         $(AM_V_at)$(MKDIR_P) $(dir $@)
2400         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
2401
2402 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2403         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2404
2405 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2406         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2407
2408 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2409         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2410
2411 libudev_core_la_SOURCES = \
2412         src/udev/udev.h \
2413         src/udev/udev-event.c \
2414         src/udev/udev-watch.c \
2415         src/udev/udev-node.c \
2416         src/udev/udev-rules.c \
2417         src/udev/udev-ctrl.c \
2418         src/udev/udev-builtin.c \
2419         src/udev/udev-builtin-btrfs.c \
2420         src/udev/udev-builtin-hwdb.c \
2421         src/udev/udev-builtin-input_id.c \
2422         src/udev/udev-builtin-keyboard.c \
2423         src/udev/udev-builtin-net_id.c \
2424         src/udev/udev-builtin-net_setup_link.c \
2425         src/udev/udev-builtin-path_id.c \
2426         src/udev/udev-builtin-usb_id.c \
2427         src/udev/net/link-config.h \
2428         src/udev/net/link-config.c \
2429         src/udev/net/ethtool-util.h \
2430         src/udev/net/ethtool-util.c
2431
2432 nodist_libudev_core_la_SOURCES = \
2433         src/udev/keyboard-keys-from-name.h \
2434         src/udev/keyboard-keys-to-name.h \
2435         src/udev/net/link-config-gperf.c
2436
2437 BUILT_SOURCES += \
2438         $(nodist_libudev_core_la_SOURCES)
2439
2440 CLEANFILES += \
2441         src/udev/keyboard-keys-from-name.gperf \
2442         src/udev/keyboard-keys.txt \
2443         src/udev/net/link-config-gperf.c
2444
2445 EXTRA_DIST += \
2446         src/udev/net/link-config-gperf.gperf
2447
2448 libudev_core_la_CFLAGS = \
2449         $(AM_CFLAGS) \
2450         $(BLKID_CFLAGS) \
2451         $(KMOD_CFLAGS)
2452
2453 libudev_core_la_LIBADD = \
2454         libudev-internal.la \
2455         libsystemd-label.la \
2456         libsystemd-daemon-internal.la \
2457         libsystemd-rtnl.la \
2458         libsystemd-id128-internal.la \
2459         libsystemd-shared.la \
2460         $(BLKID_LIBS) \
2461         $(KMOD_LIBS)
2462
2463 libudev_core_la_CPPFLAGS = \
2464         $(AM_CPPFLAGS) \
2465         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2466
2467 if ENABLE_FIRMWARE
2468 libudev_core_la_SOURCES += \
2469         src/udev/udev-builtin-firmware.c
2470
2471 dist_udevrules_DATA += \
2472         rules/50-firmware.rules
2473 endif
2474
2475 if HAVE_KMOD
2476 libudev_core_la_SOURCES += \
2477         src/udev/udev-builtin-kmod.c
2478
2479 dist_udevrules_DATA += \
2480         rules/80-drivers.rules
2481 endif
2482
2483 if HAVE_BLKID
2484 libudev_core_la_SOURCES += \
2485         src/udev/udev-builtin-blkid.c
2486 endif
2487
2488 if HAVE_ACL
2489 libudev_core_la_SOURCES += \
2490         src/udev/udev-builtin-uaccess.c \
2491         src/login/logind-acl.c \
2492         src/login/sd-login.c \
2493         src/systemd/sd-login.h \
2494         src/login/login-shared.c \
2495         src/login/login-shared.h
2496
2497 libudev_core_la_LIBADD += \
2498         libsystemd-acl.la
2499 endif
2500
2501 systemd_udevd_SOURCES = \
2502         src/udev/udevd.c
2503
2504 systemd_udevd_LDADD = \
2505         libudev-core.la
2506
2507 udevadm_SOURCES = \
2508         src/udev/udevadm.c \
2509         src/udev/udevadm-info.c \
2510         src/udev/udevadm-control.c \
2511         src/udev/udevadm-monitor.c \
2512         src/udev/udevadm-hwdb.c \
2513         src/udev/udevadm-settle.c \
2514         src/udev/udevadm-trigger.c \
2515         src/udev/udevadm-test.c \
2516         src/udev/udevadm-test-builtin.c
2517
2518 udevadm_LDADD = \
2519         libudev-core.la
2520
2521 # Update hwdb on installation. Do not bother if installing
2522 # in DESTDIR, since this is likely for packaging purposes.
2523 hwdb-update-hook:
2524         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2525
2526 INSTALL_DATA_HOOKS += \
2527         hwdb-update-hook
2528
2529 hwdb-remove-hook:
2530         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2531
2532 # ------------------------------------------------------------------------------
2533 TESTS += \
2534         test/udev-test.pl \
2535         test/rules-test.sh
2536
2537 manual_tests += \
2538         test-libudev \
2539         test-udev
2540
2541 test_libudev_SOURCES = \
2542         src/test/test-libudev.c
2543
2544 test_libudev_LDADD = \
2545         libsystemd-label.la \
2546         libudev-internal.la \
2547         libsystemd-shared.la
2548
2549 test_udev_SOURCES = \
2550         src/test/test-udev.c
2551
2552 test_udev_LDADD = \
2553         libudev-core.la \
2554         $(BLKID_LIBS) \
2555         $(KMOD_LIBS) \
2556         $(SELINUX_LIBS)
2557
2558 if HAVE_ACL
2559 test_udev_LDADD += \
2560         libsystemd-acl.la
2561 endif
2562
2563 check_DATA += \
2564         test/sys
2565
2566 # packed sysfs test tree
2567 test/sys:
2568         $(AM_V_at)$(MKDIR_P) $(dir $@)
2569         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2570
2571 test-sys-distclean:
2572         -rm -rf test/sys
2573 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2574
2575 EXTRA_DIST += \
2576         test/sys.tar.xz \
2577         test/udev-test.pl \
2578         test/rules-test.sh \
2579         test/rule-syntax-check.py
2580
2581 # ------------------------------------------------------------------------------
2582 ata_id_SOURCES = \
2583         src/udev/ata_id/ata_id.c
2584
2585 ata_id_LDADD = \
2586         libudev-internal.la \
2587         libsystemd-shared.la
2588
2589 udevlibexec_PROGRAMS += \
2590         ata_id
2591
2592 # ------------------------------------------------------------------------------
2593 cdrom_id_SOURCES = \
2594         src/udev/cdrom_id/cdrom_id.c
2595
2596 cdrom_id_LDADD = \
2597         libudev-internal.la \
2598         libsystemd-shared.la
2599
2600 udevlibexec_PROGRAMS += \
2601         cdrom_id
2602
2603 dist_udevrules_DATA += \
2604         rules/60-cdrom_id.rules
2605
2606 # ------------------------------------------------------------------------------
2607 collect_SOURCES = \
2608         src/udev/collect/collect.c
2609
2610 collect_LDADD = \
2611         libudev-internal.la \
2612         libsystemd-shared.la
2613
2614 udevlibexec_PROGRAMS += \
2615         collect
2616
2617 # ------------------------------------------------------------------------------
2618 scsi_id_SOURCES =\
2619         src/udev/scsi_id/scsi_id.c \
2620         src/udev/scsi_id/scsi_serial.c \
2621         src/udev/scsi_id/scsi.h \
2622         src/udev/scsi_id/scsi_id.h
2623
2624 scsi_id_LDADD = \
2625         libudev-internal.la \
2626         libsystemd-shared.la
2627
2628 udevlibexec_PROGRAMS += \
2629         scsi_id
2630
2631 EXTRA_DIST += \
2632         src/udev/scsi_id/README
2633
2634 # ------------------------------------------------------------------------------
2635 v4l_id_SOURCES = \
2636         src/udev/v4l_id/v4l_id.c
2637
2638 v4l_id_LDADD = \
2639         libudev-internal.la
2640
2641 udevlibexec_PROGRAMS += \
2642         v4l_id
2643
2644 dist_udevrules_DATA += \
2645         rules/60-persistent-v4l.rules
2646
2647 # ------------------------------------------------------------------------------
2648 accelerometer_SOURCES = \
2649         src/udev/accelerometer/accelerometer.c
2650
2651 accelerometer_LDADD = \
2652         libudev-internal.la -lm \
2653         libsystemd-shared.la
2654
2655 udevlibexec_PROGRAMS += \
2656         accelerometer
2657
2658 dist_udevrules_DATA += \
2659         rules/61-accelerometer.rules
2660
2661 # ------------------------------------------------------------------------------
2662 if ENABLE_GUDEV
2663 if ENABLE_GTK_DOC
2664 SUBDIRS += \
2665         docs/gudev
2666 endif
2667
2668 libgudev_includedir = \
2669         $(includedir)/gudev-1.0/gudev
2670
2671 libgudev_include_HEADERS = \
2672         src/gudev/gudev.h \
2673         src/gudev/gudevenums.h \
2674         src/gudev/gudevenumtypes.h \
2675         src/gudev/gudevtypes.h \
2676         src/gudev/gudevclient.h \
2677         src/gudev/gudevdevice.h \
2678         src/gudev/gudevenumerator.h
2679
2680 lib_LTLIBRARIES += libgudev-1.0.la
2681
2682 pkgconfiglib_DATA += \
2683         src/gudev/gudev-1.0.pc
2684
2685 CLEANFILES += \
2686         src/gudev/gudev-1.0.pc
2687
2688 libgudev_1_0_la_SOURCES = \
2689         src/gudev/gudevenums.h \
2690         src/gudev/gudevenumtypes.h \
2691         src/gudev/gudevenumtypes.h\
2692         src/gudev/gudevtypes.h \
2693         src/gudev/gudevclient.h \
2694         src/gudev/gudevclient.c \
2695         src/gudev/gudevdevice.h \
2696         src/gudev/gudevdevice.c \
2697         src/gudev/gudevenumerator.h \
2698         src/gudev/gudevenumerator.c \
2699         src/gudev/gudevprivate.h
2700
2701 nodist_libgudev_1_0_la_SOURCES = \
2702         src/gudev/gudevmarshal.h \
2703         src/gudev/gudevmarshal.c \
2704         src/gudev/gudevenumtypes.h \
2705         src/gudev/gudevenumtypes.c
2706
2707 BUILT_SOURCES += \
2708         $(nodist_libgudev_1_0_la_SOURCES)
2709
2710 libgudev_1_0_la_CPPFLAGS = \
2711         $(AM_CPPFLAGS) \
2712         -I$(top_builddir)/src\
2713         -I$(top_srcdir)/src\
2714         -I$(top_builddir)/src/gudev \
2715         -I$(top_srcdir)/src/gudev \
2716         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2717         -D_GUDEV_COMPILATION \
2718         -DG_LOG_DOMAIN=\"GUdev\"
2719
2720 libgudev_1_0_la_CFLAGS = \
2721         $(AM_CFLAGS) \
2722         -fvisibility=default \
2723         $(GLIB_CFLAGS)
2724
2725 libgudev_1_0_la_LIBADD = \
2726         libudev.la \
2727         $(GLIB_LIBS)
2728
2729 libgudev_1_0_la_LDFLAGS = \
2730         $(AM_LDFLAGS) \
2731         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2732         -export-dynamic -no-undefined \
2733         -export-symbols-regex '^g_udev_.*'
2734
2735 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2736         $(AM_V_at)$(MKDIR_P) $(dir $@)
2737         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2738
2739 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2740         $(AM_V_at)$(MKDIR_P) $(dir $@)
2741         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2742         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2743
2744 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2745         $(AM_V_at)$(MKDIR_P) $(dir $@)
2746         $(AM_V_GEN)glib-mkenums --template $^ > $@
2747
2748 if HAVE_INTROSPECTION
2749 -include $(INTROSPECTION_MAKEFILE)
2750
2751 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2752
2753 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2754
2755 src_gudev_GUdev_1_0_gir_CFLAGS = \
2756         $(AM_CFLAGS) \
2757         $(INCLUDES) \
2758         -D_GUDEV_COMPILATION \
2759         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2760         -I$(top_srcdir)/src \
2761         -I$(top_builddir)/src \
2762         -I$(top_srcdir)/src/gudev \
2763         -I$(top_builddir)/src/gudev
2764
2765 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2766
2767 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2768         --pkg-export=gudev-1.0 \
2769         --warn-all
2770
2771 src_gudev_GUdev_1_0_gir_FILES = \
2772         src/gudev/gudev.h \
2773         src/gudev/gudevtypes.h \
2774         src/gudev/gudevenums.h \
2775         src/gudev/gudevenumtypes.h \
2776         src/gudev/gudevclient.h \
2777         src/gudev/gudevdevice.h \
2778         src/gudev/gudevenumerator.h \
2779         src/gudev/gudevclient.c \
2780         src/gudev/gudevdevice.c \
2781         src/gudev/gudevenumerator.c
2782
2783 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2784 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2785
2786 girdir = $(datadir)/gir-1.0
2787 gir_DATA = \
2788         src/gudev/GUdev-1.0.gir
2789
2790 typelibsdir = $(libdir)/girepository-1.0
2791 typelibs_DATA = \
2792         src/gudev/GUdev-1.0.typelib
2793
2794 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2795 endif # HAVE_INTROSPECTION
2796
2797 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2798 libgudev-install-hook:
2799         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2800
2801 libgudev-uninstall-hook:
2802         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2803
2804 INSTALL_EXEC_HOOKS += libgudev-install-hook
2805 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2806 endif
2807
2808 EXTRA_DIST += \
2809         src/gudev/gudev-1.0.pc.in \
2810         src/gudev/gudevmarshal.list \
2811         src/gudev/gudevenumtypes.h.template \
2812         src/gudev/gudevenumtypes.c.template \
2813         src/gudev/gjs-example.js \
2814         src/gudev/seed-example-enum.js \
2815         src/gudev/seed-example.js
2816
2817 # ------------------------------------------------------------------------------
2818 mtd_probe_SOURCES =  \
2819         src/udev/mtd_probe/mtd_probe.c \
2820         src/udev/mtd_probe/mtd_probe.h \
2821         src/udev/mtd_probe/probe_smartmedia.c
2822
2823 dist_udevrules_DATA += \
2824         rules/75-probe_mtd.rules
2825
2826 udevlibexec_PROGRAMS += \
2827         mtd_probe
2828
2829 # ------------------------------------------------------------------------------
2830 libsystemd_id128_la_SOURCES = \
2831         src/libsystemd-id128/libsystemd-id128.sym \
2832         src/libsystemd-id128/sd-id128.c
2833
2834 libsystemd_id128_la_CFLAGS = \
2835         $(AM_CFLAGS) \
2836         -fvisibility=hidden
2837
2838 libsystemd_id128_la_LDFLAGS = \
2839         $(AM_LDFLAGS) \
2840         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2841         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2842
2843 libsystemd_id128_la_LIBADD = \
2844         libsystemd-daemon-internal.la \
2845         libsystemd-shared.la
2846
2847 libsystemd_id128_internal_la_SOURCES = \
2848         $(libsystemd_id128_la_SOURCES)
2849
2850 test_id128_SOURCES = \
2851         src/test/test-id128.c
2852
2853 test_id128_LDADD = \
2854         libsystemd-id128-internal.la \
2855         libsystemd-daemon-internal.la \
2856         libsystemd-shared.la
2857
2858 tests += \
2859         test-id128
2860
2861 pkginclude_HEADERS += \
2862         src/systemd/sd-id128.h
2863
2864 lib_LTLIBRARIES += \
2865         libsystemd-id128.la
2866
2867 noinst_LTLIBRARIES += \
2868         libsystemd-id128-internal.la
2869
2870 pkgconfiglib_DATA += \
2871         src/libsystemd-id128/libsystemd-id128.pc
2872
2873 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2874 libsystemd-id128-install-hook:
2875         libname=libsystemd-id128.so && $(move-to-rootlibdir)
2876
2877 libsystemd-id128-uninstall-hook:
2878         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2879
2880 INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
2881 UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
2882
2883 EXTRA_DIST += \
2884         src/libsystemd-id128/libsystemd-id128.pc.in
2885
2886 # ------------------------------------------------------------------------------
2887
2888 rootlibexec_PROGRAMS += \
2889         systemd-activate
2890
2891 systemd_activate_SOURCES = \
2892         src/activate/activate.c
2893
2894 systemd_activate_LDADD = \
2895         libsystemd-label.la \
2896         libsystemd-daemon-internal.la \
2897         libsystemd-shared.la
2898
2899 # ------------------------------------------------------------------------------
2900 systemd_journald_SOURCES = \
2901         src/journal/journald.c \
2902         src/journal/journald-server.h
2903
2904 systemd_journald_LDADD = \
2905         libsystemd-journal-core.la
2906
2907 systemd_cat_SOURCES = \
2908         src/journal/cat.c
2909
2910 systemd_cat_LDADD = \
2911         libsystemd-journal-core.la
2912
2913 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
2914 journalctl_CFLAGS = \
2915         $(AM_CFLAGS)
2916
2917 journalctl_SOURCES = \
2918         src/journal/journalctl.c
2919
2920 journalctl_LDADD = \
2921         libsystemd-journal-internal.la \
2922         libsystemd-id128-internal.la \
2923         libsystemd-logs.la \
2924         libsystemd-shared.la
2925
2926 if HAVE_ACL
2927 journalctl_LDADD += \
2928         libsystemd-acl.la
2929 endif
2930
2931 if HAVE_QRENCODE
2932 journalctl_SOURCES += \
2933         src/journal/journal-qrcode.c \
2934         src/journal/journal-qrcode.h
2935
2936 journalctl_CFLAGS += \
2937         $(QRENCODE_CFLAGS)
2938
2939 journalctl_LDADD += \
2940         $(QRENCODE_LIBS)
2941 endif
2942
2943 test_journal_SOURCES = \
2944         src/journal/test-journal.c
2945
2946 test_journal_LDADD = \
2947         libsystemd-journal-core.la
2948
2949 test_journal_send_SOURCES = \
2950         src/journal/test-journal-send.c
2951
2952 test_journal_send_LDADD = \
2953         libsystemd-journal-core.la
2954
2955 test_journal_syslog_SOURCES = \
2956         src/journal/test-journal-syslog.c
2957
2958 test_journal_syslog_LDADD = \
2959         libsystemd-journal-core.la
2960
2961 test_journal_match_SOURCES = \
2962         src/journal/test-journal-match.c
2963
2964 test_journal_match_LDADD = \
2965         libsystemd-journal-core.la
2966
2967 test_journal_enum_SOURCES = \
2968         src/journal/test-journal-enum.c
2969
2970 test_journal_enum_LDADD = \
2971         libsystemd-journal-core.la
2972
2973 test_journal_stream_SOURCES = \
2974         src/journal/test-journal-stream.c
2975
2976 test_journal_stream_LDADD = \
2977         libsystemd-journal-core.la
2978
2979 test_journal_flush_SOURCES = \
2980         src/journal/test-journal-flush.c
2981
2982 test_journal_flush_LDADD = \
2983         libsystemd-journal-core.la
2984
2985 test_journal_init_SOURCES = \
2986         src/journal/test-journal-init.c
2987
2988 test_journal_init_LDADD = \
2989         libsystemd-journal-core.la
2990
2991 test_journal_verify_SOURCES = \
2992         src/journal/test-journal-verify.c
2993
2994 test_journal_verify_LDADD = \
2995         libsystemd-journal-core.la
2996
2997 test_journal_interleaving_SOURCES = \
2998         src/journal/test-journal-interleaving.c
2999
3000 test_journal_interleaving_LDADD = \
3001         libsystemd-journal-core.la
3002
3003 test_mmap_cache_SOURCES = \
3004         src/journal/test-mmap-cache.c
3005
3006 test_mmap_cache_LDADD = \
3007         libsystemd-journal-core.la
3008
3009 test_catalog_SOURCES = \
3010         src/journal/test-catalog.c
3011
3012 test_catalog_CFLAGS = \
3013         $(AM_CFLAGS) \
3014         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3015
3016 test_catalog_LDADD = \
3017         libsystemd-journal-core.la
3018
3019 libsystemd_journal_la_SOURCES = \
3020         src/journal/libsystemd-journal.sym \
3021         src/journal/sd-journal.c \
3022         src/systemd/sd-journal.h \
3023         src/systemd/_sd-common.h \
3024         src/journal/journal-file.c \
3025         src/journal/journal-file.h \
3026         src/journal/journal-vacuum.c \
3027         src/journal/journal-vacuum.h \
3028         src/journal/journal-verify.c \
3029         src/journal/journal-verify.h \
3030         src/journal/lookup3.c \
3031         src/journal/lookup3.h \
3032         src/journal/journal-send.c \
3033         src/journal/journal-def.h \
3034         src/journal/compress.h \
3035         src/journal/catalog.c \
3036         src/journal/catalog.h \
3037         src/journal/mmap-cache.c \
3038         src/journal/mmap-cache.h
3039
3040 libsystemd_journal_la_CFLAGS = \
3041         $(AM_CFLAGS) \
3042         -fvisibility=hidden
3043
3044 libsystemd_journal_la_LDFLAGS = \
3045         $(AM_LDFLAGS) \
3046         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
3047         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
3048
3049 libsystemd_journal_la_LIBADD = \
3050         libsystemd-label.la \
3051         libsystemd-daemon-internal.la \
3052         libsystemd-id128-internal.la \
3053         libsystemd-shared.la
3054
3055 libsystemd_journal_internal_la_SOURCES = \
3056         $(libsystemd_journal_la_SOURCES)
3057
3058 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3059 libsystemd_journal_internal_la_CFLAGS = \
3060         $(AM_CFLAGS)
3061
3062 libsystemd_journal_internal_la_LIBADD =
3063
3064 if HAVE_XZ
3065 libsystemd_journal_la_SOURCES += \
3066         src/journal/compress.c
3067
3068 libsystemd_journal_la_CFLAGS += \
3069         $(XZ_CFLAGS)
3070
3071 libsystemd_journal_la_LIBADD += \
3072         $(XZ_LIBS)
3073
3074 libsystemd_journal_internal_la_CFLAGS += \
3075         $(XZ_CFLAGS)
3076
3077 libsystemd_journal_internal_la_LIBADD += \
3078         $(XZ_LIBS)
3079 endif
3080
3081 libsystemd_journal_core_la_SOURCES = \
3082         src/journal/journald-kmsg.c \
3083         src/journal/journald-kmsg.h \
3084         src/journal/journald-syslog.c \
3085         src/journal/journald-syslog.h \
3086         src/journal/journald-stream.c \
3087         src/journal/journald-stream.h \
3088         src/journal/journald-server.c \
3089         src/journal/journald-server.h \
3090         src/journal/journald-console.c \
3091         src/journal/journald-console.h \
3092         src/journal/journald-native.c \
3093         src/journal/journald-native.h \
3094         src/journal/journald-rate-limit.c \
3095         src/journal/journald-rate-limit.h \
3096         src/journal/journal-internal.h
3097
3098 nodist_libsystemd_journal_core_la_SOURCES = \
3099         src/journal/journald-gperf.c
3100
3101 libsystemd_journal_core_la_LIBADD = \
3102         libsystemd-journal-internal.la \
3103         libudev-internal.la \
3104         libsystemd-capability.la \
3105         libsystemd-label.la \
3106         libsystemd-daemon-internal.la \
3107         libsystemd-id128-internal.la \
3108         libsystemd-shared.la
3109
3110 if ENABLE_LOGIND
3111 libsystemd_journal_core_la_LIBADD += \
3112         libsystemd-login-internal.la
3113 endif
3114
3115 if HAVE_ACL
3116 libsystemd_journal_core_la_LIBADD += \
3117         libsystemd-acl.la
3118 endif
3119
3120 noinst_LTLIBRARIES += \
3121         libsystemd-journal-core.la
3122
3123 if HAVE_GCRYPT
3124 libsystemd_journal_la_SOURCES += \
3125         src/journal/journal-authenticate.c \
3126         src/journal/journal-authenticate.h \
3127         src/journal/fsprg.c \
3128         src/journal/fsprg.h
3129
3130 libsystemd_journal_la_CFLAGS += \
3131         $(GCRYPT_CFLAGS) \
3132         -Wno-pointer-arith
3133
3134 libsystemd_journal_la_LIBADD += \
3135         $(GCRYPT_LIBS)
3136
3137 libsystemd_journal_internal_la_CFLAGS += \
3138         $(GCRYPT_CFLAGS) \
3139         -Wno-pointer-arith
3140
3141 libsystemd_journal_internal_la_LIBADD += \
3142         $(GCRYPT_LIBS)
3143 endif
3144
3145 # move lib from $(libdir) to $(rootlibdir) and update devel link, if
3146 # needed. Also, grant read access to new journal files to members of
3147 # "adm" and "wheel".
3148 libsystemd-journal-install-hook:
3149         libname=libsystemd-journal.so && $(move-to-rootlibdir)
3150         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3151         -chown 0:0 $(DESTDIR)/var/log/journal
3152         -chmod 755 $(DESTDIR)/var/log/journal
3153         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3154         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3155
3156 libsystemd-journal-uninstall-hook:
3157         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
3158
3159 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
3160 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
3161
3162 # ------------------------------------------------------------------------------
3163
3164 # Update catalog on installation. Do not bother if installing
3165 # in DESTDIR, since this is likely for packaging purposes.
3166 catalog-update-hook:
3167         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3168
3169 INSTALL_DATA_HOOKS += \
3170         catalog-update-hook
3171
3172 catalog-remove-hook:
3173         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3174
3175 UNINSTALL_DATA_HOOKS += \
3176         catalog-remove-hook
3177
3178 manual_tests += \
3179         test-journal-enum
3180
3181 tests += \
3182         test-journal \
3183         test-journal-send \
3184         test-journal-syslog \
3185         test-journal-match \
3186         test-journal-stream \
3187         test-journal-init \
3188         test-journal-verify \
3189         test-journal-interleaving \
3190         test-journal-flush \
3191         test-mmap-cache \
3192         test-catalog
3193
3194 pkginclude_HEADERS += \
3195         src/systemd/sd-journal.h \
3196         src/systemd/sd-messages.h \
3197         src/systemd/_sd-common.h
3198
3199 lib_LTLIBRARIES += \
3200         libsystemd-journal.la
3201
3202 noinst_LTLIBRARIES += \
3203         libsystemd-journal-internal.la
3204
3205 rootlibexec_PROGRAMS += \
3206         systemd-journald
3207
3208 rootbin_PROGRAMS += \
3209         journalctl
3210
3211 bin_PROGRAMS += \
3212         systemd-cat
3213
3214 dist_systemunit_DATA += \
3215         units/systemd-journald.socket
3216
3217 nodist_systemunit_DATA += \
3218         units/systemd-journald.service \
3219         units/systemd-journal-flush.service
3220
3221 dist_pkgsysconf_DATA += \
3222         src/journal/journald.conf
3223
3224 pkgconfiglib_DATA += \
3225         src/journal/libsystemd-journal.pc
3226
3227 dist_catalog_DATA = \
3228         catalog/systemd-fr.catalog \
3229         catalog/systemd-ru.catalog \
3230         catalog/systemd.catalog
3231
3232 SOCKETS_TARGET_WANTS += \
3233         systemd-journald.socket
3234 SYSINIT_TARGET_WANTS += \
3235         systemd-journald.service \
3236         systemd-journal-flush.service
3237
3238 EXTRA_DIST += \
3239         src/journal/libsystemd-journal.pc.in \
3240         units/systemd-journald.service.in \
3241         units/systemd-journal-flush.service.in \
3242         src/journal/journald-gperf.gperf
3243
3244 CLEANFILES += \
3245         src/journal/journald-gperf.c
3246
3247 # ------------------------------------------------------------------------------
3248 if HAVE_MICROHTTPD
3249 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3250
3251 rootlibexec_PROGRAMS += \
3252         systemd-journal-gatewayd
3253
3254 systemd_journal_gatewayd_SOURCES = \
3255         src/journal/journal-gatewayd.c \
3256         src/journal/microhttpd-util.h \
3257         src/journal/microhttpd-util.c
3258
3259 systemd_journal_gatewayd_LDADD = \
3260         libsystemd-logs.la \
3261         libsystemd-journal-internal.la \
3262         libsystemd-id128-internal.la \
3263         libsystemd-daemon-internal.la \
3264         libsystemd-bus-internal.la \
3265         libsystemd-shared.la \
3266         $(MICROHTTPD_LIBS)
3267
3268 systemd_journal_gatewayd_CFLAGS = \
3269         $(AM_CFLAGS) \
3270         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
3271         $(MICROHTTPD_CFLAGS)
3272
3273 dist_systemunit_DATA += \
3274         units/systemd-journal-gatewayd.socket
3275
3276 nodist_systemunit_DATA += \
3277         units/systemd-journal-gatewayd.service
3278
3279 dist_gatewayddocumentroot_DATA = \
3280         src/journal/browse.html
3281
3282 endif
3283
3284 EXTRA_DIST += \
3285         units/systemd-journal-gatewayd.service.in
3286
3287 # ------------------------------------------------------------------------------
3288
3289 systemd_socket_proxyd_SOURCES = \
3290         src/socket-proxy/socket-proxyd.c
3291
3292 systemd_socket_proxyd_LDADD = \
3293         libsystemd-logs.la \
3294         libsystemd-bus-internal.la \
3295         libsystemd-journal-internal.la \
3296         libsystemd-id128-internal.la \
3297         libsystemd-daemon-internal.la \
3298         libsystemd-shared.la
3299
3300 # ------------------------------------------------------------------------------
3301 if ENABLE_COREDUMP
3302 systemd_coredump_SOURCES = \
3303         src/journal/coredump.c
3304
3305 systemd_coredump_LDADD = \
3306         libsystemd-journal-internal.la \
3307         libsystemd-label.la \
3308         libsystemd-shared.la
3309
3310 if ENABLE_LOGIND
3311 systemd_coredump_LDADD += \
3312         libsystemd-login-internal.la
3313 endif
3314
3315 rootlibexec_PROGRAMS += \
3316         systemd-coredump
3317
3318 systemd_coredumpctl_SOURCES = \
3319         src/journal/coredumpctl.c
3320
3321 systemd_coredumpctl_LDADD = \
3322         libsystemd-journal-internal.la \
3323         libsystemd-id128-internal.la \
3324         libsystemd-shared.la
3325
3326 bin_PROGRAMS += \
3327         systemd-coredumpctl
3328
3329 dist_bashcompletion_DATA += \
3330         shell-completion/bash/systemd-coredumpctl
3331
3332 dist_zshcompletion_DATA += \
3333         shell-completion/zsh/_systemd-coredumpctl
3334
3335 sysctl_DATA = \
3336         sysctl.d/50-coredump.conf
3337
3338 CLEANFILES += \
3339         sysctl.d/50-coredump.conf
3340 endif
3341
3342 EXTRA_DIST += \
3343         sysctl.d/50-coredump.conf.in
3344
3345 # ------------------------------------------------------------------------------
3346 if ENABLE_BINFMT
3347 systemd_binfmt_SOURCES = \
3348         src/binfmt/binfmt.c
3349
3350 systemd_binfmt_LDADD = \
3351         libsystemd-shared.la
3352
3353 rootlibexec_PROGRAMS += \
3354         systemd-binfmt
3355
3356 dist_systemunit_DATA += \
3357         units/proc-sys-fs-binfmt_misc.automount \
3358         units/proc-sys-fs-binfmt_misc.mount
3359
3360 nodist_systemunit_DATA += \
3361         units/systemd-binfmt.service
3362
3363 INSTALL_DIRS += \
3364         $(prefix)/lib/binfmt.d \
3365         $(sysconfdir)/binfmt.d
3366
3367 SYSINIT_TARGET_WANTS += \
3368         systemd-binfmt.service \
3369         proc-sys-fs-binfmt_misc.automount
3370
3371 endif
3372
3373 EXTRA_DIST += \
3374         units/systemd-binfmt.service.in
3375
3376 # ------------------------------------------------------------------------------
3377 if ENABLE_VCONSOLE
3378 systemd_vconsole_setup_SOURCES = \
3379         src/vconsole/vconsole-setup.c
3380
3381 systemd_vconsole_setup_LDADD = \
3382         libsystemd-shared.la
3383
3384 rootlibexec_PROGRAMS += \
3385         systemd-vconsole-setup
3386
3387 nodist_systemunit_DATA += \
3388         units/systemd-vconsole-setup.service
3389
3390 SYSINIT_TARGET_WANTS += \
3391         systemd-vconsole-setup.service
3392 endif
3393
3394 EXTRA_DIST += \
3395         units/systemd-vconsole-setup.service.in
3396
3397 # ------------------------------------------------------------------------------
3398 if ENABLE_READAHEAD
3399 systemd_readahead_SOURCES = \
3400         src/readahead/readahead.c \
3401         src/readahead/readahead-collect.c \
3402         src/readahead/readahead-replay.c \
3403         src/readahead/readahead-analyze.c \
3404         src/readahead/readahead-common.c \
3405         src/readahead/readahead-common.h
3406
3407 systemd_readahead_LDADD = \
3408         libsystemd-daemon-internal.la \
3409         libudev-internal.la \
3410         libsystemd-shared.la
3411
3412 dist_doc_DATA += \
3413         src/readahead/sd-readahead.c \
3414         src/systemd/sd-readahead.h
3415
3416 rootlibexec_PROGRAMS += \
3417         systemd-readahead
3418
3419 dist_systemunit_DATA += \
3420         units/systemd-readahead-drop.service \
3421         units/systemd-readahead-done.timer
3422
3423 nodist_systemunit_DATA += \
3424         units/systemd-readahead-collect.service \
3425         units/systemd-readahead-replay.service \
3426         units/systemd-readahead-done.service
3427
3428 endif
3429
3430 EXTRA_DIST += \
3431         units/systemd-readahead-collect.service.in \
3432         units/systemd-readahead-replay.service.in \
3433         units/systemd-readahead-done.service.in
3434
3435 # ------------------------------------------------------------------------------
3436 if ENABLE_BOOTCHART
3437 systemd_bootchart_SOURCES = \
3438         src/bootchart/bootchart.c \
3439         src/bootchart/bootchart.h \
3440         src/bootchart/store.c \
3441         src/bootchart/store.h \
3442         src/bootchart/svg.c \
3443         src/bootchart/svg.h
3444
3445 systemd_bootchart_LDADD = \
3446         libsystemd-journal-internal.la \
3447         libsystemd-shared.la
3448
3449 rootlibexec_PROGRAMS += \
3450         systemd-bootchart
3451
3452 dist_pkgsysconf_DATA += \
3453         src/bootchart/bootchart.conf
3454 endif
3455
3456 # ------------------------------------------------------------------------------
3457 if ENABLE_QUOTACHECK
3458 rootlibexec_PROGRAMS += \
3459         systemd-quotacheck
3460
3461 nodist_systemunit_DATA += \
3462         units/systemd-quotacheck.service
3463
3464 systemd_quotacheck_SOURCES = \
3465         src/quotacheck/quotacheck.c
3466
3467 systemd_quotacheck_LDADD = \
3468         libsystemd-shared.la
3469 endif
3470
3471 EXTRA_DIST += \
3472         units/systemd-quotacheck.service.in
3473
3474 nodist_systemunit_DATA += \
3475         units/quotaon.service
3476
3477 # ------------------------------------------------------------------------------
3478 if ENABLE_RANDOMSEED
3479 rootlibexec_PROGRAMS += \
3480         systemd-random-seed
3481
3482 nodist_systemunit_DATA += \
3483         units/systemd-random-seed.service
3484
3485 systemd_random_seed_SOURCES = \
3486         src/random-seed/random-seed.c
3487
3488 systemd_random_seed_LDADD = \
3489         libsystemd-label.la \
3490         libsystemd-shared.la
3491
3492 SYSINIT_TARGET_WANTS += \
3493         systemd-random-seed.service
3494
3495 endif
3496
3497 EXTRA_DIST += \
3498         units/systemd-random-seed.service.in
3499
3500 # ------------------------------------------------------------------------------
3501 if ENABLE_BACKLIGHT
3502 rootlibexec_PROGRAMS += \
3503         systemd-backlight
3504
3505 nodist_systemunit_DATA += \
3506         units/systemd-backlight@.service
3507
3508 systemd_backlight_SOURCES = \
3509         src/backlight/backlight.c
3510
3511 systemd_backlight_LDADD = \
3512         libsystemd-label.la \
3513         libudev-internal.la \
3514         libsystemd-shared.la
3515 endif
3516
3517 EXTRA_DIST += \
3518         units/systemd-backlight@.service.in
3519
3520 # ------------------------------------------------------------------------------
3521 if ENABLE_RFKILL
3522 rootlibexec_PROGRAMS += \
3523         systemd-rfkill
3524
3525 nodist_systemunit_DATA += \
3526         units/systemd-rfkill@.service
3527
3528 systemd_rfkill_SOURCES = \
3529         src/rfkill/rfkill.c
3530
3531 systemd_rfkill_LDADD = \
3532         libsystemd-label.la \
3533         libudev-internal.la \
3534         libsystemd-shared.la
3535 endif
3536
3537 EXTRA_DIST += \
3538         units/systemd-rfkill@.service.in
3539
3540 # ------------------------------------------------------------------------------
3541 if HAVE_LIBCRYPTSETUP
3542 rootlibexec_PROGRAMS += \
3543         systemd-cryptsetup
3544
3545 systemgenerator_PROGRAMS += \
3546         systemd-cryptsetup-generator
3547
3548 dist_systemunit_DATA += \
3549         units/cryptsetup.target
3550
3551 systemd_cryptsetup_SOURCES = \
3552         src/cryptsetup/cryptsetup.c
3553
3554 systemd_cryptsetup_CFLAGS = \
3555         $(AM_CFLAGS) \
3556         $(LIBCRYPTSETUP_CFLAGS)
3557
3558 systemd_cryptsetup_LDADD = \
3559         libsystemd-label.la \
3560         libudev-internal.la \
3561         libsystemd-shared.la \
3562         $(LIBCRYPTSETUP_LIBS)
3563
3564 systemd_cryptsetup_generator_SOURCES = \
3565         src/cryptsetup/cryptsetup-generator.c
3566
3567 systemd_cryptsetup_generator_LDADD = \
3568         libsystemd-label.la \
3569         libsystemd-shared.la
3570
3571 SYSINIT_TARGET_WANTS += \
3572         cryptsetup.target
3573
3574 endif
3575
3576 # ------------------------------------------------------------------------------
3577 if ENABLE_HOSTNAMED
3578 systemd_hostnamed_SOURCES = \
3579         src/hostname/hostnamed.c
3580
3581 systemd_hostnamed_LDADD = \
3582         libsystemd-label.la \
3583         libsystemd-bus-internal.la \
3584         libsystemd-id128-internal.la \
3585         libsystemd-daemon-internal.la \
3586         libsystemd-shared.la
3587
3588 rootlibexec_PROGRAMS += \
3589         systemd-hostnamed
3590
3591 nodist_systemunit_DATA += \
3592         units/systemd-hostnamed.service
3593
3594 dist_dbuspolicy_DATA += \
3595         src/hostname/org.freedesktop.hostname1.conf
3596
3597 dist_dbussystemservice_DATA += \
3598         src/hostname/org.freedesktop.hostname1.service
3599
3600 polkitpolicy_files += \
3601         src/hostname/org.freedesktop.hostname1.policy
3602
3603 SYSTEM_UNIT_ALIASES += \
3604         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3605
3606 hostnamectl_SOURCES = \
3607         src/hostname/hostnamectl.c
3608
3609 hostnamectl_LDADD = \
3610         libsystemd-bus-internal.la \
3611         libsystemd-id128-internal.la \
3612         libsystemd-daemon-internal.la \
3613         libsystemd-shared.la
3614
3615 bin_PROGRAMS += \
3616         hostnamectl
3617
3618 dist_bashcompletion_DATA += \
3619         shell-completion/bash/hostnamectl
3620
3621 dist_zshcompletion_DATA += \
3622         shell-completion/zsh/_hostnamectl
3623
3624 endif
3625
3626 polkitpolicy_in_files += \
3627         src/hostname/org.freedesktop.hostname1.policy.in
3628
3629 EXTRA_DIST += \
3630         units/systemd-hostnamed.service.in
3631
3632 # ------------------------------------------------------------------------------
3633 if ENABLE_LOCALED
3634 systemd_localed_SOURCES = \
3635         src/locale/localed.c
3636
3637 systemd_localed_LDADD = \
3638         libsystemd-label.la \
3639         libsystemd-bus-internal.la \
3640         libsystemd-id128-internal.la \
3641         libsystemd-daemon-internal.la \
3642         libsystemd-shared.la
3643
3644 nodist_systemunit_DATA += \
3645         units/systemd-localed.service
3646
3647 rootlibexec_PROGRAMS += \
3648         systemd-localed
3649
3650 dist_dbuspolicy_DATA += \
3651         src/locale/org.freedesktop.locale1.conf
3652
3653 dist_dbussystemservice_DATA += \
3654         src/locale/org.freedesktop.locale1.service
3655
3656 polkitpolicy_files += \
3657         src/locale/org.freedesktop.locale1.policy
3658
3659 SYSTEM_UNIT_ALIASES += \
3660         systemd-localed.service dbus-org.freedesktop.locale1.service
3661
3662 dist_pkgdata_DATA += \
3663         src/locale/kbd-model-map
3664
3665 dist_noinst_SCRIPT = \
3666         src/locale/generate-kbd-model-map
3667
3668 update-kbd-model-map: src/locale/generate-kbd-model-map
3669         $PYTHON $< > src/locale/kbd-model-map
3670
3671 localectl_SOURCES = \
3672         src/locale/localectl.c
3673
3674 localectl_LDADD = \
3675         libsystemd-bus-internal.la \
3676         libsystemd-id128-internal.la \
3677         libsystemd-daemon-internal.la \
3678         libsystemd-shared.la
3679
3680 bin_PROGRAMS += \
3681         localectl
3682
3683 dist_bashcompletion_DATA += \
3684         shell-completion/bash/localectl
3685
3686 dist_zshcompletion_DATA += \
3687         shell-completion/zsh/_localectl
3688
3689 endif
3690
3691 polkitpolicy_in_files += \
3692         src/locale/org.freedesktop.locale1.policy.in
3693
3694 EXTRA_DIST += \
3695         units/systemd-localed.service.in
3696
3697 # ------------------------------------------------------------------------------
3698 if ENABLE_TIMEDATED
3699 systemd_timedated_SOURCES = \
3700         src/timedate/timedated.c
3701
3702 systemd_timedated_LDADD = \
3703         libsystemd-label.la \
3704         libsystemd-bus-internal.la \
3705         libsystemd-id128-internal.la \
3706         libsystemd-daemon-internal.la \
3707         libsystemd-shared.la
3708
3709 rootlibexec_PROGRAMS += \
3710         systemd-timedated
3711
3712 dist_dbussystemservice_DATA += \
3713         src/timedate/org.freedesktop.timedate1.service
3714
3715 dist_dbuspolicy_DATA += \
3716         src/timedate/org.freedesktop.timedate1.conf
3717
3718 nodist_systemunit_DATA += \
3719         units/systemd-timedated.service
3720
3721 polkitpolicy_files += \
3722         src/timedate/org.freedesktop.timedate1.policy
3723
3724 INSTALL_DIRS += \
3725         $(prefix)/lib/systemd/ntp-units.d \
3726         $(sysconfdir)/systemd/ntp-units.d
3727
3728 SYSTEM_UNIT_ALIASES += \
3729         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3730
3731 timedatectl_SOURCES = \
3732         src/timedate/timedatectl.c
3733
3734 timedatectl_LDADD = \
3735         libsystemd-bus-internal.la \
3736         libsystemd-id128-internal.la \
3737         libsystemd-daemon-internal.la \
3738         libsystemd-shared.la
3739
3740 bin_PROGRAMS += \
3741         timedatectl
3742
3743 dist_bashcompletion_DATA += \
3744         shell-completion/bash/timedatectl
3745
3746 dist_zshcompletion_DATA += \
3747         shell-completion/zsh/_timedatectl
3748 endif
3749
3750 polkitpolicy_in_files += \
3751         src/timedate/org.freedesktop.timedate1.policy.in
3752
3753 EXTRA_DIST += \
3754         units/systemd-timedated.service.in
3755
3756 # ------------------------------------------------------------------------------
3757 if HAVE_MYHOSTNAME
3758 libnss_myhostname_la_SOURCES = \
3759         src/nss-myhostname/nss-myhostname.c \
3760         src/nss-myhostname/ifconf.h \
3761         src/nss-myhostname/netlink.c
3762
3763 libnss_myhostname_la_LDFLAGS = \
3764         $(AM_LDFLAGS) \
3765         -module \
3766         -export-dynamic \
3767         -avoid-version \
3768         -shared \
3769         -shrext .so.2
3770
3771 lib_LTLIBRARIES += \
3772         libnss_myhostname.la
3773 endif
3774
3775 # ------------------------------------------------------------------------------
3776 if ENABLE_MACHINED
3777 systemd_machined_SOURCES = \
3778         src/machine/machined.c \
3779         src/machine/machined.h
3780
3781 systemd_machined_LDADD = \
3782         libsystemd-machine-core.la
3783
3784 rootlibexec_PROGRAMS += \
3785         systemd-machined
3786
3787 libsystemd_machine_core_la_SOURCES = \
3788         src/machine/machined-dbus.c \
3789         src/machine/machine.c \
3790         src/machine/machine.h \
3791         src/machine/machine-dbus.c
3792
3793 libsystemd_machine_core_la_LIBADD = \
3794         libsystemd-label.la \
3795         libsystemd-daemon-internal.la \
3796         libsystemd-bus-internal.la \
3797         libsystemd-id128-internal.la \
3798         libudev-internal.la \
3799         libsystemd-shared.la
3800
3801 noinst_LTLIBRARIES += \
3802         libsystemd-machine-core.la
3803
3804 machinectl_SOURCES = \
3805         src/machine/machinectl.c
3806
3807 machinectl_LDADD = \
3808         libsystemd-bus-internal.la \
3809         libsystemd-id128-internal.la \
3810         libsystemd-daemon-internal.la \
3811         libsystemd-shared.la
3812
3813 rootbin_PROGRAMS += \
3814         machinectl
3815
3816 test_machine_tables_SOURCES = \
3817         src/machine/test-machine-tables.c
3818
3819 test_machine_tables_LDADD = \
3820         libsystemd-machine-core.la
3821
3822 tests += \
3823         test-machine-tables
3824
3825 nodist_systemunit_DATA += \
3826         units/systemd-machined.service
3827
3828 dist_systemunit_DATA += \
3829         units/machine.slice
3830
3831 dist_dbussystemservice_DATA += \
3832         src/machine/org.freedesktop.machine1.service
3833
3834 dist_dbuspolicy_DATA += \
3835         src/machine/org.freedesktop.machine1.conf
3836
3837 dist_zshcompletion_DATA += \
3838         shell-completion/zsh/_machinectl
3839
3840 SYSTEM_UNIT_ALIASES += \
3841         systemd-machined.service dbus-org.freedesktop.machine1.service
3842
3843 EXTRA_DIST += \
3844         units/systemd-machined.service.in
3845
3846 endif
3847
3848 # ------------------------------------------------------------------------------
3849 if ENABLE_NETWORKD
3850 rootlibexec_PROGRAMS += \
3851         systemd-networkd
3852
3853 systemd_networkd_SOURCES = \
3854         src/network/networkd.h \
3855         src/network/networkd.c \
3856         src/network/networkd-link.c \
3857         src/network/networkd-bridge.c \
3858         src/network/networkd-network.c \
3859         src/network/networkd-address.c \
3860         src/network/networkd-route.c \
3861         src/network/networkd-manager.c
3862
3863 nodist_systemd_networkd_SOURCES = \
3864         src/network/networkd-gperf.c
3865
3866 systemd_networkd_LDADD = \
3867         libudev-internal.la \
3868         libsystemd-daemon-internal.la \
3869         libsystemd-bus-internal.la \
3870         libsystemd-id128-internal.la \
3871         libsystemd-rtnl.la \
3872         libsystemd-shared.la
3873
3874 nodist_systemunit_DATA += \
3875         units/systemd-networkd.service
3876
3877 MULTI_USER_TARGET_WANTS += \
3878         systemd-networkd.service
3879
3880 test_network_SOURCES = \
3881         src/network/test-network.c \
3882         src/network/networkd.h \
3883         src/network/networkd-link.c \
3884         src/network/networkd-bridge.c \
3885         src/network/networkd-network.c \
3886         src/network/networkd-address.c \
3887         src/network/networkd-route.c \
3888         src/network/networkd-manager.c \
3889         src/network/networkd-gperf.c
3890
3891 test_network_LDADD = \
3892         libudev-internal.la \
3893         libsystemd-bus-internal.la \
3894         libsystemd-id128-internal.la \
3895         libsystemd-rtnl.la \
3896         libsystemd-shared.la
3897
3898 tests += test-network
3899
3900 EXTRA_DIST += \
3901         src/network/networkd-gperf.gperf \
3902         units/systemd-networkd.service.in
3903
3904 CLEANFILES += \
3905         src/network/networkd-gperf.c
3906 endif
3907
3908 # ------------------------------------------------------------------------------
3909 if ENABLE_LOGIND
3910 systemd_logind_SOURCES = \
3911         src/login/logind.c \
3912         src/login/logind.h
3913
3914 nodist_systemd_logind_SOURCES = \
3915         src/login/logind-gperf.c
3916
3917 systemd_logind_LDADD = \
3918         libsystemd-logind-core.la
3919
3920 libsystemd_logind_core_la_SOURCES = \
3921         src/login/logind-core.c \
3922         src/login/logind-device.c \
3923         src/login/logind-device.h \
3924         src/login/logind-button.c \
3925         src/login/logind-button.h \
3926         src/login/logind-action.c \
3927         src/login/logind-action.h \
3928         src/login/logind-seat.c \
3929         src/login/logind-seat.h \
3930         src/login/logind-session.c \
3931         src/login/logind-session.h \
3932         src/login/logind-session-device.c \
3933         src/login/logind-session-device.h \
3934         src/login/logind-user.c \
3935         src/login/logind-user.h \
3936         src/login/logind-inhibit.c \
3937         src/login/logind-inhibit.h \
3938         src/login/logind-dbus.c \
3939         src/login/logind-session-dbus.c \
3940         src/login/logind-seat-dbus.c \
3941         src/login/logind-user-dbus.c \
3942         src/login/logind-acl.h \
3943         src/login/login-shared.c \
3944         src/login/login-shared.h
3945
3946 libsystemd_logind_core_la_LIBADD = \
3947         libsystemd-label.la \
3948         libsystemd-capability.la \
3949         libsystemd-daemon-internal.la \
3950         libsystemd-id128-internal.la \
3951         libsystemd-bus-internal.la \
3952         libudev-internal.la \
3953         libsystemd-shared.la
3954
3955 if HAVE_ACL
3956 libsystemd_logind_core_la_SOURCES += \
3957         src/login/logind-acl.c
3958
3959 libsystemd_logind_core_la_LIBADD += \
3960         libsystemd-acl.la
3961 endif
3962
3963 noinst_LTLIBRARIES += \
3964         libsystemd-logind-core.la
3965
3966 systemd_user_sessions_SOURCES = \
3967         src/login/user-sessions.c
3968
3969 systemd_user_sessions_LDADD = \
3970         libsystemd-shared.la
3971
3972 rootlibexec_PROGRAMS += \
3973         systemd-logind \
3974         systemd-user-sessions
3975
3976 loginctl_SOURCES = \
3977         src/login/loginctl.c \
3978         src/login/sysfs-show.c
3979
3980 loginctl_LDADD = \
3981         libsystemd-bus-internal.la \
3982         libudev-internal.la \
3983         libsystemd-shared.la \
3984         libsystemd-id128-internal.la \
3985         libsystemd-daemon-internal.la
3986
3987 rootbin_PROGRAMS += \
3988         loginctl
3989
3990 dist_bashcompletion_DATA += \
3991         shell-completion/bash/loginctl
3992
3993 dist_zshcompletion_DATA += \
3994         shell-completion/zsh/_loginctl \
3995         shell-completion/zsh/_systemd-inhibit
3996
3997 systemd_inhibit_SOURCES = \
3998         src/login/inhibit.c
3999
4000 systemd_inhibit_LDADD = \
4001         libsystemd-bus-internal.la \
4002         libsystemd-id128-internal.la \
4003         libsystemd-daemon-internal.la \
4004         libsystemd-shared.la
4005
4006 rootbin_PROGRAMS += \
4007         systemd-inhibit
4008
4009 test_login_SOURCES = \
4010         src/login/test-login.c
4011
4012 test_login_LDADD = \
4013         libsystemd-login-internal.la \
4014         libsystemd-shared.la
4015
4016 test_login_shared_SOURCES = \
4017         src/login/test-login-shared.c
4018
4019 test_login_shared_LDADD = \
4020         libsystemd-login-internal.la \
4021         libsystemd-shared.la
4022
4023 test_inhibit_SOURCES = \
4024         src/login/test-inhibit.c
4025
4026 test_inhibit_LDADD = \
4027         libsystemd-bus-internal.la \
4028         libsystemd-daemon-internal.la \
4029         libsystemd-id128-internal.la \
4030         libsystemd-shared.la
4031
4032 test_login_tables_SOURCES = \
4033         src/login/test-login-tables.c
4034
4035 test_login_tables_LDADD = \
4036         libsystemd-logind-core.la
4037
4038 manual_tests += \
4039         test-login \
4040         test-inhibit
4041
4042 tests += \
4043         test-login-tables \
4044         test-login-shared
4045
4046 libsystemd_login_la_SOURCES = \
4047         src/login/libsystemd-login.sym \
4048         src/login/sd-login.c \
4049         src/systemd/sd-login.h \
4050         src/login/login-shared.c \
4051         src/login/login-shared.h
4052
4053 libsystemd_login_la_CFLAGS = \
4054         $(AM_CFLAGS) \
4055         -fvisibility=hidden
4056
4057 libsystemd_login_la_LDFLAGS = \
4058         $(AM_LDFLAGS) \
4059         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
4060         -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
4061
4062 libsystemd_login_la_LIBADD = \
4063         libsystemd-daemon-internal.la \
4064         libsystemd-shared.la
4065
4066 libsystemd_login_internal_la_SOURCES = \
4067         $(libsystemd_login_la_SOURCES)
4068
4069 if HAVE_PAM
4070 pam_systemd_la_SOURCES = \
4071         src/login/pam-module.c
4072
4073 pam_systemd_la_CFLAGS = \
4074         $(AM_CFLAGS) \
4075         $(PAM_CFLAGS) \
4076         -fvisibility=hidden
4077
4078 pam_systemd_la_LDFLAGS = \
4079         $(AM_LDFLAGS) \
4080         -module \
4081         -export-dynamic \
4082         -avoid-version \
4083         -shared \
4084         -export-symbols-regex '^pam_sm_.*'
4085
4086 pam_systemd_la_LIBADD = \
4087         libsystemd-capability.la \
4088         libsystemd-bus-internal.la \
4089         libsystemd-id128-internal.la \
4090         libsystemd-daemon-internal.la \
4091         libsystemd-shared.la \
4092         $(PAM_LIBS)
4093
4094 pamlib_LTLIBRARIES = \
4095         pam_systemd.la
4096
4097 dist_pamconf_DATA = \
4098         src/login/systemd-user
4099 endif
4100
4101 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
4102 libsystemd-login-install-hook:
4103         libname=libsystemd-login.so && $(move-to-rootlibdir)
4104
4105 libsystemd-login-uninstall-hook:
4106         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
4107
4108 INSTALL_EXEC_HOOKS += libsystemd-login-install-hook
4109 UNINSTALL_EXEC_HOOKS += libsystemd-login-uninstall-hook
4110
4111 nodist_systemunit_DATA += \
4112         units/systemd-logind.service \
4113         units/systemd-user-sessions.service
4114
4115 dist_systemunit_DATA += \
4116         units/user.slice
4117
4118 dist_dbussystemservice_DATA += \
4119         src/login/org.freedesktop.login1.service
4120
4121 dist_dbuspolicy_DATA += \
4122         src/login/org.freedesktop.login1.conf
4123
4124 dist_pkgsysconf_DATA += \
4125         src/login/logind.conf
4126
4127 pkginclude_HEADERS += \
4128         src/systemd/sd-login.h
4129
4130 lib_LTLIBRARIES += \
4131         libsystemd-login.la
4132
4133 noinst_LTLIBRARIES += \
4134         libsystemd-login-internal.la
4135
4136 pkgconfiglib_DATA += \
4137         src/login/libsystemd-login.pc
4138
4139 polkitpolicy_files += \
4140         src/login/org.freedesktop.login1.policy
4141
4142 INSTALL_DIRS += \
4143         $(systemdstatedir)
4144
4145 MULTI_USER_TARGET_WANTS += \
4146         systemd-logind.service \
4147         systemd-user-sessions.service
4148
4149 SYSTEM_UNIT_ALIASES += \
4150         systemd-logind.service dbus-org.freedesktop.login1.service
4151
4152 if ENABLE_MULTI_SEAT_X
4153
4154 systemd_multi_seat_x_SOURCES = \
4155         src/login/multi-seat-x.c
4156
4157 systemd_multi_seat_x_LDADD = \
4158         libsystemd-label.la \
4159         libsystemd-shared.la
4160
4161 rootlibexec_PROGRAMS += \
4162         systemd-multi-seat-x
4163
4164 endif
4165
4166 dist_udevrules_DATA += \
4167         src/login/70-uaccess.rules \
4168         src/login/70-power-switch.rules
4169
4170 nodist_udevrules_DATA += \
4171         src/login/71-seat.rules \
4172         src/login/73-seat-late.rules
4173
4174 CLEANFILES += \
4175         src/login/logind-gperf.c \
4176         src/login/71-seat.rules \
4177         src/login/73-seat-late.rules
4178 endif
4179
4180 polkitpolicy_in_files += \
4181         src/login/org.freedesktop.login1.policy.in
4182
4183 EXTRA_DIST += \
4184         src/login/logind-gperf.gperf \
4185         src/login/libsystemd-login.pc.in \
4186         src/login/71-seat.rules.in \
4187         src/login/73-seat-late.rules.in \
4188         units/systemd-logind.service.in \
4189         units/systemd-user-sessions.service.in
4190
4191 # ------------------------------------------------------------------------------
4192 if HAVE_PYTHON_DEVEL
4193 pkgpyexec_LTLIBRARIES = \
4194         _journal.la \
4195         id128.la \
4196         _daemon.la \
4197         _reader.la \
4198         login.la
4199
4200 _journal_la_SOURCES = \
4201         src/python-systemd/_journal.c
4202
4203 _journal_la_CFLAGS = \
4204         $(AM_CFLAGS) \
4205         -fvisibility=default \
4206         $(PYTHON_DEVEL_CFLAGS)
4207
4208 _journal_la_LDFLAGS = \
4209         $(AM_LDFLAGS) \
4210         -shared \
4211         -module \
4212         -avoid-version
4213
4214 _journal_la_LIBADD = \
4215         $(PYTHON_DEVEL_LIBS) \
4216         libsystemd-journal.la
4217
4218 id128_la_SOURCES = \
4219         src/python-systemd/id128.c \
4220         src/python-systemd/id128-constants.h \
4221         src/python-systemd/pyutil.c \
4222         src/python-systemd/pyutil.h
4223
4224 id128_la_CFLAGS = \
4225         $(AM_CFLAGS) \
4226         -fvisibility=default \
4227         $(PYTHON_DEVEL_CFLAGS) \
4228         -I$(top_builddir)/src/python-systemd
4229
4230 id128_la_LDFLAGS = \
4231         $(AM_LDFLAGS) \
4232         -shared \
4233         -module \
4234         -avoid-version
4235
4236 id128_la_LIBADD = \
4237         $(PYTHON_DEVEL_LIBS) \
4238         libsystemd-id128.la
4239
4240 _daemon_la_SOURCES = \
4241         src/python-systemd/_daemon.c \
4242         src/python-systemd/pyutil.c \
4243         src/python-systemd/pyutil.h
4244
4245 _daemon_la_CFLAGS = \
4246         $(AM_CFLAGS) \
4247         -fvisibility=default \
4248         $(PYTHON_DEVEL_CFLAGS) \
4249         -I$(top_builddir)/src/python-systemd
4250
4251 _daemon_la_LDFLAGS = \
4252         $(AM_LDFLAGS) \
4253         -shared \
4254         -module \
4255         -avoid-version
4256
4257 _daemon_la_LIBADD = \
4258         $(PYTHON_DEVEL_LIBS) \
4259         libsystemd-daemon.la
4260
4261 _reader_la_SOURCES = \
4262         src/python-systemd/_reader.c \
4263         src/python-systemd/pyutil.c \
4264         src/python-systemd/pyutil.h
4265
4266 _reader_la_CFLAGS = \
4267         $(AM_CFLAGS) \
4268         -fvisibility=default \
4269         $(PYTHON_DEVEL_CFLAGS)
4270
4271 _reader_la_LDFLAGS = \
4272         $(AM_LDFLAGS) \
4273         -shared \
4274         -module \
4275         -avoid-version
4276
4277 _reader_la_LIBADD = \
4278         $(PYTHON_DEVEL_LIBS) \
4279         libsystemd-journal.la \
4280         libsystemd-id128.la \
4281         libsystemd-daemon-internal.la \
4282         libsystemd-shared.la
4283
4284 login_la_SOURCES = \
4285         src/python-systemd/login.c \
4286         src/python-systemd/pyutil.c \
4287         src/python-systemd/pyutil.h
4288
4289 login_la_CFLAGS = \
4290         $(AM_CFLAGS) \
4291         -fvisibility=default \
4292         $(PYTHON_DEVEL_CFLAGS)
4293
4294 login_la_LDFLAGS = \
4295         $(AM_LDFLAGS) \
4296         -shared \
4297         -module \
4298         -avoid-version
4299
4300 login_la_LIBADD = \
4301         $(PYTHON_DEVEL_LIBS) \
4302         libsystemd-journal.la \
4303         libsystemd-login.la \
4304         libsystemd-daemon-internal.la \
4305         libsystemd-shared.la
4306
4307 dist_pkgpyexec_PYTHON = \
4308         src/python-systemd/journal.py \
4309         src/python-systemd/daemon.py \
4310         src/python-systemd/__init__.py
4311
4312 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4313         $(AM_V_at)$(MKDIR_P) $(dir $@)
4314         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4315
4316 BUILT_SOURCES += \
4317         src/python-systemd/id128-constants.h
4318
4319 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4320 sphinx-%:
4321         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4322         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4323         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4324
4325 python-shell:
4326         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4327         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4328
4329 destdir-sphinx: all
4330         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4331                 $(MAKE) DESTDIR="$$dir" install && \
4332                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4333                 rm -rf "$$dir"
4334
4335 endif
4336
4337 CLEAN_LOCAL_HOOKS += clean-sphinx
4338
4339 clean-sphinx:
4340         -rm -rf docs/html/python-systemd/
4341
4342 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4343 clean-python:
4344         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4345         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4346
4347 # ------------------------------------------------------------------------------
4348 substitutions = \
4349        '|rootlibexecdir=$(rootlibexecdir)|' \
4350        '|rootbindir=$(rootbindir)|' \
4351        '|bindir=$(bindir)|' \
4352        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
4353        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
4354        '|pkgsysconfdir=$(pkgsysconfdir)|' \
4355        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
4356        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
4357        '|pkgdatadir=$(pkgdatadir)|' \
4358        '|systemunitdir=$(systemunitdir)|' \
4359        '|userunitdir=$(userunitdir)|' \
4360        '|systempresetdir=$(systempresetdir)|' \
4361        '|userpresetdir=$(userpresetdir)|' \
4362        '|udevhwdbdir=$(udevhwdbdir)|' \
4363        '|udevrulesdir=$(udevrulesdir)|' \
4364        '|catalogdir=$(catalogdir)|' \
4365        '|tmpfilesdir=$(tmpfilesdir)|' \
4366        '|sysctldir=$(sysctldir)|' \
4367        '|systemgeneratordir=$(systemgeneratordir)|' \
4368        '|usergeneratordir=$(usergeneratordir)|' \
4369        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
4370        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
4371        '|PACKAGE_URL=$(PACKAGE_URL)|' \
4372        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
4373        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4374        '|prefix=$(prefix)|' \
4375        '|exec_prefix=$(exec_prefix)|' \
4376        '|libdir=$(libdir)|' \
4377        '|includedir=$(includedir)|' \
4378        '|VERSION=$(VERSION)|' \
4379        '|rootprefix=$(rootprefix)|' \
4380        '|udevlibexecdir=$(udevlibexecdir)|' \
4381        '|SUSHELL=$(SUSHELL)|' \
4382        '|DEBUGTTY=$(DEBUGTTY)|' \
4383        '|KILL=$(KILL)|' \
4384        '|KMOD=$(KMOD)|' \
4385        '|MKDIR_P=$(MKDIR_P)|' \
4386        '|QUOTAON=$(QUOTAON)|' \
4387        '|QUOTACHECK=$(QUOTACHECK)|' \
4388        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
4389        '|VARLOGDIR=$(varlogdir)|' \
4390        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
4391        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
4392        '|PYTHON=$(PYTHON)|' \
4393        '|PYTHON_BINARY=$(PYTHON_BINARY)|'
4394
4395 SED_PROCESS = \
4396         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4397         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
4398                 < $< > $@
4399
4400 units/%: units/%.in
4401         $(SED_PROCESS)
4402
4403 man/%: man/%.in
4404         $(SED_PROCESS)
4405
4406 sysctl.d/%: sysctl.d/%.in
4407         $(SED_PROCESS)
4408
4409 %.pc: %.pc.in
4410         $(SED_PROCESS)
4411
4412 src/core/macros.%: src/core/macros.%.in
4413         $(SED_PROCESS)
4414
4415 src/%.policy.in: src/%.policy.in.in
4416         $(SED_PROCESS)
4417
4418 %.rules: %.rules.in
4419         $(SED_PROCESS)
4420
4421 %.sh: %.sh.in
4422         $(SED_PROCESS)
4423         $(AM_V_GEN)chmod +x $@
4424
4425 src/%.c: src/%.gperf
4426         $(AM_V_at)$(MKDIR_P) $(dir $@)
4427         $(AM_V_GPERF)$(GPERF) < $< > $@
4428
4429 src/%: src/%.m4
4430         $(AM_V_at)$(MKDIR_P) $(dir $@)
4431         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
4432
4433 units/%: units/%.m4
4434         $(AM_V_M4)$(MKDIR_P) $(dir $@)
4435         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
4436
4437 units/user/%: units/%.m4
4438         $(AM_V_M4)$(MKDIR_P) $(dir $@)
4439         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
4440
4441 if ENABLE_POLKIT
4442 nodist_polkitpolicy_DATA = \
4443         $(polkitpolicy_files) \
4444         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
4445 endif
4446
4447 EXTRA_DIST += \
4448         $(polkitpolicy_in_files) \
4449         $(polkitpolicy_in_in_files)
4450
4451 CLEANFILES += \
4452         $(nodist_systemunit_DATA) \
4453         $(nodist_userunit_DATA) \
4454         $(pkgconfigdata_DATA) \
4455         $(pkgconfiglib_DATA) \
4456         $(nodist_polkitpolicy_DATA)
4457
4458 # ------------------------------------------------------------------------------
4459 if ENABLE_MANPAGES
4460 man/custom-entities.ent:
4461         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
4462         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
4463          echo '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">,$(substitutions))))') \
4464          > $@ # '
4465
4466 DISTCLEANFILES += \
4467         man/custom-entities.ent
4468
4469 XSLTPROC_FLAGS = \
4470         --nonet \
4471         --stringparam man.output.quietly 1 \
4472         --stringparam funcsynopsis.style ansi \
4473         --stringparam man.authors.section.enabled 0 \
4474         --stringparam man.copyright.section.enabled 0 \
4475         --stringparam systemd.version $(VERSION) \
4476         --path '$(builddir)/man:$(srcdir)/man'
4477
4478 XSLTPROC_PROCESS_MAN = \
4479         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
4480
4481 XSLTPROC_PROCESS_HTML = \
4482         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
4483
4484 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
4485         $(XSLTPROC_PROCESS_MAN)
4486
4487 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
4488         $(XSLTPROC_PROCESS_MAN)
4489
4490 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
4491         $(XSLTPROC_PROCESS_MAN)
4492
4493 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
4494         $(XSLTPROC_PROCESS_MAN)
4495
4496 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
4497         $(XSLTPROC_PROCESS_MAN)
4498
4499 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
4500         $(XSLTPROC_PROCESS_HTML)
4501
4502 define html-alias
4503         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
4504 endef
4505
4506 endif
4507
4508 EXTRA_DIST += \
4509         man/custom-html.xsl \
4510         man/custom-man.xsl
4511
4512 # ------------------------------------------------------------------------------
4513 if HAVE_SYSV_COMPAT
4514 sysvinit_DATA = \
4515         docs/sysvinit/README
4516
4517 varlog_DATA = \
4518         docs/var-log/README
4519
4520 docs/sysvinit/README: docs/sysvinit/README.in
4521         $(SED_PROCESS)
4522
4523 docs/var-log/README: docs/var-log/README.in
4524         $(SED_PROCESS)
4525
4526 CLEANFILES += \
4527         docs/sysvinit/README \
4528         docs/var-log/README
4529 endif
4530
4531 EXTRA_DIST += \
4532         docs/sysvinit/README.in \
4533         docs/var-log/README.in
4534
4535 SOCKETS_TARGET_WANTS += \
4536         systemd-initctl.socket \
4537         systemd-shutdownd.socket
4538
4539 if HAVE_SYSV_COMPAT
4540 RUNLEVEL1_TARGET_WANTS += \
4541         systemd-update-utmp-runlevel.service
4542 RUNLEVEL2_TARGET_WANTS += \
4543         systemd-update-utmp-runlevel.service
4544 RUNLEVEL3_TARGET_WANTS += \
4545         systemd-update-utmp-runlevel.service
4546 RUNLEVEL4_TARGET_WANTS += \
4547         systemd-update-utmp-runlevel.service
4548 RUNLEVEL5_TARGET_WANTS += \
4549         systemd-update-utmp-runlevel.service
4550 endif
4551 SYSINIT_TARGET_WANTS += \
4552         systemd-update-utmp.service
4553 LOCAL_FS_TARGET_WANTS += \
4554         systemd-remount-fs.service \
4555         tmp.mount
4556 MULTI_USER_TARGET_WANTS += \
4557         getty.target \
4558         systemd-ask-password-wall.path
4559 SYSINIT_TARGET_WANTS += \
4560         dev-hugepages.mount \
4561         dev-mqueue.mount \
4562         sys-kernel-config.mount \
4563         sys-kernel-debug.mount \
4564         sys-fs-fuse-connections.mount \
4565         systemd-sysctl.service \
4566         systemd-ask-password-console.path
4567
4568 if HAVE_SYSV_COMPAT
4569 SYSTEM_UNIT_ALIASES += \
4570         poweroff.target runlevel0.target \
4571         rescue.target runlevel1.target \
4572         multi-user.target runlevel2.target \
4573         multi-user.target runlevel3.target \
4574         multi-user.target runlevel4.target \
4575         graphical.target runlevel5.target \
4576         reboot.target runlevel6.target
4577 endif
4578
4579 SYSTEM_UNIT_ALIASES += \
4580         graphical.target default.target \
4581         reboot.target ctrl-alt-del.target \
4582         getty@.service autovt@.service
4583
4584 USER_UNIT_ALIASES += \
4585         $(systemunitdir)/shutdown.target shutdown.target \
4586         $(systemunitdir)/sockets.target sockets.target \
4587         $(systemunitdir)/timers.target timers.target \
4588         $(systemunitdir)/paths.target paths.target \
4589         $(systemunitdir)/bluetooth.target bluetooth.target \
4590         $(systemunitdir)/printer.target printer.target \
4591         $(systemunitdir)/sound.target sound.target \
4592         $(systemunitdir)/smartcard.target smartcard.target
4593
4594 GENERAL_ALIASES += \
4595         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
4596         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
4597         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
4598         ../system-services/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
4599
4600 if HAVE_SYSV_COMPAT
4601 INSTALL_DIRS += \
4602         $(systemunitdir)/runlevel1.target.wants \
4603         $(systemunitdir)/runlevel2.target.wants \
4604         $(systemunitdir)/runlevel3.target.wants \
4605         $(systemunitdir)/runlevel4.target.wants \
4606         $(systemunitdir)/runlevel5.target.wants
4607 endif
4608
4609 INSTALL_DIRS += \
4610         $(prefix)/lib/modules-load.d \
4611         $(sysconfdir)/modules-load.d \
4612         $(prefix)/lib/systemd/network \
4613         $(sysconfdir)/systemd/network \
4614         $(prefix)/lib/sysctl.d \
4615         $(sysconfdir)/sysctl.d \
4616         $(prefix)/lib/kernel/install.d \
4617         $(sysconfdir)/kernel/install.d \
4618         $(systemshutdowndir) \
4619         $(systemsleepdir) \
4620         $(systemgeneratordir) \
4621         $(usergeneratordir) \
4622         \
4623         $(userunitdir) \
4624         $(pkgsysconfdir)/system \
4625         $(pkgsysconfdir)/system/multi-user.target.wants \
4626         $(pkgsysconfdir)/system/getty.target.wants \