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