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