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