chiark / gitweb /
loopback-setup: move to rtnl
[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-shared.la
650
651 tests += test-rtnl
652
653 # ------------------------------------------------------------------------------
654 noinst_LTLIBRARIES += \
655         libsystemd-shared.la
656
657 libsystemd_shared_la_SOURCES = \
658         src/shared/linux/auto_dev-ioctl.h \
659         src/shared/linux/fanotify.h \
660         src/shared/linux/seccomp.h \
661         src/shared/linux/seccomp-bpf.h \
662         src/shared/missing.h \
663         src/shared/list.h \
664         src/shared/macro.h \
665         src/shared/def.h \
666         src/shared/device-nodes.c \
667         src/shared/device-nodes.h \
668         src/shared/sparse-endian.h \
669         src/shared/util.c \
670         src/shared/util.h \
671         src/shared/udev-util.h \
672         src/shared/virt.c \
673         src/shared/virt.h \
674         src/shared/efivars.c \
675         src/shared/efivars.h \
676         src/shared/path-util.c \
677         src/shared/path-util.h \
678         src/shared/time-util.c \
679         src/shared/time-util.h \
680         src/shared/hashmap.c \
681         src/shared/hashmap.h \
682         src/shared/set.c \
683         src/shared/set.h \
684         src/shared/fdset.c \
685         src/shared/fdset.h \
686         src/shared/prioq.c \
687         src/shared/prioq.h \
688         src/shared/sleep-config.c \
689         src/shared/sleep-config.h \
690         src/shared/strv.c \
691         src/shared/strv.h \
692         src/shared/env-util.c \
693         src/shared/env-util.h \
694         src/shared/strbuf.c \
695         src/shared/strbuf.h \
696         src/shared/strxcpyx.c \
697         src/shared/strxcpyx.h \
698         src/shared/conf-parser.c \
699         src/shared/conf-parser.h \
700         src/shared/log.c \
701         src/shared/log.h \
702         src/shared/ratelimit.h \
703         src/shared/ratelimit.c \
704         src/shared/exit-status.c \
705         src/shared/exit-status.h \
706         src/shared/utf8.c \
707         src/shared/utf8.h \
708         src/shared/gunicode.c \
709         src/shared/gunicode.h \
710         src/shared/pager.c \
711         src/shared/pager.h \
712         src/shared/ioprio.h \
713         src/shared/socket-util.c \
714         src/shared/socket-util.h \
715         src/shared/conf-files.c \
716         src/shared/conf-files.h \
717         src/shared/cgroup-util.c \
718         src/shared/cgroup-util.h \
719         src/shared/cgroup-show.c \
720         src/shared/cgroup-show.h \
721         src/shared/unit-name.c \
722         src/shared/unit-name.h \
723         src/shared/utmp-wtmp.c \
724         src/shared/utmp-wtmp.h \
725         src/shared/watchdog.c \
726         src/shared/watchdog.h \
727         src/shared/spawn-ask-password-agent.c \
728         src/shared/spawn-ask-password-agent.h \
729         src/shared/replace-var.c \
730         src/shared/replace-var.h \
731         src/shared/spawn-polkit-agent.c \
732         src/shared/spawn-polkit-agent.h \
733         src/shared/hwclock.c \
734         src/shared/hwclock.h \
735         src/shared/time-dst.c \
736         src/shared/time-dst.h \
737         src/shared/calendarspec.c \
738         src/shared/calendarspec.h \
739         src/shared/fileio.c \
740         src/shared/fileio.h \
741         src/shared/output-mode.h \
742         src/shared/MurmurHash3.c \
743         src/shared/MurmurHash3.h \
744         src/shared/acpi-fpdt.h \
745         src/shared/acpi-fpdt.c \
746         src/shared/boot-timestamps.h \
747         src/shared/boot-timestamps.c \
748         src/shared/refcnt.h \
749         src/shared/mkdir.c \
750         src/shared/mkdir.h \
751         src/shared/smack-util.c \
752         src/shared/smack-util.h \
753         src/shared/apparmor-util.c \
754         src/shared/apparmor-util.h \
755         src/shared/ima-util.c \
756         src/shared/ima-util.h \
757         src/shared/ptyfwd.c \
758         src/shared/ptyfwd.h \
759         src/shared/net-util.c \
760         src/shared/net-util.h
761
762 #-------------------------------------------------------------------------------
763 noinst_LTLIBRARIES += \
764         libsystemd-dbus.la
765
766 libsystemd_dbus_la_SOURCES = \
767         src/shared/dbus-common.c \
768         src/shared/dbus-common.h
769
770 libsystemd_dbus_la_CFLAGS = \
771         $(AM_CFLAGS) \
772         $(DBUS_CFLAGS)
773
774 libsystemd_dbus_la_LIBADD = \
775         $(DBUS_LIBS)
776
777 # ------------------------------------------------------------------------------
778 noinst_LTLIBRARIES += \
779         libsystemd-units.la
780
781 libsystemd_units_la_SOURCES = \
782         src/shared/install.c \
783         src/shared/install.h \
784         src/shared/install-printf.c \
785         src/shared/install-printf.h \
786         src/shared/path-lookup.c \
787         src/shared/path-lookup.h \
788         src/shared/specifier.c \
789         src/shared/specifier.h
790
791 libsystemd_units_la_CFLAGS = \
792         $(AM_CFLAGS) \
793         $(DBUS_CFLAGS)
794
795 # ------------------------------------------------------------------------------
796 noinst_LTLIBRARIES += \
797         libsystemd-label.la
798
799 libsystemd_label_la_SOURCES = \
800         src/shared/socket-label.c \
801         src/shared/label.c \
802         src/shared/label.h \
803         src/shared/selinux-util.c \
804         src/shared/selinux-util.h \
805         src/shared/mkdir-label.c \
806         src/shared/ask-password-api.c \
807         src/shared/ask-password-api.h \
808         src/shared/fileio-label.c \
809         src/shared/fileio-label.h \
810         src/shared/dev-setup.c \
811         src/shared/dev-setup.h
812
813 libsystemd_label_la_CFLAGS = \
814         $(AM_CFLAGS) \
815         $(SELINUX_CFLAGS)
816
817 libsystemd_label_la_LIBADD = \
818         $(SELINUX_LIBS)
819
820 # ------------------------------------------------------------------------------
821 noinst_LTLIBRARIES += \
822         libsystemd-logs.la
823
824 libsystemd_logs_la_SOURCES = \
825         src/shared/logs-show.c \
826         src/shared/logs-show.h
827
828 # ------------------------------------------------------------------------------
829 noinst_LTLIBRARIES += \
830         libsystemd-capability.la
831
832 libsystemd_capability_la_SOURCES = \
833         src/shared/capability.c \
834         src/shared/capability.h
835
836 libsystemd_capability_la_CFLAGS = \
837         $(AM_CFLAGS) \
838         $(CAP_CFLAGS)
839
840 libsystemd_capability_la_LIBADD = \
841         $(CAP_LIBS)
842
843 # ------------------------------------------------------------------------------
844 noinst_LTLIBRARIES += \
845         libsystemd-audit.la
846
847 libsystemd_audit_la_SOURCES = \
848         src/shared/audit.c \
849         src/shared/audit.h
850
851 # ------------------------------------------------------------------------------
852 if HAVE_ACL
853 noinst_LTLIBRARIES += \
854         libsystemd-acl.la
855
856 libsystemd_acl_la_SOURCES = \
857         src/shared/acl-util.c \
858         src/shared/acl-util.h
859
860 libsystemd_acl_la_CFLAGS = \
861         $(AM_CFLAGS) \
862         $(ACL_CFLAGS)
863
864 libsystemd_acl_la_LIBADD = \
865         $(ACL_LIBS)
866 endif
867
868 # ------------------------------------------------------------------------------
869 noinst_LTLIBRARIES += \
870         libsystemd-core.la
871
872 libsystemd_core_la_SOURCES = \
873         src/core/unit.c \
874         src/core/unit.h \
875         src/core/unit-printf.c \
876         src/core/unit-printf.h \
877         src/core/job.c \
878         src/core/job.h \
879         src/core/manager.c \
880         src/core/manager.h \
881         src/core/transaction.c \
882         src/core/transaction.h \
883         src/core/load-fragment.c \
884         src/core/load-fragment.h \
885         src/core/service.c \
886         src/core/service.h \
887         src/core/automount.c \
888         src/core/automount.h \
889         src/core/mount.c \
890         src/core/mount.h \
891         src/core/swap.c \
892         src/core/swap.h \
893         src/core/device.c \
894         src/core/device.h \
895         src/core/target.c \
896         src/core/target.h \
897         src/core/snapshot.c \
898         src/core/snapshot.h \
899         src/core/socket.c \
900         src/core/socket.h \
901         src/core/timer.c \
902         src/core/timer.h \
903         src/core/path.c \
904         src/core/path.h \
905         src/core/slice.c \
906         src/core/slice.h \
907         src/core/scope.c \
908         src/core/scope.h \
909         src/core/load-dropin.c \
910         src/core/load-dropin.h \
911         src/core/execute.c \
912         src/core/execute.h \
913         src/core/kill.c \
914         src/core/kill.h \
915         src/core/dbus.c \
916         src/core/dbus.h \
917         src/core/dbus-manager.c \
918         src/core/dbus-manager.h \
919         src/core/dbus-unit.c \
920         src/core/dbus-unit.h \
921         src/core/dbus-job.c \
922         src/core/dbus-job.h \
923         src/core/dbus-service.c \
924         src/core/dbus-service.h \
925         src/core/dbus-socket.c \
926         src/core/dbus-socket.h \
927         src/core/dbus-timer.c \
928         src/core/dbus-timer.h \
929         src/core/dbus-target.c \
930         src/core/dbus-target.h \
931         src/core/dbus-mount.c \
932         src/core/dbus-mount.h \
933         src/core/dbus-automount.c \
934         src/core/dbus-automount.h \
935         src/core/dbus-swap.c \
936         src/core/dbus-swap.h \
937         src/core/dbus-snapshot.c \
938         src/core/dbus-snapshot.h \
939         src/core/dbus-device.c \
940         src/core/dbus-device.h \
941         src/core/dbus-path.c \
942         src/core/dbus-path.h \
943         src/core/dbus-slice.c \
944         src/core/dbus-slice.h \
945         src/core/dbus-scope.c \
946         src/core/dbus-scope.h \
947         src/core/dbus-execute.c \
948         src/core/dbus-execute.h \
949         src/core/dbus-kill.c \
950         src/core/dbus-kill.h \
951         src/core/dbus-cgroup.c \
952         src/core/dbus-cgroup.h \
953         src/core/cgroup.c \
954         src/core/cgroup.h \
955         src/core/selinux-access.c \
956         src/core/selinux-access.h \
957         src/core/selinux-setup.c \
958         src/core/selinux-setup.h \
959         src/core/smack-setup.c \
960         src/core/smack-setup.h \
961         src/core/ima-setup.c \
962         src/core/ima-setup.h \
963         src/core/locale-setup.h \
964         src/core/locale-setup.c \
965         src/core/hostname-setup.c \
966         src/core/hostname-setup.h \
967         src/core/machine-id-setup.c \
968         src/core/machine-id-setup.h \
969         src/core/mount-setup.c \
970         src/core/mount-setup.h \
971         src/core/loopback-setup.h \
972         src/core/loopback-setup.c \
973         src/core/condition.c \
974         src/core/condition.h \
975         src/core/namespace.c \
976         src/core/namespace.h \
977         src/core/tcpwrap.c \
978         src/core/tcpwrap.h \
979         src/core/securebits.h \
980         src/core/initreq.h \
981         src/core/special.h \
982         src/core/bus-errors.h \
983         src/core/build.h \
984         src/core/sysfs-show.h \
985         src/core/switch-root.h \
986         src/core/switch-root.c \
987         src/core/killall.h \
988         src/core/killall.c \
989         src/core/syscall-list.c \
990         src/core/syscall-list.h \
991         src/core/audit-fd.c \
992         src/core/audit-fd.h \
993         src/core/async.c \
994         src/core/async.h
995
996 if HAVE_KMOD
997 libsystemd_core_la_SOURCES += \
998         src/core/kmod-setup.c \
999         src/core/kmod-setup.h
1000 endif
1001
1002 nodist_libsystemd_core_la_SOURCES = \
1003         src/core/load-fragment-gperf.c \
1004         src/core/load-fragment-gperf-nulstr.c \
1005         src/core/syscall-from-name.h \
1006         src/core/syscall-to-name.h
1007
1008 libsystemd_core_la_CFLAGS = \
1009         $(AM_CFLAGS) \
1010         $(DBUS_CFLAGS) \
1011         $(LIBWRAP_CFLAGS) \
1012         $(PAM_CFLAGS) \
1013         $(AUDIT_CFLAGS) \
1014         $(KMOD_CFLAGS) \
1015         -pthread
1016
1017 libsystemd_core_la_LIBADD = \
1018         libsystemd-capability.la \
1019         libsystemd-units.la \
1020         libsystemd-label.la \
1021         libsystemd-dbus.la \
1022         libsystemd-audit.la \
1023         libsystemd-id128-internal.la \
1024         libsystemd-daemon-internal.la \
1025         libudev-internal.la \
1026         libsystemd-shared.la \
1027         libsystemd-rtnl.la \
1028         $(LIBWRAP_LIBS) \
1029         $(PAM_LIBS) \
1030         $(AUDIT_LIBS) \
1031         $(CAP_LIBS) \
1032         $(KMOD_LIBS)
1033
1034 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1035         $(AM_V_at)$(MKDIR_P) $(dir $@)
1036         $(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 ";" }' < $< > $@
1037
1038 EXTRA_DIST += \
1039         src/core/load-fragment-gperf.gperf.m4
1040
1041 CLEANFILES += \
1042         src/core/load-fragment-gperf.gperf \
1043         src/core/load-fragment-gperf.c \
1044         src/core/load-fragment-gperf-nulstr.c \
1045         src/core/syscall-list.txt \
1046         src/core/syscall-from-name.gperf
1047
1048 BUILT_SOURCES += \
1049         src/core/syscall-from-name.h \
1050         src/core/syscall-to-name.h
1051
1052 src/core/syscall-list.txt: Makefile
1053         $(AM_V_at)$(MKDIR_P) $(dir $@)
1054         $(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; }' > $@
1055
1056 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
1057         $(AM_V_at)$(MKDIR_P) $(dir $@)
1058         $(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 }' < $< > $@
1059
1060 src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
1061         $(AM_V_at)$(MKDIR_P) $(dir $@)
1062         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1063
1064 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
1065         $(AM_V_at)$(MKDIR_P) $(dir $@)
1066         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1067
1068 # ------------------------------------------------------------------------------
1069 systemd_SOURCES = \
1070         src/core/main.c
1071
1072 systemd_CFLAGS = \
1073         $(AM_CFLAGS) \
1074         $(DBUS_CFLAGS)
1075
1076 systemd_LDADD = \
1077         libsystemd-core.la \
1078         $(RT_LIBS)
1079
1080 dist_pkgsysconf_DATA += \
1081         src/core/system.conf \
1082         src/core/user.conf
1083
1084 dist_dbuspolicy_DATA += \
1085         src/core/org.freedesktop.systemd1.conf
1086
1087 dist_dbussystemservice_DATA += \
1088         src/core/org.freedesktop.systemd1.service
1089
1090 polkitpolicy_in_in_files += \
1091         src/core/org.freedesktop.systemd1.policy.in.in
1092
1093 pkgconfigdata_DATA = \
1094         src/core/systemd.pc
1095
1096 nodist_rpmmacros_DATA = \
1097         src/core/macros.systemd
1098
1099 EXTRA_DIST += \
1100         src/core/systemd.pc.in \
1101         src/core/macros.systemd.in
1102
1103 CLEANFILES += \
1104         src/core/macros.systemd \
1105         src/core/org.freedesktop.systemd1.policy.in
1106
1107 # ------------------------------------------------------------------------------
1108 manual_tests += \
1109         test-engine \
1110         test-ns \
1111         test-loopback \
1112         test-hostname \
1113         test-daemon \
1114         test-cgroup \
1115         test-install \
1116         test-watchdog \
1117         test-log
1118
1119 tests += \
1120         test-job-type \
1121         test-env-replace \
1122         test-strbuf \
1123         test-strv \
1124         test-path-util \
1125         test-strxcpyx \
1126         test-unit-name \
1127         test-unit-file \
1128         test-utf8 \
1129         test-ellipsize \
1130         test-util \
1131         test-namespace \
1132         test-date \
1133         test-sleep \
1134         test-replace-var \
1135         test-sched-prio \
1136         test-calendarspec \
1137         test-strip-tab-ansi \
1138         test-cgroup-util \
1139         test-prioq \
1140         test-fileio \
1141         test-time \
1142         test-hashmap \
1143         test-list \
1144         test-tables \
1145         test-device-nodes
1146
1147 EXTRA_DIST += \
1148         test/sched_idle_bad.service \
1149         test/sched_idle_ok.service \
1150         test/sched_rr_bad.service \
1151         test/sched_rr_ok.service \
1152         test/sched_rr_change.service
1153
1154 EXTRA_DIST += \
1155         src/test/test-helper.h
1156
1157 test_device_nodes_SOURCES = \
1158         src/test/test-device-nodes.c
1159
1160 test_device_nodes_LDADD = \
1161         libsystemd-shared.la
1162
1163 test_engine_SOURCES = \
1164         src/test/test-engine.c
1165
1166 test_engine_CFLAGS = \
1167         $(AM_CFLAGS) \
1168         $(DBUS_CFLAGS)
1169
1170 test_engine_LDADD = \
1171         libsystemd-core.la \
1172         $(RT_LIBS)
1173
1174 test_job_type_SOURCES = \
1175         src/test/test-job-type.c
1176
1177 test_job_type_CFLAGS = \
1178         $(AM_CFLAGS) \
1179         $(DBUS_CFLAGS)
1180
1181 test_job_type_LDADD = \
1182         libsystemd-core.la \
1183         $(RT_LIBS)
1184
1185 test_ns_SOURCES = \
1186         src/test/test-ns.c
1187
1188 test_ns_LDADD = \
1189         libsystemd-core.la
1190
1191 test_ns_CFLAGS = \
1192         $(AM_CFLAGS) \
1193         $(DBUS_CFLAGS)
1194
1195 test_loopback_SOURCES = \
1196         src/test/test-loopback.c
1197
1198 test_loopback_LDADD = \
1199         libsystemd-core.la
1200
1201 test_hostname_SOURCES = \
1202         src/test/test-hostname.c
1203
1204 test_hostname_LDADD = \
1205         libsystemd-core.la
1206
1207 if ENABLE_EFI
1208 manual_tests += \
1209         test-boot-timestamp
1210
1211 test_boot_timestamp_SOURCES = \
1212         src/test/test-boot-timestamps.c
1213
1214 test_boot_timestamp_LDADD = \
1215         libsystemd-shared.la
1216 endif
1217
1218 test_unit_name_SOURCES = \
1219         src/test/test-unit-name.c
1220
1221 test_unit_name_CFLAGS = \
1222         $(AM_CFLAGS) \
1223         $(DBUS_CFLAGS)
1224
1225 test_unit_name_LDADD = \
1226         libsystemd-core.la \
1227         $(RT_LIBS)
1228
1229 test_unit_file_SOURCES = \
1230         src/test/test-unit-file.c
1231
1232 test_unit_file_CFLAGS = \
1233         $(AM_CFLAGS) \
1234         $(DBUS_CFLAGS)
1235
1236 test_unit_file_LDADD = \
1237         libsystemd-core.la \
1238         $(RT_LIBS)
1239
1240 test_utf8_SOURCES = \
1241         src/test/test-utf8.c
1242
1243 test_utf8_LDADD = \
1244         libsystemd-shared.la
1245
1246 test_util_SOURCES = \
1247         src/test/test-util.c
1248
1249 test_util_LDADD = \
1250         libsystemd-core.la
1251
1252 test_namespace_SOURCES = \
1253         src/test/test-namespace.c
1254
1255 test_namespace_LDADD = \
1256         libsystemd-core.la
1257
1258 test_hashmap_SOURCES = \
1259         src/test/test-hashmap.c
1260
1261 test_hashmap_LDADD = \
1262         libsystemd-core.la
1263
1264 test_list_SOURCES = \
1265         src/test/test-list.c
1266
1267 test_list_LDADD = \
1268         libsystemd-core.la
1269
1270 test_tables_SOURCES = \
1271         src/test/test-tables.c \
1272         src/shared/test-tables.h
1273
1274 test_tables_CFLAGS = \
1275         $(AM_CFLAGS) \
1276         $(DBUS_CFLAGS)
1277
1278 test_tables_LDADD = \
1279         libsystemd-logs.la \
1280         libsystemd-journal-internal.la \
1281         libsystemd-core.la \
1282         $(RT_LIBS)
1283
1284 test_prioq_SOURCES = \
1285         src/test/test-prioq.c
1286
1287 test_prioq_LDADD = \
1288         libsystemd-core.la
1289
1290 test_fileio_SOURCES = \
1291         src/test/test-fileio.c
1292
1293 test_fileio_LDADD = \
1294         libsystemd-core.la
1295
1296 test_time_SOURCES = \
1297         src/test/test-time.c
1298
1299 test_time_LDADD = \
1300         libsystemd-core.la
1301
1302 test_log_SOURCES = \
1303         src/test/test-log.c
1304
1305 test_log_LDADD = \
1306         libsystemd-core.la
1307
1308 test_ellipsize_SOURCES = \
1309         src/test/test-ellipsize.c
1310
1311 test_ellipsize_LDADD = \
1312         libsystemd-core.la
1313
1314 test_date_SOURCES = \
1315         src/test/test-date.c
1316
1317 test_date_LDADD = \
1318         libsystemd-core.la
1319
1320 test_sleep_SOURCES = \
1321         src/test/test-sleep.c
1322
1323 test_sleep_LDADD = \
1324         libsystemd-core.la
1325
1326 test_replace_var_SOURCES = \
1327         src/test/test-replace-var.c
1328
1329 test_replace_var_LDADD = \
1330         libsystemd-shared.la
1331
1332 test_calendarspec_SOURCES = \
1333         src/test/test-calendarspec.c
1334
1335 test_calendarspec_LDADD = \
1336         libsystemd-shared.la
1337
1338 test_strip_tab_ansi_SOURCES = \
1339         src/test/test-strip-tab-ansi.c
1340
1341 test_strip_tab_ansi_LDADD = \
1342         libsystemd-shared.la
1343
1344 test_daemon_SOURCES = \
1345         src/test/test-daemon.c
1346
1347 test_daemon_LDADD = \
1348         libsystemd-daemon-internal.la \
1349         libsystemd-shared.la
1350
1351 test_cgroup_SOURCES = \
1352         src/test/test-cgroup.c
1353
1354 test_cgroup_LDADD = \
1355         libsystemd-label.la \
1356         libsystemd-shared.la
1357
1358 test_cgroup_util_SOURCES = \
1359         src/test/test-cgroup-util.c
1360
1361 test_cgroup_util_LDADD = \
1362         libsystemd-label.la \
1363         libsystemd-daemon-internal.la \
1364         libsystemd-shared.la
1365
1366 test_env_replace_SOURCES = \
1367         src/test/test-env-replace.c
1368
1369 test_env_replace_LDADD = \
1370         libsystemd-shared.la
1371
1372 test_strbuf_SOURCES = \
1373         src/test/test-strbuf.c
1374
1375 test_strbuf_LDADD = \
1376         libsystemd-shared.la
1377
1378 test_strv_SOURCES = \
1379         src/test/test-strv.c
1380
1381 test_strv_LDADD = \
1382         libsystemd-units.la \
1383         libsystemd-id128-internal.la \
1384         libsystemd-shared.la
1385
1386 test_path_util_SOURCES = \
1387         src/test/test-path-util.c
1388
1389 test_path_util_LDADD = \
1390         libsystemd-shared.la
1391
1392 test_strxcpyx_SOURCES = \
1393         src/test/test-strxcpyx.c
1394
1395 test_strxcpyx_LDADD = \
1396         libsystemd-shared.la
1397
1398 test_install_SOURCES = \
1399         src/test/test-install.c
1400
1401 test_install_CFLAGS = \
1402         $(AM_CFLAGS) \
1403         $(DBUS_CFLAGS)
1404
1405 test_install_LDADD = \
1406         libsystemd-units.la \
1407         libsystemd-label.la \
1408         libsystemd-id128-internal.la \
1409         libsystemd-shared.la
1410
1411 test_watchdog_SOURCES = \
1412         src/test/test-watchdog.c
1413
1414 test_watchdog_LDADD = \
1415         libsystemd-shared.la
1416
1417 test_sched_prio_SOURCES = \
1418         src/test/test-sched-prio.c
1419
1420 test_sched_prio_CFLAGS = \
1421         $(AM_CFLAGS) \
1422         $(DBUS_CFLAGS) \
1423         -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
1424
1425 test_sched_prio_LDADD = \
1426         libsystemd-core.la \
1427         $(RT_LIBS)
1428
1429 # ------------------------------------------------------------------------------
1430 ## .PHONY so it always rebuilds it
1431 .PHONY: coverage lcov-run lcov-report
1432
1433 # run lcov from scratch, always
1434 coverage:
1435         $(MAKE) lcov-run
1436         $(MAKE) lcov-report
1437
1438 coverage_dir = coverage
1439 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1440
1441 if ENABLE_COVERAGE
1442 # reset run coverage tests
1443 lcov-run:
1444         @rm -rf $(coverage_dir)
1445         lcov $(coverage_opts) --zerocounters
1446         -$(MAKE) check
1447
1448 # generate report based on current coverage data
1449 lcov-report:
1450         $(MKDIR_P) $(coverage_dir)
1451         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1452                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1453         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1454         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1455
1456 # lcov doesn't work properly with vpath builds, make sure that bad
1457 # output is not uploaded by mistake.
1458 coverage-sync: coverage
1459         test "$(builddir)" = "$(srcdir)"
1460         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1461
1462 else
1463 lcov-run lcov-report:
1464         echo "Need to reconfigure with --enable-coverage"
1465 endif
1466
1467 # ------------------------------------------------------------------------------
1468 systemd_analyze_SOURCES = \
1469         src/analyze/analyze.c
1470
1471 systemd_analyze_LDADD = \
1472         libsystemd-bus-internal.la \
1473         libsystemd-id128-internal.la \
1474         libsystemd-daemon-internal.la \
1475         libsystemd-shared.la
1476
1477 # ------------------------------------------------------------------------------
1478 systemd_initctl_SOURCES = \
1479         src/initctl/initctl.c
1480
1481 systemd_initctl_LDADD = \
1482         libsystemd-bus-internal.la \
1483         libsystemd-id128-internal.la \
1484         libsystemd-daemon-internal.la \
1485         libsystemd-shared.la
1486
1487 # ------------------------------------------------------------------------------
1488 systemd_update_utmp_SOURCES = \
1489         src/update-utmp/update-utmp.c
1490
1491 systemd_update_utmp_CFLAGS = \
1492         $(AM_CFLAGS) \
1493         $(AUDIT_CFLAGS)
1494
1495 systemd_update_utmp_LDADD = \
1496         libsystemd-bus-internal.la \
1497         libsystemd-id128-internal.la \
1498         libsystemd-daemon-internal.la \
1499         libsystemd-shared.la \
1500         $(AUDIT_LIBS)
1501
1502 # ------------------------------------------------------------------------------
1503 systemd_shutdownd_SOURCES = \
1504         src/shutdownd/shutdownd.c
1505
1506 systemd_shutdownd_LDADD = \
1507         libsystemd-label.la \
1508         libsystemd-daemon-internal.la \
1509         libsystemd-shared.la
1510
1511 dist_doc_DATA += \
1512         src/systemd/sd-shutdown.h
1513
1514 # ------------------------------------------------------------------------------
1515 systemd_shutdown_SOURCES = \
1516         src/core/umount.c \
1517         src/core/umount.h \
1518         src/core/shutdown.c \
1519         src/core/mount-setup.c \
1520         src/core/mount-setup.h \
1521         src/core/killall.h \
1522         src/core/killall.c
1523
1524 systemd_shutdown_LDADD = \
1525         libsystemd-label.la \
1526         libudev-internal.la \
1527         libsystemd-shared.la
1528
1529 # ------------------------------------------------------------------------------
1530 if HAVE_KMOD
1531 systemd_modules_load_SOURCES = \
1532         src/modules-load/modules-load.c
1533
1534 systemd_modules_load_CFLAGS = \
1535         $(AM_CFLAGS) \
1536         $(KMOD_CFLAGS)
1537
1538 systemd_modules_load_LDADD = \
1539         libsystemd-shared.la \
1540         $(KMOD_LIBS)
1541
1542 rootlibexec_PROGRAMS += \
1543         systemd-modules-load
1544
1545 nodist_systemunit_DATA += \
1546         units/systemd-modules-load.service
1547
1548 SYSINIT_TARGET_WANTS += \
1549         systemd-modules-load.service
1550
1551 if ENABLE_TMPFILES
1552 nodist_systemunit_DATA += \
1553         units/kmod-static-nodes.service
1554
1555 SYSINIT_TARGET_WANTS += \
1556         kmod-static-nodes.service
1557 endif
1558 endif
1559
1560 EXTRA_DIST += \
1561         units/systemd-modules-load.service.in \
1562         units/kmod-static-nodes.service.in
1563
1564 # ------------------------------------------------------------------------------
1565 if ENABLE_TMPFILES
1566 systemd_tmpfiles_SOURCES = \
1567         src/tmpfiles/tmpfiles.c \
1568         src/shared/specifier.c \
1569         src/shared/specifier.h
1570
1571 systemd_tmpfiles_LDADD = \
1572         libsystemd-label.la \
1573         libsystemd-capability.la \
1574         libsystemd-id128-internal.la \
1575         libsystemd-shared.la
1576
1577 rootbin_PROGRAMS += \
1578         systemd-tmpfiles
1579
1580 dist_systemunit_DATA += \
1581         units/systemd-tmpfiles-clean.timer
1582
1583 nodist_systemunit_DATA += \
1584         units/systemd-tmpfiles-setup-dev.service \
1585         units/systemd-tmpfiles-setup.service \
1586         units/systemd-tmpfiles-clean.service
1587
1588 dist_tmpfiles_DATA = \
1589         tmpfiles.d/systemd.conf \
1590         tmpfiles.d/tmp.conf \
1591         tmpfiles.d/x11.conf
1592
1593 if HAVE_SYSV_COMPAT
1594 dist_tmpfiles_DATA += \
1595         tmpfiles.d/legacy.conf
1596 endif
1597
1598 SYSINIT_TARGET_WANTS += \
1599         systemd-tmpfiles-setup-dev.service \
1600         systemd-tmpfiles-setup.service
1601
1602 dist_zshcompletion_DATA += \
1603         shell-completion/zsh/_systemd-tmpfiles
1604
1605 TIMERS_TARGET_WANTS += \
1606         systemd-tmpfiles-clean.timer
1607
1608 INSTALL_DIRS += \
1609         $(tmpfilesdir) \
1610         $(sysconfdir)/tmpfiles.d
1611 endif
1612
1613 EXTRA_DIST += \
1614         units/systemd-tmpfiles-setup-dev.service.in \
1615         units/systemd-tmpfiles-setup.service.in \
1616         units/systemd-tmpfiles-clean.service.in
1617
1618 # ------------------------------------------------------------------------------
1619 systemd_machine_id_setup_SOURCES = \
1620         src/machine-id-setup/machine-id-setup-main.c \
1621         src/core/machine-id-setup.c \
1622         src/core/machine-id-setup.h
1623
1624 systemd_machine_id_setup_LDADD = \
1625         libsystemd-label.la \
1626         libsystemd-id128-internal.la \
1627         libsystemd-shared.la
1628
1629 # ------------------------------------------------------------------------------
1630 systemd_sysctl_SOURCES = \
1631         src/sysctl/sysctl.c
1632
1633 systemd_sysctl_LDADD = \
1634         libsystemd-shared.la
1635
1636 # ------------------------------------------------------------------------------
1637 systemd_sleep_SOURCES = \
1638         src/sleep/sleep.c
1639
1640 systemd_sleep_LDADD = \
1641         libsystemd-shared.la
1642
1643 # ------------------------------------------------------------------------------
1644 systemd_fsck_SOURCES = \
1645         src/fsck/fsck.c
1646
1647 systemd_fsck_LDADD = \
1648         libsystemd-bus-internal.la \
1649         libsystemd-id128-internal.la \
1650         libsystemd-daemon-internal.la \
1651         libudev-internal.la \
1652         libsystemd-shared.la
1653
1654 # ------------------------------------------------------------------------------
1655 systemd_ac_power_SOURCES = \
1656         src/ac-power/ac-power.c
1657
1658 systemd_ac_power_LDADD = \
1659         libudev-internal.la \
1660         libsystemd-shared.la
1661
1662 # ------------------------------------------------------------------------------
1663 systemd_detect_virt_SOURCES = \
1664         src/detect-virt/detect-virt.c
1665
1666 systemd_detect_virt_LDADD = \
1667         libsystemd-shared.la
1668
1669 systemd-detect-virt-install-hook:
1670         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1671
1672 INSTALL_EXEC_HOOKS += \
1673         systemd-detect-virt-install-hook
1674
1675 # ------------------------------------------------------------------------------
1676 systemd_delta_SOURCES = \
1677         src/delta/delta.c
1678
1679 systemd_delta_LDADD = \
1680         libsystemd-shared.la
1681
1682 # ------------------------------------------------------------------------------
1683 systemd_getty_generator_SOURCES = \
1684         src/getty-generator/getty-generator.c
1685
1686 systemd_getty_generator_LDADD = \
1687         libsystemd-label.la \
1688         libsystemd-shared.la
1689
1690 # ------------------------------------------------------------------------------
1691 systemd_fstab_generator_SOURCES = \
1692         src/fstab-generator/fstab-generator.c \
1693         src/core/mount-setup.c
1694
1695 systemd_fstab_generator_LDADD = \
1696         libsystemd-label.la \
1697         libsystemd-shared.la
1698
1699 # ------------------------------------------------------------------------------
1700 systemd_system_update_generator_SOURCES = \
1701         src/system-update-generator/system-update-generator.c
1702
1703 systemd_system_update_generator_LDADD = \
1704         libsystemd-label.la \
1705         libsystemd-shared.la
1706
1707 if ENABLE_EFI
1708 # ------------------------------------------------------------------------------
1709 systemgenerator_PROGRAMS +=  \
1710         systemd-efi-boot-generator
1711
1712 systemd_efi_boot_generator_SOURCES = \
1713         src/efi-boot-generator/efi-boot-generator.c
1714
1715 systemd_efi_boot_generator_LDADD = \
1716         libsystemd-label.la \
1717         libsystemd-shared.la
1718
1719 # ------------------------------------------------------------------------------
1720 bootctl_SOURCES = \
1721         src/boot/boot.h \
1722         src/boot/boot-loader.h \
1723         src/boot/bootctl.c \
1724         src/boot/boot-loader.c \
1725         src/boot/boot-efi.c
1726
1727 bootctl_LDADD = \
1728         libsystemd-shared.la \
1729         libsystemd-id128-internal.la \
1730         libsystemd-daemon-internal.la
1731
1732 bin_PROGRAMS += \
1733         bootctl
1734
1735 dist_zshcompletion_DATA += \
1736         shell-completion/zsh/_bootctl
1737
1738 endif
1739
1740 # ------------------------------------------------------------------------------
1741 if HAVE_BLKID
1742 systemgenerator_PROGRAMS +=  \
1743         systemd-gpt-auto-generator
1744
1745 systemd_gpt_auto_generator_SOURCES = \
1746         src/gpt-auto-generator/gpt-auto-generator.c
1747
1748 systemd_gpt_auto_generator_LDADD = \
1749         libsystemd-label.la \
1750         libsystemd-id128-internal.la \
1751         libudev-internal.la \
1752         libsystemd-shared.la \
1753         $(BLKID_LIBS)
1754
1755 systemd_gpt_auto_generator_CFLAGS = \
1756         $(AM_CFLAGS) \
1757         $(BLKID_CFLAGS)
1758 endif
1759
1760 # ------------------------------------------------------------------------------
1761 systemd_rc_local_generator_SOURCES = \
1762         src/rc-local-generator/rc-local-generator.c
1763
1764 systemd_rc_local_generator_LDADD = \
1765         libsystemd-label.la \
1766         libsystemd-shared.la
1767
1768 # ------------------------------------------------------------------------------
1769 systemd_remount_fs_SOURCES = \
1770         src/remount-fs/remount-fs.c \
1771         src/core/mount-setup.c \
1772         src/core/mount-setup.h
1773
1774 systemd_remount_fs_LDADD = \
1775         libsystemd-label.la \
1776         libsystemd-shared.la
1777
1778 # ------------------------------------------------------------------------------
1779 systemd_cgroups_agent_SOURCES = \
1780         src/cgroups-agent/cgroups-agent.c
1781
1782 systemd_cgroups_agent_LDADD = \
1783         libsystemd-bus-internal.la \
1784         libsystemd-id128-internal.la \
1785         libsystemd-daemon-internal.la \
1786         libsystemd-shared.la
1787
1788 # ------------------------------------------------------------------------------
1789 systemctl_SOURCES = \
1790         src/systemctl/systemctl.c
1791
1792 systemctl_LDADD = \
1793         libsystemd-units.la \
1794         libsystemd-label.la \
1795         libsystemd-bus-internal.la \
1796         libsystemd-logs.la \
1797         libsystemd-login-internal.la \
1798         libsystemd-journal-internal.la \
1799         libsystemd-id128-internal.la \
1800         libsystemd-daemon-internal.la \
1801         libsystemd-shared.la
1802
1803 # ------------------------------------------------------------------------------
1804 systemd_notify_SOURCES = \
1805         src/notify/notify.c \
1806         src/readahead/sd-readahead.c
1807
1808 systemd_notify_LDADD = \
1809         libsystemd-daemon-internal.la \
1810         libsystemd-shared.la
1811
1812 # ------------------------------------------------------------------------------
1813 systemd_ask_password_SOURCES = \
1814         src/ask-password/ask-password.c
1815
1816 systemd_ask_password_LDADD = \
1817         libsystemd-label.la \
1818         libsystemd-shared.la
1819
1820 # ------------------------------------------------------------------------------
1821 systemd_reply_password_SOURCES = \
1822         src/reply-password/reply-password.c
1823
1824 systemd_reply_password_LDADD = \
1825         libsystemd-shared.la
1826
1827 # ------------------------------------------------------------------------------
1828 systemd_cgls_SOURCES = \
1829         src/cgls/cgls.c
1830
1831 systemd_cgls_LDADD = \
1832         libsystemd-shared.la
1833
1834 # ------------------------------------------------------------------------------
1835 systemd_cgtop_SOURCES = \
1836         src/cgtop/cgtop.c
1837
1838 systemd_cgtop_LDADD = \
1839         libsystemd-shared.la
1840
1841 # ------------------------------------------------------------------------------
1842 systemd_nspawn_SOURCES = \
1843         src/nspawn/nspawn.c \
1844         src/core/mount-setup.c \
1845         src/core/mount-setup.h \
1846         src/core/loopback-setup.c \
1847         src/core/loopback-setup.h
1848
1849 systemd_nspawn_LDADD = \
1850         libsystemd-label.la \
1851         libsystemd-capability.la \
1852         libsystemd-bus-internal.la \
1853         libsystemd-id128-internal.la \
1854         libsystemd-daemon-internal.la \
1855         libsystemd-shared.la \
1856         libsystemd-rtnl.la
1857
1858 # ------------------------------------------------------------------------------
1859 systemd_run_SOURCES = \
1860         src/run/run.c
1861
1862 systemd_run_LDADD = \
1863         libsystemd-label.la \
1864         libsystemd-capability.la \
1865         libsystemd-bus-internal.la \
1866         libsystemd-daemon-internal.la \
1867         libsystemd-id128-internal.la \
1868         libsystemd-shared.la
1869
1870 # ------------------------------------------------------------------------------
1871 systemd_stdio_bridge_SOURCES = \
1872         src/stdio-bridge/stdio-bridge.c
1873
1874 systemd_stdio_bridge_LDADD = \
1875         libsystemd-bus-internal.la \
1876         libsystemd-daemon-internal.la \
1877         libsystemd-id128-internal.la \
1878         libsystemd-shared.la
1879
1880 # ------------------------------------------------------------------------------
1881 systemd_tty_ask_password_agent_SOURCES = \
1882         src/tty-ask-password-agent/tty-ask-password-agent.c
1883
1884 systemd_tty_ask_password_agent_LDADD = \
1885         libsystemd-label.la \
1886         libsystemd-shared.la
1887
1888 # ------------------------------------------------------------------------------
1889 libsystemd_daemon_la_SOURCES = \
1890         src/libsystemd-daemon/libsystemd-daemon.sym \
1891         src/libsystemd-daemon/sd-daemon.c
1892
1893 libsystemd_daemon_internal_la_SOURCES = \
1894         $(libsystemd_daemon_la_SOURCES)
1895
1896 libsystemd_daemon_internal_la_CPPFLAGS = \
1897         $(AM_CPPFLAGS) \
1898         -DSD_DAEMON_DISABLE_MQ
1899
1900 libsystemd_daemon_la_CFLAGS = \
1901         $(AM_CFLAGS) \
1902         -fvisibility=hidden \
1903         -DSD_EXPORT_SYMBOLS
1904
1905 libsystemd_daemon_la_LDFLAGS = \
1906         $(AM_LDFLAGS) \
1907         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1908         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1909
1910 libsystemd_daemon_la_LIBADD =  \
1911         $(RT_LIBS)
1912
1913 pkginclude_HEADERS += \
1914         src/systemd/sd-daemon.h
1915
1916 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1917 libsystemd-daemon-install-hook:
1918         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
1919
1920 libsystemd-daemon-uninstall-hook:
1921         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1922
1923 INSTALL_EXEC_HOOKS += libsystemd-daemon-install-hook
1924 UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
1925
1926 lib_LTLIBRARIES += \
1927         libsystemd-daemon.la
1928
1929 noinst_LTLIBRARIES += \
1930         libsystemd-daemon-internal.la
1931
1932 pkgconfiglib_DATA += \
1933         src/libsystemd-daemon/libsystemd-daemon.pc
1934
1935 EXTRA_DIST += \
1936         src/libsystemd-daemon/libsystemd-daemon.pc.in
1937
1938 # ------------------------------------------------------------------------------
1939 libsystemd_bus_la_SOURCES = \
1940         src/libsystemd-bus/libsystemd-bus.sym \
1941         src/systemd/sd-bus.h \
1942         src/systemd/sd-bus-protocol.h \
1943         src/systemd/sd-bus-vtable.h \
1944         src/systemd/sd-memfd.h \
1945         src/systemd/sd-utf8.h \
1946         src/systemd/sd-event.h \
1947         src/libsystemd-bus/sd-bus.c \
1948         src/libsystemd-bus/bus-control.c \
1949         src/libsystemd-bus/bus-control.h \
1950         src/libsystemd-bus/bus-error.c \
1951         src/libsystemd-bus/bus-error.h \
1952         src/libsystemd-bus/bus-internal.c \
1953         src/libsystemd-bus/bus-internal.h \
1954         src/libsystemd-bus/bus-socket.c \
1955         src/libsystemd-bus/bus-socket.h \
1956         src/libsystemd-bus/bus-kernel.c \
1957         src/libsystemd-bus/bus-kernel.h \
1958         src/libsystemd-bus/bus-container.c \
1959         src/libsystemd-bus/bus-container.h \
1960         src/libsystemd-bus/bus-message.c \
1961         src/libsystemd-bus/bus-message.h \
1962         src/libsystemd-bus/bus-signature.c \
1963         src/libsystemd-bus/bus-signature.h \
1964         src/libsystemd-bus/bus-type.c \
1965         src/libsystemd-bus/bus-type.h \
1966         src/libsystemd-bus/bus-match.c \
1967         src/libsystemd-bus/bus-match.h \
1968         src/libsystemd-bus/bus-bloom.c \
1969         src/libsystemd-bus/bus-bloom.h \
1970         src/libsystemd-bus/bus-introspect.c \
1971         src/libsystemd-bus/bus-introspect.h \
1972         src/libsystemd-bus/bus-objects.c \
1973         src/libsystemd-bus/bus-objects.h \
1974         src/libsystemd-bus/bus-convenience.c \
1975         src/libsystemd-bus/kdbus.h \
1976         src/libsystemd-bus/sd-memfd.c \
1977         src/libsystemd-bus/bus-util.c \
1978         src/libsystemd-bus/bus-util.h \
1979         src/libsystemd-bus/sd-utf8.c \
1980         src/libsystemd-bus/sd-event.c \
1981         src/libsystemd-bus/event-util.h
1982
1983 libsystemd_bus_la_LIBADD = \
1984         libsystemd-id128-internal.la \
1985         libsystemd-daemon-internal.la \
1986         libsystemd-shared.la
1987
1988 libsystemd_bus_la_CFLAGS = \
1989         $(AM_CFLAGS) \
1990         -pthread
1991
1992 libsystemd_bus_la_LDFLAGS = \
1993         $(AM_LDFLAGS) \
1994         -version-info $(LIBSYSTEMD_BUS_CURRENT):$(LIBSYSTEMD_BUS_REVISION):$(LIBSYSTEMD_BUS_AGE) \
1995         -Wl,--version-script=$(top_srcdir)/src/libsystemd-bus/libsystemd-bus.sym
1996
1997 pkgconfiglib_DATA += \
1998         src/libsystemd-bus/libsystemd-bus.pc
1999
2000 EXTRA_DIST += \
2001         src/libsystemd-bus/libsystemd-bus.pc.in
2002
2003 lib_LTLIBRARIES += \
2004         libsystemd-bus.la
2005
2006 libsystemd_bus_internal_la_SOURCES = \
2007         $(libsystemd_bus_la_SOURCES)
2008
2009 libsystemd_bus_internal_la_CFLAGS = \
2010         $(libsystemd_bus_la_CFLAGS)
2011
2012 noinst_LTLIBRARIES += \
2013         libsystemd-bus-internal.la
2014
2015 libsystemd_bus_dump_la_SOURCES = \
2016         src/libsystemd-bus/bus-dump.c \
2017         src/libsystemd-bus/bus-dump.h
2018
2019 libsystemd_bus_dump_la_CFLAGS = \
2020         $(AM_CFLAGS)
2021         $(CAP_CFLAGS)
2022
2023 noinst_LTLIBRARIES += \
2024         libsystemd-bus-dump.la
2025
2026 tests += \
2027         test-bus-marshal \
2028         test-bus-signature \
2029         test-bus-chat \
2030         test-bus-server \
2031         test-bus-match \
2032         test-bus-kernel \
2033         test-bus-kernel-bloom \
2034         test-bus-kernel-benchmark \
2035         test-bus-memfd \
2036         test-bus-zero-copy \
2037         test-bus-introspect \
2038         test-bus-objects \
2039         test-event
2040
2041 bin_PROGRAMS += \
2042         busctl
2043
2044 test_bus_marshal_SOURCES = \
2045         src/libsystemd-bus/test-bus-marshal.c
2046
2047 test_bus_marshal_LDADD = \
2048         libsystemd-bus-internal.la \
2049         libsystemd-id128-internal.la \
2050         libsystemd-daemon-internal.la \
2051         libsystemd-shared.la \
2052         libsystemd-bus-dump.la \
2053         libsystemd-capability.la \
2054         $(GLIB_LIBS) \
2055         $(DBUS_LIBS) \
2056         $(CAP_LIBS)
2057
2058 test_bus_marshal_CFLAGS = \
2059         $(AM_CFLAGS) \
2060         $(GLIB_CFLAGS) \
2061         $(DBUS_CFLAGS) \
2062         $(CAP_CFLAGS)
2063
2064 test_bus_signature_SOURCES = \
2065         src/libsystemd-bus/test-bus-signature.c
2066
2067 test_bus_signature_LDADD = \
2068         libsystemd-shared.la \
2069         libsystemd-bus-internal.la
2070
2071 test_bus_chat_SOURCES = \
2072         src/libsystemd-bus/test-bus-chat.c
2073
2074 test_bus_chat_CFLAGS = \
2075         $(AM_CFLAGS) \
2076         -pthread
2077
2078 test_bus_chat_LDADD = \
2079         libsystemd-bus-internal.la \
2080         libsystemd-id128-internal.la \
2081         libsystemd-daemon-internal.la \
2082         libsystemd-shared.la
2083
2084 test_bus_server_SOURCES = \
2085         src/libsystemd-bus/test-bus-server.c
2086
2087 test_bus_server_CFLAGS = \
2088         $(AM_CFLAGS) \
2089         -pthread
2090
2091 test_bus_server_LDADD = \
2092         libsystemd-bus-internal.la \
2093         libsystemd-id128-internal.la \
2094         libsystemd-daemon-internal.la \
2095         libsystemd-shared.la
2096
2097 test_bus_objects_SOURCES = \
2098         src/libsystemd-bus/test-bus-objects.c
2099
2100 test_bus_objects_CFLAGS = \
2101         $(AM_CFLAGS) \
2102         $(CAP_CFLAGS) \
2103         -pthread
2104
2105 test_bus_objects_LDADD = \
2106         libsystemd-bus-internal.la \
2107         libsystemd-id128-internal.la \
2108         libsystemd-daemon-internal.la \
2109         libsystemd-shared.la \
2110         libsystemd-bus-dump.la \
2111         libsystemd-capability.la \
2112         $(CAP_LIBS)
2113
2114 test_bus_match_SOURCES = \
2115         src/libsystemd-bus/test-bus-match.c
2116
2117 test_bus_match_LDADD = \
2118         libsystemd-bus-internal.la \
2119         libsystemd-id128-internal.la \
2120         libsystemd-daemon-internal.la \
2121         libsystemd-shared.la
2122
2123 test_bus_kernel_SOURCES = \
2124         src/libsystemd-bus/test-bus-kernel.c
2125
2126 test_bus_kernel_LDADD = \
2127         libsystemd-bus-internal.la \
2128         libsystemd-id128-internal.la \
2129         libsystemd-daemon-internal.la \
2130         libsystemd-shared.la \
2131         libsystemd-bus-dump.la \
2132         libsystemd-capability.la \
2133         $(CAP_LIBS)
2134
2135 test_bus_kernel_CFLAGS = \
2136         $(AM_CFLAGS) \
2137         $(CAP_CFLAGS)
2138
2139 test_bus_kernel_bloom_SOURCES = \
2140         src/libsystemd-bus/test-bus-kernel-bloom.c
2141
2142 test_bus_kernel_bloom_LDADD = \
2143         libsystemd-bus-internal.la \
2144         libsystemd-id128-internal.la \
2145         libsystemd-daemon-internal.la \
2146         libsystemd-shared.la
2147
2148 test_bus_kernel_benchmark_SOURCES = \
2149         src/libsystemd-bus/test-bus-kernel-benchmark.c
2150
2151 test_bus_kernel_benchmark_LDADD = \
2152         libsystemd-bus-internal.la \
2153         libsystemd-id128-internal.la \
2154         libsystemd-daemon-internal.la \
2155         libsystemd-shared.la
2156
2157 test_bus_memfd_SOURCES = \
2158         src/libsystemd-bus/test-bus-memfd.c
2159
2160 test_bus_memfd_LDADD = \
2161         libsystemd-bus-internal.la \
2162         libsystemd-shared.la
2163
2164 test_bus_zero_copy_SOURCES = \
2165         src/libsystemd-bus/test-bus-zero-copy.c
2166
2167 test_bus_zero_copy_LDADD = \
2168         libsystemd-bus-internal.la \
2169         libsystemd-id128-internal.la \
2170         libsystemd-daemon-internal.la \
2171         libsystemd-shared.la \
2172         libsystemd-bus-dump.la \
2173         libsystemd-capability.la \
2174         $(CAP_LIBS)
2175
2176 test_bus_zero_copy_CFLAGS = \
2177         $(AM_CFLAGS) \
2178         $(CAP_CFLAGS)
2179
2180 test_bus_introspect_SOURCES = \
2181         src/libsystemd-bus/test-bus-introspect.c
2182
2183 test_bus_introspect_LDADD = \
2184         libsystemd-shared.la \
2185         libsystemd-bus-internal.la
2186
2187 test_event_SOURCES = \
2188         src/libsystemd-bus/test-event.c
2189
2190 test_event_LDADD = \
2191         libsystemd-bus-internal.la \
2192         libsystemd-id128-internal.la \
2193         libsystemd-daemon-internal.la \
2194         libsystemd-shared.la
2195
2196 busctl_SOURCES = \
2197         src/libsystemd-bus/busctl.c
2198
2199 busctl_LDADD = \
2200         libsystemd-bus-internal.la \
2201         libsystemd-id128-internal.la \
2202         libsystemd-daemon-internal.la \
2203         libsystemd-shared.la \
2204         libsystemd-bus-dump.la \
2205         libsystemd-capability.la \
2206         $(CAP_LIBS)
2207
2208 busctl_CFLAGS = \
2209         $(AM_CFLAGS) \
2210         $(CAP_CFLAGS)
2211
2212 # ------------------------------------------------------------------------------
2213 if ENABLE_GTK_DOC
2214 SUBDIRS += \
2215         docs/libudev
2216
2217 noinst_DATA += \
2218         docs/html/libudev \
2219         docs/html/gudev
2220 endif
2221
2222 include_HEADERS += \
2223         src/libudev/libudev.h
2224
2225 lib_LTLIBRARIES += \
2226         libudev.la
2227
2228 libudev_la_SOURCES =\
2229         src/libudev/libudev.sym \
2230         src/libudev/libudev-private.h \
2231         src/libudev/libudev.c \
2232         src/libudev/libudev-list.c \
2233         src/libudev/libudev-util.c \
2234         src/libudev/libudev-device.c \
2235         src/libudev/libudev-enumerate.c \
2236         src/libudev/libudev-monitor.c \
2237         src/libudev/libudev-queue.c \
2238         src/libudev/libudev-hwdb-def.h \
2239         src/libudev/libudev-hwdb.c
2240
2241 libudev_la_CFLAGS = \
2242         $(AM_CFLAGS) \
2243         -fvisibility=hidden
2244
2245 libudev_la_LDFLAGS = \
2246         $(AM_LDFLAGS) \
2247         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2248         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2249
2250 libudev_la_LIBADD = \
2251         libsystemd-daemon-internal.la \
2252         libsystemd-id128-internal.la \
2253         libsystemd-shared.la
2254
2255 pkgconfiglib_DATA += \
2256         src/libudev/libudev.pc
2257
2258 EXTRA_DIST += \
2259         src/libudev/libudev.pc.in
2260
2261 CLEANFILES += \
2262         src/libudev/libudev.pc \
2263         docs/html/libudev \
2264         docs/html/gudev
2265
2266 docs/html/libudev:
2267         $(AM_V_at)$(MKDIR_P) $(dir $@)
2268         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2269
2270 docs/html/gudev:
2271         $(AM_V_at)$(MKDIR_P) $(dir $@)
2272         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2273
2274 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2275 libudev-install-hook:
2276         libname=libudev.so && $(move-to-rootlibdir)
2277
2278 libudev-uninstall-hook:
2279         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2280
2281 INSTALL_EXEC_HOOKS += libudev-install-hook
2282 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2283
2284 # ------------------------------------------------------------------------------
2285 noinst_LTLIBRARIES += \
2286         libudev-internal.la
2287
2288 libudev_internal_la_SOURCES =\
2289         $(libudev_la_SOURCES) \
2290         src/libudev/libudev-device-private.c \
2291         src/libudev/libudev-queue-private.c
2292
2293 libudev_internal_la_CFLAGS = \
2294         $(AM_CFLAGS) \
2295         -fvisibility=default
2296
2297 # ------------------------------------------------------------------------------
2298 INSTALL_DIRS += \
2299         $(sysconfdir)/udev/rules.d \
2300         $(sysconfdir)/udev/hwdb.d
2301
2302 dist_network_DATA = \
2303         network/99-default.link
2304
2305 dist_udevrules_DATA += \
2306         rules/99-systemd.rules \
2307         rules/42-usb-hid-pm.rules \
2308         rules/50-udev-default.rules \
2309         rules/60-drm.rules \
2310         rules/60-keyboard.rules \
2311         rules/60-persistent-storage-tape.rules \
2312         rules/60-persistent-serial.rules \
2313         rules/60-persistent-input.rules \
2314         rules/60-persistent-alsa.rules \
2315         rules/60-persistent-storage.rules \
2316         rules/64-btrfs.rules \
2317         rules/75-net-description.rules \
2318         rules/75-tty-description.rules \
2319         rules/78-sound-card.rules \
2320         rules/80-net-setup-link.rules \
2321         rules/95-udev-late.rules
2322
2323 dist_udevhwdb_DATA = \
2324         hwdb/20-pci-vendor-model.hwdb \
2325         hwdb/20-pci-classes.hwdb \
2326         hwdb/20-usb-vendor-model.hwdb \
2327         hwdb/20-usb-classes.hwdb \
2328         hwdb/20-bluetooth-vendor-product.hwdb \
2329         hwdb/20-acpi-vendor.hwdb \
2330         hwdb/20-OUI.hwdb \
2331         hwdb/60-keyboard.hwdb
2332
2333 udevconfdir = $(sysconfdir)/udev
2334 dist_udevconf_DATA = \
2335         src/udev/udev.conf
2336
2337 sharepkgconfigdir = $(datadir)/pkgconfig
2338 sharepkgconfig_DATA = \
2339         src/udev/udev.pc
2340
2341 EXTRA_DIST += \
2342         rules/99-systemd.rules.in \
2343         src/udev/udev.pc.in
2344
2345 CLEANFILES += \
2346         rules/99-systemd.rules \
2347         src/udev/udev.pc
2348
2349 EXTRA_DIST += \
2350         units/systemd-udevd.service.in \
2351         units/systemd-udev-trigger.service.in \
2352         units/systemd-udev-settle.service.in
2353
2354 CLEANFILES += \
2355         units/systemd-udevd.service \
2356         units/systemd-udev-trigger.service \
2357         units/systemd-udev-settle.service
2358
2359 SOCKETS_TARGET_WANTS += \
2360         systemd-udevd-control.socket \
2361         systemd-udevd-kernel.socket
2362 SYSINIT_TARGET_WANTS += \
2363         systemd-udevd.service \
2364         systemd-udev-trigger.service
2365
2366 rootbin_PROGRAMS += \
2367         udevadm
2368
2369 rootlibexec_PROGRAMS += \
2370         systemd-udevd
2371
2372 noinst_LTLIBRARIES += \
2373         libudev-core.la
2374
2375 src/udev/keyboard-keys.txt: Makefile
2376         $(AM_V_at)$(MKDIR_P) $(dir $@)
2377         $(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/' > $@
2378
2379 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt Makefile
2380         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2381
2382 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf Makefile
2383         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2384
2385 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt Makefile
2386         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2387
2388 libudev_core_la_SOURCES = \
2389         src/udev/udev.h \
2390         src/udev/udev-event.c \
2391         src/udev/udev-watch.c \
2392         src/udev/udev-node.c \
2393         src/udev/udev-rules.c \
2394         src/udev/udev-ctrl.c \
2395         src/udev/udev-builtin.c \
2396         src/udev/udev-builtin-btrfs.c \
2397         src/udev/udev-builtin-hwdb.c \
2398         src/udev/udev-builtin-input_id.c \
2399         src/udev/udev-builtin-keyboard.c \
2400         src/udev/udev-builtin-net_id.c \
2401         src/udev/udev-builtin-net_setup_link.c \
2402         src/udev/udev-builtin-path_id.c \
2403         src/udev/udev-builtin-usb_id.c \
2404         src/udev/net/link-config.h \
2405         src/udev/net/link-config.c \
2406         src/udev/net/ethtool-util.h \
2407         src/udev/net/ethtool-util.c
2408
2409 nodist_libudev_core_la_SOURCES = \
2410         src/udev/keyboard-keys-from-name.h \
2411         src/udev/keyboard-keys-to-name.h \
2412         src/udev/net/link-config-gperf.c
2413
2414 BUILT_SOURCES += \
2415         $(nodist_libudev_core_la_SOURCES)
2416
2417 CLEANFILES += \
2418         src/udev/keyboard-keys-from-name.gperf \
2419         src/udev/keyboard-keys.txt \
2420         src/udev/net/link-config-gperf.c
2421
2422 EXTRA_DIST += \
2423         src/udev/net/link-config-gperf.gperf
2424
2425 libudev_core_la_CFLAGS = \
2426         $(AM_CFLAGS) \
2427         $(BLKID_CFLAGS) \
2428         $(KMOD_CFLAGS)
2429
2430 libudev_core_la_LIBADD = \
2431         libudev-internal.la \
2432         libsystemd-label.la \
2433         libsystemd-daemon-internal.la \
2434         libsystemd-rtnl.la \
2435         libsystemd-id128-internal.la \
2436         libsystemd-shared.la \
2437         $(BLKID_LIBS) \
2438         $(KMOD_LIBS)
2439
2440 libudev_core_la_CPPFLAGS = \
2441         $(AM_CPPFLAGS) \
2442         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2443
2444 if ENABLE_FIRMWARE
2445 libudev_core_la_SOURCES += \
2446         src/udev/udev-builtin-firmware.c
2447
2448 dist_udevrules_DATA += \
2449         rules/50-firmware.rules
2450 endif
2451
2452 if HAVE_KMOD
2453 libudev_core_la_SOURCES += \
2454         src/udev/udev-builtin-kmod.c
2455
2456 dist_udevrules_DATA += \
2457         rules/80-drivers.rules
2458 endif
2459
2460 if HAVE_BLKID
2461 libudev_core_la_SOURCES += \
2462         src/udev/udev-builtin-blkid.c
2463 endif
2464
2465 if HAVE_ACL
2466 libudev_core_la_SOURCES += \
2467         src/udev/udev-builtin-uaccess.c \
2468         src/login/logind-acl.c \
2469         src/login/sd-login.c \
2470         src/systemd/sd-login.h \
2471         src/login/login-shared.c \
2472         src/login/login-shared.h
2473
2474 libudev_core_la_LIBADD += \
2475         libsystemd-acl.la
2476 endif
2477
2478 systemd_udevd_SOURCES = \
2479         src/udev/udevd.c
2480
2481 systemd_udevd_LDADD = \
2482         libudev-core.la
2483
2484 udevadm_SOURCES = \
2485         src/udev/udevadm.c \
2486         src/udev/udevadm-info.c \
2487         src/udev/udevadm-control.c \
2488         src/udev/udevadm-monitor.c \
2489         src/udev/udevadm-hwdb.c \
2490         src/udev/udevadm-settle.c \
2491         src/udev/udevadm-trigger.c \
2492         src/udev/udevadm-test.c \
2493         src/udev/udevadm-test-builtin.c
2494
2495 udevadm_LDADD = \
2496         libudev-core.la
2497
2498 # Update hwdb on installation. Do not bother if installing
2499 # in DESTDIR, since this is likely for packaging purposes.
2500 hwdb-update-hook:
2501         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2502
2503 INSTALL_DATA_HOOKS += \
2504         hwdb-update-hook
2505
2506 hwdb-remove-hook:
2507         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2508
2509 # ------------------------------------------------------------------------------
2510 TESTS += \
2511         test/udev-test.pl \
2512         test/rules-test.sh
2513
2514 manual_tests += \
2515         test-libudev \
2516         test-udev
2517
2518 test_libudev_SOURCES = \
2519         src/test/test-libudev.c
2520
2521 test_libudev_LDADD = \
2522         libsystemd-label.la \
2523         libudev-internal.la \
2524         libsystemd-shared.la
2525
2526 test_udev_SOURCES = \
2527         src/test/test-udev.c
2528
2529 test_udev_LDADD = \
2530         libudev-core.la \
2531         $(BLKID_LIBS) \
2532         $(KMOD_LIBS) \
2533         $(SELINUX_LIBS)
2534
2535 if HAVE_ACL
2536 test_udev_LDADD += \
2537         libsystemd-acl.la
2538 endif
2539
2540 check_DATA += \
2541         test/sys
2542
2543 # packed sysfs test tree
2544 test/sys:
2545         $(AM_V_at)$(MKDIR_P) $(dir $@)
2546         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2547
2548 test-sys-distclean:
2549         -rm -rf test/sys
2550 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2551
2552 EXTRA_DIST += \
2553         test/sys.tar.xz \
2554         test/udev-test.pl \
2555         test/rules-test.sh \
2556         test/rule-syntax-check.py
2557
2558 # ------------------------------------------------------------------------------
2559 ata_id_SOURCES = \
2560         src/udev/ata_id/ata_id.c
2561
2562 ata_id_LDADD = \
2563         libudev-internal.la \
2564         libsystemd-shared.la
2565
2566 udevlibexec_PROGRAMS += \
2567         ata_id
2568
2569 # ------------------------------------------------------------------------------
2570 cdrom_id_SOURCES = \
2571         src/udev/cdrom_id/cdrom_id.c
2572
2573 cdrom_id_LDADD = \
2574         libudev-internal.la \
2575         libsystemd-shared.la
2576
2577 udevlibexec_PROGRAMS += \
2578         cdrom_id
2579
2580 dist_udevrules_DATA += \
2581         rules/60-cdrom_id.rules
2582
2583 # ------------------------------------------------------------------------------
2584 collect_SOURCES = \
2585         src/udev/collect/collect.c
2586
2587 collect_LDADD = \
2588         libudev-internal.la \
2589         libsystemd-shared.la
2590
2591 udevlibexec_PROGRAMS += \
2592         collect
2593
2594 # ------------------------------------------------------------------------------
2595 scsi_id_SOURCES =\
2596         src/udev/scsi_id/scsi_id.c \
2597         src/udev/scsi_id/scsi_serial.c \
2598         src/udev/scsi_id/scsi.h \
2599         src/udev/scsi_id/scsi_id.h
2600
2601 scsi_id_LDADD = \
2602         libudev-internal.la \
2603         libsystemd-shared.la
2604
2605 udevlibexec_PROGRAMS += \
2606         scsi_id
2607
2608 EXTRA_DIST += \
2609         src/udev/scsi_id/README
2610
2611 # ------------------------------------------------------------------------------
2612 v4l_id_SOURCES = \
2613         src/udev/v4l_id/v4l_id.c
2614
2615 v4l_id_LDADD = \
2616         libudev-internal.la
2617
2618 udevlibexec_PROGRAMS += \
2619         v4l_id
2620
2621 dist_udevrules_DATA += \
2622         rules/60-persistent-v4l.rules
2623
2624 # ------------------------------------------------------------------------------
2625 accelerometer_SOURCES = \
2626         src/udev/accelerometer/accelerometer.c
2627
2628 accelerometer_LDADD = \
2629         libudev-internal.la -lm \
2630         libsystemd-shared.la
2631
2632 udevlibexec_PROGRAMS += \
2633         accelerometer
2634
2635 dist_udevrules_DATA += \
2636         rules/61-accelerometer.rules
2637
2638 # ------------------------------------------------------------------------------
2639 if ENABLE_GUDEV
2640 if ENABLE_GTK_DOC
2641 SUBDIRS += \
2642         docs/gudev
2643 endif
2644
2645 libgudev_includedir = \
2646         $(includedir)/gudev-1.0/gudev
2647
2648 libgudev_include_HEADERS = \
2649         src/gudev/gudev.h \
2650         src/gudev/gudevenums.h \
2651         src/gudev/gudevenumtypes.h \
2652         src/gudev/gudevtypes.h \
2653         src/gudev/gudevclient.h \
2654         src/gudev/gudevdevice.h \
2655         src/gudev/gudevenumerator.h
2656
2657 lib_LTLIBRARIES += libgudev-1.0.la
2658
2659 pkgconfiglib_DATA += \
2660         src/gudev/gudev-1.0.pc
2661
2662 CLEANFILES += \
2663         src/gudev/gudev-1.0.pc
2664
2665 libgudev_1_0_la_SOURCES = \
2666         src/gudev/gudevenums.h \
2667         src/gudev/gudevenumtypes.h \
2668         src/gudev/gudevenumtypes.h\
2669         src/gudev/gudevtypes.h \
2670         src/gudev/gudevclient.h \
2671         src/gudev/gudevclient.c \
2672         src/gudev/gudevdevice.h \
2673         src/gudev/gudevdevice.c \
2674         src/gudev/gudevenumerator.h \
2675         src/gudev/gudevenumerator.c \
2676         src/gudev/gudevprivate.h
2677
2678 nodist_libgudev_1_0_la_SOURCES = \
2679         src/gudev/gudevmarshal.h \
2680         src/gudev/gudevmarshal.c \
2681         src/gudev/gudevenumtypes.h \
2682         src/gudev/gudevenumtypes.c
2683
2684 BUILT_SOURCES += \
2685         $(nodist_libgudev_1_0_la_SOURCES)
2686
2687 libgudev_1_0_la_CPPFLAGS = \
2688         $(AM_CPPFLAGS) \
2689         -I$(top_builddir)/src\
2690         -I$(top_srcdir)/src\
2691         -I$(top_builddir)/src/gudev \
2692         -I$(top_srcdir)/src/gudev \
2693         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2694         -D_GUDEV_COMPILATION \
2695         -DG_LOG_DOMAIN=\"GUdev\"
2696
2697 libgudev_1_0_la_CFLAGS = \
2698         $(AM_CFLAGS) \
2699         -fvisibility=default \
2700         $(GLIB_CFLAGS)
2701
2702 libgudev_1_0_la_LIBADD = \
2703         libudev.la \
2704         $(GLIB_LIBS)
2705
2706 libgudev_1_0_la_LDFLAGS = \
2707         $(AM_LDFLAGS) \
2708         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2709         -export-dynamic -no-undefined \
2710         -export-symbols-regex '^g_udev_.*'
2711
2712 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2713         $(AM_V_at)$(MKDIR_P) $(dir $@)
2714         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2715
2716 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2717         $(AM_V_at)$(MKDIR_P) $(dir $@)
2718         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2719         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2720
2721 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2722         $(AM_V_at)$(MKDIR_P) $(dir $@)
2723         $(AM_V_GEN)glib-mkenums --template $^ > $@
2724
2725 if HAVE_INTROSPECTION
2726 -include $(INTROSPECTION_MAKEFILE)
2727
2728 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2729
2730 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2731
2732 src_gudev_GUdev_1_0_gir_CFLAGS = \
2733         $(AM_CFLAGS) \
2734         $(INCLUDES) \
2735         -D_GUDEV_COMPILATION \
2736         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2737         -I$(top_srcdir)/src \
2738         -I$(top_builddir)/src \
2739         -I$(top_srcdir)/src/gudev \
2740         -I$(top_builddir)/src/gudev
2741
2742 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2743
2744 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2745         --pkg-export=gudev-1.0 \
2746         --warn-all
2747
2748 src_gudev_GUdev_1_0_gir_FILES = \
2749         src/gudev/gudev.h \
2750         src/gudev/gudevtypes.h \
2751         src/gudev/gudevenums.h \
2752         src/gudev/gudevenumtypes.h \
2753         src/gudev/gudevclient.h \
2754         src/gudev/gudevdevice.h \
2755         src/gudev/gudevenumerator.h \
2756         src/gudev/gudevclient.c \
2757         src/gudev/gudevdevice.c \
2758         src/gudev/gudevenumerator.c
2759
2760 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2761 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2762
2763 girdir = $(datadir)/gir-1.0
2764 gir_DATA = \
2765         src/gudev/GUdev-1.0.gir
2766
2767 typelibsdir = $(libdir)/girepository-1.0
2768 typelibs_DATA = \
2769         src/gudev/GUdev-1.0.typelib
2770
2771 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2772 endif # HAVE_INTROSPECTION
2773
2774 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2775 libgudev-install-hook:
2776         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2777
2778 libgudev-uninstall-hook:
2779         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2780
2781 INSTALL_EXEC_HOOKS += libgudev-install-hook
2782 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2783 endif
2784
2785 EXTRA_DIST += \
2786         src/gudev/gudev-1.0.pc.in \
2787         src/gudev/gudevmarshal.list \
2788         src/gudev/gudevenumtypes.h.template \
2789         src/gudev/gudevenumtypes.c.template \
2790         src/gudev/gjs-example.js \
2791         src/gudev/seed-example-enum.js \
2792         src/gudev/seed-example.js
2793
2794 # ------------------------------------------------------------------------------
2795 mtd_probe_SOURCES =  \
2796         src/udev/mtd_probe/mtd_probe.c \
2797         src/udev/mtd_probe/mtd_probe.h \
2798         src/udev/mtd_probe/probe_smartmedia.c
2799
2800 mtd_probe_CPPFLAGS = \
2801         $(AM_CPPFLAGS)
2802
2803 dist_udevrules_DATA += \
2804         rules/75-probe_mtd.rules
2805
2806 udevlibexec_PROGRAMS += \
2807         mtd_probe
2808
2809 # ------------------------------------------------------------------------------
2810 libsystemd_id128_la_SOURCES = \
2811         src/libsystemd-id128/libsystemd-id128.sym \
2812         src/libsystemd-id128/sd-id128.c
2813
2814 libsystemd_id128_la_CFLAGS = \
2815         $(AM_CFLAGS) \
2816         -fvisibility=hidden
2817
2818 libsystemd_id128_la_LDFLAGS = \
2819         $(AM_LDFLAGS) \
2820         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2821         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2822
2823 libsystemd_id128_la_LIBADD = \
2824         libsystemd-daemon-internal.la \
2825         libsystemd-shared.la
2826
2827 libsystemd_id128_internal_la_SOURCES = \
2828         $(libsystemd_id128_la_SOURCES)
2829
2830 test_id128_SOURCES = \
2831         src/test/test-id128.c
2832
2833 test_id128_LDADD = \
2834         libsystemd-id128-internal.la \
2835         libsystemd-daemon-internal.la \
2836         libsystemd-shared.la
2837
2838 tests += \
2839         test-id128
2840
2841 pkginclude_HEADERS += \
2842         src/systemd/sd-id128.h
2843
2844 lib_LTLIBRARIES += \
2845         libsystemd-id128.la
2846
2847 noinst_LTLIBRARIES += \
2848         libsystemd-id128-internal.la
2849
2850 pkgconfiglib_DATA += \
2851         src/libsystemd-id128/libsystemd-id128.pc
2852
2853 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2854 libsystemd-id128-install-hook:
2855         libname=libsystemd-id128.so && $(move-to-rootlibdir)
2856
2857 libsystemd-id128-uninstall-hook:
2858         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2859
2860 INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
2861 UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
2862
2863 EXTRA_DIST += \
2864         src/libsystemd-id128/libsystemd-id128.pc.in
2865
2866 # ------------------------------------------------------------------------------
2867
2868 rootlibexec_PROGRAMS += \
2869         systemd-activate
2870
2871 systemd_activate_SOURCES = \
2872         src/activate/activate.c
2873
2874 systemd_activate_LDADD = \
2875         libsystemd-label.la \
2876         libsystemd-daemon-internal.la \
2877         libsystemd-shared.la
2878
2879 # ------------------------------------------------------------------------------
2880 systemd_journald_SOURCES = \
2881         src/journal/journald.c \
2882         src/journal/journald-server.h
2883
2884 systemd_journald_LDADD = \
2885         libsystemd-journal-core.la
2886
2887 systemd_cat_SOURCES = \
2888         src/journal/cat.c
2889
2890 systemd_cat_LDADD = \
2891         libsystemd-journal-core.la
2892
2893 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
2894 journalctl_CFLAGS = \
2895         $(AM_CFLAGS)
2896
2897 journalctl_SOURCES = \
2898         src/journal/journalctl.c
2899
2900 journalctl_LDADD = \
2901         libsystemd-journal-internal.la \
2902         libsystemd-id128-internal.la \
2903         libsystemd-logs.la \
2904         libsystemd-shared.la
2905
2906 if HAVE_ACL
2907 journalctl_LDADD += \
2908         libsystemd-acl.la
2909 endif
2910
2911 if HAVE_QRENCODE
2912 journalctl_SOURCES += \
2913         src/journal/journal-qrcode.c \
2914         src/journal/journal-qrcode.h
2915
2916 journalctl_CFLAGS += \
2917         $(QRENCODE_CFLAGS)
2918
2919 journalctl_LDADD += \
2920         $(QRENCODE_LIBS)
2921 endif
2922
2923 test_journal_SOURCES = \
2924         src/journal/test-journal.c
2925
2926 test_journal_LDADD = \
2927         libsystemd-journal-core.la
2928
2929 test_journal_send_SOURCES = \
2930         src/journal/test-journal-send.c
2931
2932 test_journal_send_LDADD = \
2933         libsystemd-journal-core.la
2934
2935 test_journal_syslog_SOURCES = \
2936         src/journal/test-journal-syslog.c
2937
2938 test_journal_syslog_LDADD = \
2939         libsystemd-journal-core.la
2940
2941 test_journal_match_SOURCES = \
2942         src/journal/test-journal-match.c
2943
2944 test_journal_match_LDADD = \
2945         libsystemd-journal-core.la
2946
2947 test_journal_enum_SOURCES = \
2948         src/journal/test-journal-enum.c
2949
2950 test_journal_enum_LDADD = \
2951         libsystemd-journal-core.la
2952
2953 test_journal_stream_SOURCES = \
2954         src/journal/test-journal-stream.c
2955
2956 test_journal_stream_LDADD = \
2957         libsystemd-journal-core.la
2958
2959 test_journal_init_SOURCES = \
2960         src/journal/test-journal-init.c
2961
2962 test_journal_init_LDADD = \
2963         libsystemd-journal-core.la
2964
2965 test_journal_verify_SOURCES = \
2966         src/journal/test-journal-verify.c
2967
2968 test_journal_verify_LDADD = \
2969         libsystemd-journal-core.la
2970
2971 test_journal_interleaving_SOURCES = \
2972         src/journal/test-journal-interleaving.c
2973
2974 test_journal_interleaving_LDADD = \
2975         libsystemd-journal-core.la
2976
2977 test_mmap_cache_SOURCES = \
2978         src/journal/test-mmap-cache.c
2979
2980 test_mmap_cache_LDADD = \
2981         libsystemd-journal-core.la
2982
2983 test_catalog_SOURCES = \
2984         src/journal/test-catalog.c
2985
2986 test_catalog_CFLAGS = \
2987         $(AM_CFLAGS) \
2988         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
2989
2990 test_catalog_LDADD = \
2991         libsystemd-journal-core.la
2992
2993 libsystemd_journal_la_SOURCES = \
2994         src/journal/libsystemd-journal.sym \
2995         src/journal/sd-journal.c \
2996         src/systemd/sd-journal.h \
2997         src/systemd/_sd-common.h \
2998         src/journal/journal-file.c \
2999         src/journal/journal-file.h \
3000         src/journal/journal-vacuum.c \
3001         src/journal/journal-vacuum.h \
3002         src/journal/journal-verify.c \
3003         src/journal/journal-verify.h \
3004         src/journal/lookup3.c \
3005         src/journal/lookup3.h \
3006         src/journal/journal-send.c \
3007         src/journal/journal-def.h \
3008         src/journal/compress.h \
3009         src/journal/catalog.c \
3010         src/journal/catalog.h \
3011         src/journal/mmap-cache.c \
3012         src/journal/mmap-cache.h
3013
3014 libsystemd_journal_la_CFLAGS = \
3015         $(AM_CFLAGS) \
3016         -fvisibility=hidden
3017
3018 libsystemd_journal_la_LDFLAGS = \
3019         $(AM_LDFLAGS) \
3020         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
3021         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
3022
3023 libsystemd_journal_la_LIBADD = \
3024         libsystemd-label.la \
3025         libsystemd-daemon-internal.la \
3026         libsystemd-id128-internal.la \
3027         libsystemd-shared.la
3028
3029 libsystemd_journal_internal_la_SOURCES = \
3030         $(libsystemd_journal_la_SOURCES)
3031
3032 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3033 libsystemd_journal_internal_la_CFLAGS = \
3034         $(AM_CFLAGS)
3035
3036 libsystemd_journal_internal_la_LIBADD =
3037
3038 if HAVE_XZ
3039 libsystemd_journal_la_SOURCES += \
3040         src/journal/compress.c
3041
3042 libsystemd_journal_la_CFLAGS += \
3043         $(XZ_CFLAGS)
3044
3045 libsystemd_journal_la_LIBADD += \
3046         $(XZ_LIBS)
3047
3048 libsystemd_journal_internal_la_CFLAGS += \
3049         $(XZ_CFLAGS)
3050
3051 libsystemd_journal_internal_la_LIBADD += \
3052         $(XZ_LIBS)
3053 endif
3054
3055 libsystemd_journal_core_la_SOURCES = \
3056         src/journal/journald-kmsg.c \
3057         src/journal/journald-kmsg.h \
3058         src/journal/journald-syslog.c \
3059         src/journal/journald-syslog.h \
3060         src/journal/journald-stream.c \
3061         src/journal/journald-stream.h \
3062         src/journal/journald-server.c \
3063         src/journal/journald-server.h \
3064         src/journal/journald-console.c \
3065         src/journal/journald-console.h \
3066         src/journal/journald-native.c \
3067         src/journal/journald-native.h \
3068         src/journal/journald-rate-limit.c \
3069         src/journal/journald-rate-limit.h \
3070         src/journal/journal-internal.h
3071
3072 nodist_libsystemd_journal_core_la_SOURCES = \
3073         src/journal/journald-gperf.c
3074
3075 libsystemd_journal_core_la_LIBADD = \
3076         libsystemd-journal-internal.la \
3077         libudev-internal.la \
3078         libsystemd-audit.la \
3079         libsystemd-capability.la \
3080         libsystemd-label.la \
3081         libsystemd-daemon-internal.la \
3082         libsystemd-id128-internal.la \
3083         libsystemd-shared.la
3084
3085 if ENABLE_LOGIND
3086 libsystemd_journal_core_la_LIBADD += \
3087         libsystemd-login-internal.la
3088 endif
3089
3090 if HAVE_ACL
3091 libsystemd_journal_core_la_LIBADD += \
3092         libsystemd-acl.la
3093 endif
3094
3095 noinst_LTLIBRARIES += \
3096         libsystemd-journal-core.la
3097
3098 if HAVE_GCRYPT
3099 libsystemd_journal_la_SOURCES += \
3100         src/journal/journal-authenticate.c \
3101         src/journal/journal-authenticate.h \
3102         src/journal/fsprg.c \
3103         src/journal/fsprg.h
3104
3105 libsystemd_journal_la_CFLAGS += \
3106         $(GCRYPT_CFLAGS) \
3107         -Wno-pointer-arith
3108
3109 libsystemd_journal_la_LIBADD += \
3110         $(GCRYPT_LIBS)
3111
3112 libsystemd_journal_internal_la_CFLAGS += \
3113         $(GCRYPT_CFLAGS) \
3114         -Wno-pointer-arith
3115
3116 libsystemd_journal_internal_la_LIBADD += \
3117         $(GCRYPT_LIBS)
3118 endif
3119
3120 # move lib from $(libdir) to $(rootlibdir) and update devel link, if
3121 # needed. Also, grant read access to new journal files to members of
3122 # "adm" and "wheel".
3123 libsystemd-journal-install-hook:
3124         libname=libsystemd-journal.so && $(move-to-rootlibdir)
3125         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3126         -chown 0:0 $(DESTDIR)/var/log/journal
3127         -chmod 755 $(DESTDIR)/var/log/journal
3128         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3129         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3130
3131 libsystemd-journal-uninstall-hook:
3132         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
3133
3134 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
3135 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
3136
3137 # ------------------------------------------------------------------------------
3138
3139 # Update catalog on installation. Do not bother if installing
3140 # in DESTDIR, since this is likely for packaging purposes.
3141 catalog-update-hook:
3142         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3143
3144 INSTALL_DATA_HOOKS += \
3145         catalog-update-hook
3146
3147 catalog-remove-hook:
3148         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3149
3150 UNINSTALL_DATA_HOOKS += \
3151         catalog-remove-hook
3152
3153 manual_tests += \
3154         test-journal-enum
3155
3156 tests += \
3157         test-journal \
3158         test-journal-send \
3159         test-journal-syslog \
3160         test-journal-match \
3161         test-journal-stream \
3162         test-journal-init \
3163         test-journal-verify \
3164         test-journal-interleaving \
3165         test-mmap-cache \
3166         test-catalog
3167
3168 pkginclude_HEADERS += \
3169         src/systemd/sd-journal.h \
3170         src/systemd/sd-messages.h \
3171         src/systemd/_sd-common.h
3172
3173 lib_LTLIBRARIES += \
3174         libsystemd-journal.la
3175
3176 noinst_LTLIBRARIES += \
3177         libsystemd-journal-internal.la
3178
3179 rootlibexec_PROGRAMS += \
3180         systemd-journald
3181
3182 rootbin_PROGRAMS += \
3183         journalctl
3184
3185 bin_PROGRAMS += \
3186         systemd-cat
3187
3188 dist_systemunit_DATA += \
3189         units/systemd-journald.socket
3190
3191 nodist_systemunit_DATA += \
3192         units/systemd-journald.service \
3193         units/systemd-journal-flush.service
3194
3195 dist_pkgsysconf_DATA += \
3196         src/journal/journald.conf
3197
3198 pkgconfiglib_DATA += \
3199         src/journal/libsystemd-journal.pc
3200
3201 dist_catalog_DATA = \
3202         catalog/systemd.catalog
3203
3204 SOCKETS_TARGET_WANTS += \
3205         systemd-journald.socket
3206 SYSINIT_TARGET_WANTS += \
3207         systemd-journald.service \
3208         systemd-journal-flush.service
3209
3210 EXTRA_DIST += \
3211         src/journal/libsystemd-journal.pc.in \
3212         units/systemd-journald.service.in \
3213         units/systemd-journal-flush.service.in \
3214         src/journal/journald-gperf.gperf
3215
3216 CLEANFILES += \
3217         src/journal/journald-gperf.c
3218
3219 # ------------------------------------------------------------------------------
3220 if HAVE_MICROHTTPD
3221 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3222
3223 rootlibexec_PROGRAMS += \
3224         systemd-journal-gatewayd
3225
3226 systemd_journal_gatewayd_SOURCES = \
3227         src/journal/journal-gatewayd.c \
3228         src/journal/microhttpd-util.h \
3229         src/journal/microhttpd-util.c
3230
3231 systemd_journal_gatewayd_LDADD = \
3232         libsystemd-logs.la \
3233         libsystemd-journal-internal.la \
3234         libsystemd-id128-internal.la \
3235         libsystemd-daemon-internal.la \
3236         libsystemd-bus-internal.la \
3237         libsystemd-shared.la \
3238         $(MICROHTTPD_LIBS)
3239
3240 systemd_journal_gatewayd_CFLAGS = \
3241         $(AM_CFLAGS) \
3242         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
3243         $(MICROHTTPD_CFLAGS)
3244
3245 dist_systemunit_DATA += \
3246         units/systemd-journal-gatewayd.socket
3247
3248 nodist_systemunit_DATA += \
3249         units/systemd-journal-gatewayd.service
3250
3251 dist_gatewayddocumentroot_DATA = \
3252         src/journal/browse.html
3253
3254 endif
3255
3256 EXTRA_DIST += \
3257         units/systemd-journal-gatewayd.service.in
3258
3259 # ------------------------------------------------------------------------------
3260
3261 systemd_socket_proxyd_SOURCES = \
3262         src/socket-proxy/socket-proxyd.c
3263
3264 systemd_socket_proxyd_LDADD = \
3265         libsystemd-logs.la \
3266         libsystemd-bus-internal.la \
3267         libsystemd-journal-internal.la \
3268         libsystemd-id128-internal.la \
3269         libsystemd-daemon-internal.la \
3270         libsystemd-shared.la
3271
3272 # ------------------------------------------------------------------------------
3273 if ENABLE_COREDUMP
3274 systemd_coredump_SOURCES = \
3275         src/journal/coredump.c
3276
3277 systemd_coredump_LDADD = \
3278         libsystemd-journal-internal.la \
3279         libsystemd-label.la \
3280         libsystemd-shared.la
3281
3282 if ENABLE_LOGIND
3283 systemd_coredump_LDADD += \
3284         libsystemd-login-internal.la
3285 endif
3286
3287 rootlibexec_PROGRAMS += \
3288         systemd-coredump
3289
3290 systemd_coredumpctl_SOURCES = \
3291         src/journal/coredumpctl.c
3292
3293 systemd_coredumpctl_LDADD = \
3294         libsystemd-journal-internal.la \
3295         libsystemd-id128-internal.la \
3296         libsystemd-shared.la
3297
3298 bin_PROGRAMS += \
3299         systemd-coredumpctl
3300
3301 dist_bashcompletion_DATA += \
3302         shell-completion/bash/systemd-coredumpctl
3303
3304 dist_zshcompletion_DATA += \
3305         shell-completion/zsh/_systemd-coredumpctl
3306
3307 sysctl_DATA = \
3308         sysctl.d/50-coredump.conf
3309
3310 CLEANFILES += \
3311         sysctl.d/50-coredump.conf
3312 endif
3313
3314 EXTRA_DIST += \
3315         sysctl.d/50-coredump.conf.in
3316
3317 # ------------------------------------------------------------------------------
3318 if ENABLE_BINFMT
3319 systemd_binfmt_SOURCES = \
3320         src/binfmt/binfmt.c
3321
3322 systemd_binfmt_LDADD = \
3323         libsystemd-shared.la
3324
3325 rootlibexec_PROGRAMS += \
3326         systemd-binfmt
3327
3328 dist_systemunit_DATA += \
3329         units/proc-sys-fs-binfmt_misc.automount \
3330         units/proc-sys-fs-binfmt_misc.mount
3331
3332 nodist_systemunit_DATA += \
3333         units/systemd-binfmt.service
3334
3335 INSTALL_DIRS += \
3336         $(prefix)/lib/binfmt.d \
3337         $(sysconfdir)/binfmt.d
3338
3339 SYSINIT_TARGET_WANTS += \
3340         systemd-binfmt.service \
3341         proc-sys-fs-binfmt_misc.automount
3342
3343 endif
3344
3345 EXTRA_DIST += \
3346         units/systemd-binfmt.service.in
3347
3348 # ------------------------------------------------------------------------------
3349 if ENABLE_VCONSOLE
3350 systemd_vconsole_setup_SOURCES = \
3351         src/vconsole/vconsole-setup.c
3352
3353 systemd_vconsole_setup_LDADD = \
3354         libsystemd-shared.la
3355
3356 rootlibexec_PROGRAMS += \
3357         systemd-vconsole-setup
3358
3359 nodist_systemunit_DATA += \
3360         units/systemd-vconsole-setup.service
3361
3362 SYSINIT_TARGET_WANTS += \
3363         systemd-vconsole-setup.service
3364 endif
3365
3366 EXTRA_DIST += \
3367         units/systemd-vconsole-setup.service.in
3368
3369 # ------------------------------------------------------------------------------
3370 if ENABLE_READAHEAD
3371 systemd_readahead_SOURCES = \
3372         src/readahead/readahead.c \
3373         src/readahead/readahead-collect.c \
3374         src/readahead/readahead-replay.c \
3375         src/readahead/readahead-analyze.c \
3376         src/readahead/readahead-common.c \
3377         src/readahead/readahead-common.h
3378
3379 systemd_readahead_LDADD = \
3380         libsystemd-daemon-internal.la \
3381         libudev-internal.la \
3382         libsystemd-shared.la
3383
3384 dist_doc_DATA += \
3385         src/readahead/sd-readahead.c \
3386         src/systemd/sd-readahead.h
3387
3388 rootlibexec_PROGRAMS += \
3389         systemd-readahead
3390
3391 dist_systemunit_DATA += \
3392         units/systemd-readahead-drop.service \
3393         units/systemd-readahead-done.timer
3394
3395 nodist_systemunit_DATA += \
3396         units/systemd-readahead-collect.service \
3397         units/systemd-readahead-replay.service \
3398         units/systemd-readahead-done.service
3399
3400 endif
3401
3402 EXTRA_DIST += \
3403         units/systemd-readahead-collect.service.in \
3404         units/systemd-readahead-replay.service.in \
3405         units/systemd-readahead-done.service.in
3406
3407 # ------------------------------------------------------------------------------
3408 if ENABLE_BOOTCHART
3409 systemd_bootchart_SOURCES = \
3410         src/bootchart/bootchart.c \
3411         src/bootchart/bootchart.h \
3412         src/bootchart/store.c \
3413         src/bootchart/store.h \
3414         src/bootchart/svg.c \
3415         src/bootchart/svg.h
3416
3417 systemd_bootchart_LDADD = \
3418         libsystemd-journal-internal.la \
3419         libsystemd-shared.la
3420
3421 rootlibexec_PROGRAMS += \
3422         systemd-bootchart
3423
3424 dist_pkgsysconf_DATA += \
3425         src/bootchart/bootchart.conf
3426 endif
3427
3428 # ------------------------------------------------------------------------------
3429 if ENABLE_QUOTACHECK
3430 rootlibexec_PROGRAMS += \
3431         systemd-quotacheck
3432
3433 nodist_systemunit_DATA += \
3434         units/systemd-quotacheck.service
3435
3436 systemd_quotacheck_SOURCES = \
3437         src/quotacheck/quotacheck.c
3438
3439 systemd_quotacheck_LDADD = \
3440         libsystemd-shared.la
3441 endif
3442
3443 EXTRA_DIST += \
3444         units/systemd-quotacheck.service.in
3445
3446 nodist_systemunit_DATA += \
3447         units/quotaon.service
3448
3449 # ------------------------------------------------------------------------------
3450 if ENABLE_RANDOMSEED
3451 rootlibexec_PROGRAMS += \
3452         systemd-random-seed
3453
3454 nodist_systemunit_DATA += \
3455         units/systemd-random-seed.service
3456
3457 systemd_random_seed_SOURCES = \
3458         src/random-seed/random-seed.c
3459
3460 systemd_random_seed_LDADD = \
3461         libsystemd-label.la \
3462         libsystemd-shared.la
3463
3464 SYSINIT_TARGET_WANTS += \
3465         systemd-random-seed.service
3466
3467 endif
3468
3469 EXTRA_DIST += \
3470         units/systemd-random-seed.service.in
3471
3472 # ------------------------------------------------------------------------------
3473 if ENABLE_BACKLIGHT
3474 rootlibexec_PROGRAMS += \
3475         systemd-backlight
3476
3477 nodist_systemunit_DATA += \
3478         units/systemd-backlight@.service
3479
3480 systemd_backlight_SOURCES = \
3481         src/backlight/backlight.c
3482
3483 systemd_backlight_LDADD = \
3484         libsystemd-label.la \
3485         libudev-internal.la \
3486         libsystemd-shared.la
3487 endif
3488
3489 EXTRA_DIST += \
3490         units/systemd-backlight@.service.in
3491
3492 # ------------------------------------------------------------------------------
3493 if ENABLE_RFKILL
3494 rootlibexec_PROGRAMS += \
3495         systemd-rfkill
3496
3497 nodist_systemunit_DATA += \
3498         units/systemd-rfkill@.service
3499
3500 systemd_rfkill_SOURCES = \
3501         src/rfkill/rfkill.c
3502
3503 systemd_rfkill_LDADD = \
3504         libsystemd-label.la \
3505         libudev-internal.la \
3506         libsystemd-shared.la
3507 endif
3508
3509 EXTRA_DIST += \
3510         units/systemd-rfkill@.service.in
3511
3512 # ------------------------------------------------------------------------------
3513 if HAVE_LIBCRYPTSETUP
3514 rootlibexec_PROGRAMS += \
3515         systemd-cryptsetup
3516
3517 systemgenerator_PROGRAMS += \
3518         systemd-cryptsetup-generator
3519
3520 dist_systemunit_DATA += \
3521         units/cryptsetup.target
3522
3523 systemd_cryptsetup_SOURCES = \
3524         src/cryptsetup/cryptsetup.c
3525
3526 systemd_cryptsetup_CFLAGS = \
3527         $(AM_CFLAGS) \
3528         $(LIBCRYPTSETUP_CFLAGS)
3529
3530 systemd_cryptsetup_LDADD = \
3531         libsystemd-label.la \
3532         libudev-internal.la \
3533         libsystemd-shared.la \
3534         $(LIBCRYPTSETUP_LIBS)
3535
3536 systemd_cryptsetup_generator_SOURCES = \
3537         src/cryptsetup/cryptsetup-generator.c
3538
3539 systemd_cryptsetup_generator_LDADD = \
3540         libsystemd-label.la \
3541         libsystemd-shared.la
3542
3543 SYSINIT_TARGET_WANTS += \
3544         cryptsetup.target
3545
3546 endif
3547
3548 # ------------------------------------------------------------------------------
3549 if ENABLE_HOSTNAMED
3550 systemd_hostnamed_SOURCES = \
3551         src/hostname/hostnamed.c
3552
3553 systemd_hostnamed_LDADD = \
3554         libsystemd-label.la \
3555         libsystemd-bus-internal.la \
3556         libsystemd-id128-internal.la \
3557         libsystemd-daemon-internal.la \
3558         libsystemd-shared.la
3559
3560 rootlibexec_PROGRAMS += \
3561         systemd-hostnamed
3562
3563 nodist_systemunit_DATA += \
3564         units/systemd-hostnamed.service
3565
3566 dist_dbuspolicy_DATA += \
3567         src/hostname/org.freedesktop.hostname1.conf
3568
3569 dist_dbussystemservice_DATA += \
3570         src/hostname/org.freedesktop.hostname1.service
3571
3572 polkitpolicy_files += \
3573         src/hostname/org.freedesktop.hostname1.policy
3574
3575 SYSTEM_UNIT_ALIASES += \
3576         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3577
3578 hostnamectl_SOURCES = \
3579         src/hostname/hostnamectl.c
3580
3581 hostnamectl_LDADD = \
3582         libsystemd-bus-internal.la \
3583         libsystemd-id128-internal.la \
3584         libsystemd-daemon-internal.la \
3585         libsystemd-shared.la
3586
3587 bin_PROGRAMS += \
3588         hostnamectl
3589
3590 dist_bashcompletion_DATA += \
3591         shell-completion/bash/hostnamectl
3592
3593 dist_zshcompletion_DATA += \
3594         shell-completion/zsh/_hostnamectl
3595
3596 endif
3597
3598 polkitpolicy_in_files += \
3599         src/hostname/org.freedesktop.hostname1.policy.in
3600
3601 EXTRA_DIST += \
3602         units/systemd-hostnamed.service.in
3603
3604 # ------------------------------------------------------------------------------
3605 if ENABLE_LOCALED
3606 systemd_localed_SOURCES = \
3607         src/locale/localed.c
3608
3609 systemd_localed_LDADD = \
3610         libsystemd-label.la \
3611         libsystemd-bus-internal.la \
3612         libsystemd-id128-internal.la \
3613         libsystemd-daemon-internal.la \
3614         libsystemd-shared.la
3615
3616 nodist_systemunit_DATA += \
3617         units/systemd-localed.service
3618
3619 rootlibexec_PROGRAMS += \
3620         systemd-localed
3621
3622 dist_dbuspolicy_DATA += \
3623         src/locale/org.freedesktop.locale1.conf
3624
3625 dist_dbussystemservice_DATA += \
3626         src/locale/org.freedesktop.locale1.service
3627
3628 polkitpolicy_files += \
3629         src/locale/org.freedesktop.locale1.policy
3630
3631 SYSTEM_UNIT_ALIASES += \
3632         systemd-localed.service dbus-org.freedesktop.locale1.service
3633
3634 dist_pkgdata_DATA += \
3635         src/locale/kbd-model-map
3636
3637 dist_noinst_SCRIPT = \
3638         src/locale/generate-kbd-model-map
3639
3640 update-kbd-model-map: src/locale/generate-kbd-model-map
3641         $PYTHON $< > src/locale/kbd-model-map
3642
3643 localectl_SOURCES = \
3644         src/locale/localectl.c
3645
3646 localectl_LDADD = \
3647         libsystemd-bus-internal.la \
3648         libsystemd-id128-internal.la \
3649         libsystemd-daemon-internal.la \
3650         libsystemd-shared.la
3651
3652 bin_PROGRAMS += \
3653         localectl
3654
3655 dist_bashcompletion_DATA += \
3656         shell-completion/bash/localectl
3657
3658 dist_zshcompletion_DATA += \
3659         shell-completion/zsh/_localectl
3660
3661 endif
3662
3663 polkitpolicy_in_files += \
3664         src/locale/org.freedesktop.locale1.policy.in
3665
3666 EXTRA_DIST += \
3667         units/systemd-localed.service.in
3668
3669 # ------------------------------------------------------------------------------
3670 if ENABLE_TIMEDATED
3671 systemd_timedated_SOURCES = \
3672         src/timedate/timedated.c
3673
3674 systemd_timedated_LDADD = \
3675         libsystemd-label.la \
3676         libsystemd-bus-internal.la \
3677         libsystemd-id128-internal.la \
3678         libsystemd-daemon-internal.la \
3679         libsystemd-shared.la
3680
3681 rootlibexec_PROGRAMS += \
3682         systemd-timedated
3683
3684 dist_dbussystemservice_DATA += \
3685         src/timedate/org.freedesktop.timedate1.service
3686
3687 dist_dbuspolicy_DATA += \
3688         src/timedate/org.freedesktop.timedate1.conf
3689
3690 nodist_systemunit_DATA += \
3691         units/systemd-timedated.service
3692
3693 polkitpolicy_files += \
3694         src/timedate/org.freedesktop.timedate1.policy
3695
3696 INSTALL_DIRS += \
3697         $(prefix)/lib/systemd/ntp-units.d \
3698         $(sysconfdir)/systemd/ntp-units.d
3699
3700 SYSTEM_UNIT_ALIASES += \
3701         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3702
3703 timedatectl_SOURCES = \
3704         src/timedate/timedatectl.c
3705
3706 timedatectl_LDADD = \
3707         libsystemd-bus-internal.la \
3708         libsystemd-id128-internal.la \
3709         libsystemd-daemon-internal.la \
3710         libsystemd-shared.la
3711
3712 bin_PROGRAMS += \
3713         timedatectl
3714
3715 dist_bashcompletion_DATA += \
3716         shell-completion/bash/timedatectl
3717
3718 dist_zshcompletion_DATA += \
3719         shell-completion/zsh/_timedatectl
3720 endif
3721
3722 polkitpolicy_in_files += \
3723         src/timedate/org.freedesktop.timedate1.policy.in
3724
3725 EXTRA_DIST += \
3726         units/systemd-timedated.service.in
3727
3728 # ------------------------------------------------------------------------------
3729 if HAVE_MYHOSTNAME
3730 libnss_myhostname_la_SOURCES = \
3731         src/nss-myhostname/nss-myhostname.c \
3732         src/nss-myhostname/ifconf.h \
3733         src/nss-myhostname/netlink.c
3734
3735 libnss_myhostname_la_LDFLAGS = \
3736         $(AM_LDFLAGS) \
3737         -module \
3738         -export-dynamic \
3739         -avoid-version \
3740         -shared \
3741         -shrext .so.2
3742
3743 lib_LTLIBRARIES += \
3744         libnss_myhostname.la
3745 endif
3746
3747 # ------------------------------------------------------------------------------
3748 if ENABLE_MACHINED
3749 systemd_machined_SOURCES = \
3750         src/machine/machined.c \
3751         src/machine/machined.h
3752
3753 systemd_machined_LDADD = \
3754         libsystemd-machine-core.la
3755
3756 rootlibexec_PROGRAMS += \
3757         systemd-machined
3758
3759 libsystemd_machine_core_la_SOURCES = \
3760         src/machine/machined-dbus.c \
3761         src/machine/machine.c \
3762         src/machine/machine.h \
3763         src/machine/machine-dbus.c
3764
3765 libsystemd_machine_core_la_LIBADD = \
3766         libsystemd-label.la \
3767         libsystemd-audit.la \
3768         libsystemd-daemon-internal.la \
3769         libsystemd-bus-internal.la \
3770         libsystemd-id128-internal.la \
3771         libudev-internal.la \
3772         libsystemd-shared.la
3773
3774 noinst_LTLIBRARIES += \
3775         libsystemd-machine-core.la
3776
3777 machinectl_SOURCES = \
3778         src/machine/machinectl.c
3779
3780 machinectl_LDADD = \
3781         libsystemd-bus-internal.la \
3782         libsystemd-id128-internal.la \
3783         libsystemd-daemon-internal.la \
3784         libsystemd-shared.la
3785
3786 rootbin_PROGRAMS += \
3787         machinectl
3788
3789 test_machine_tables_SOURCES = \
3790         src/machine/test-machine-tables.c
3791
3792 test_machine_tables_LDADD = \
3793         libsystemd-machine-core.la
3794
3795 tests += \
3796         test-machine-tables
3797
3798 nodist_systemunit_DATA += \
3799         units/systemd-machined.service
3800
3801 dist_systemunit_DATA += \
3802         units/machine.slice
3803
3804 dist_dbussystemservice_DATA += \
3805         src/machine/org.freedesktop.machine1.service
3806
3807 dist_dbuspolicy_DATA += \
3808         src/machine/org.freedesktop.machine1.conf
3809
3810 dist_zshcompletion_DATA += \
3811         shell-completion/zsh/_machinectl
3812
3813 SYSTEM_UNIT_ALIASES += \
3814         systemd-machined.service dbus-org.freedesktop.machine1.service
3815
3816 EXTRA_DIST += \
3817         units/systemd-machined.service.in
3818
3819 endif
3820
3821 # ------------------------------------------------------------------------------
3822 if ENABLE_NETWORKD
3823 rootlibexec_PROGRAMS += \
3824         systemd-networkd
3825
3826 systemd_networkd_SOURCES = \
3827         src/network/networkd.h \
3828         src/network/networkd.c \
3829         src/network/networkd-link.c \
3830         src/network/networkd-network.c \
3831         src/network/networkd-address.c \
3832         src/network/networkd-route.c \
3833         src/network/networkd-manager.c
3834
3835 nodist_systemd_networkd_SOURCES = \
3836         src/network/networkd-gperf.c
3837
3838 systemd_networkd_LDADD = \
3839         libudev-internal.la \
3840         libsystemd-bus.la \
3841         libsystemd-rtnl.la \
3842         libsystemd-shared.la
3843
3844 nodist_systemunit_DATA += \
3845         units/systemd-networkd.service
3846
3847 MULTI_USER_TARGET_WANTS += \
3848         systemd-networkd.service
3849
3850 test_network_SOURCES = \
3851         src/network/test-network.c \
3852         src/network/networkd.h \
3853         src/network/networkd-link.c \
3854         src/network/networkd-network.c \
3855         src/network/networkd-address.c \
3856         src/network/networkd-route.c \
3857         src/network/networkd-manager.c \
3858         src/network/networkd-gperf.c
3859
3860 test_network_LDADD = \
3861         libudev-internal.la \
3862         libsystemd-bus.la \
3863         libsystemd-rtnl.la \
3864         libsystemd-shared.la
3865
3866 tests += test-network
3867
3868 EXTRA_DIST += \
3869         src/network/networkd-gperf.gperf \
3870         units/systemd-networkd.service.in
3871
3872 CLEANFILES += \
3873         src/network/networkd-gperf.c
3874 endif
3875
3876 # ------------------------------------------------------------------------------
3877 if ENABLE_LOGIND
3878 systemd_logind_SOURCES = \
3879         src/login/logind.c \
3880         src/login/logind.h
3881
3882 nodist_systemd_logind_SOURCES = \