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