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