chiark / gitweb /
de9a4aad5f817eebf49d6b618e8fd17733b82f38
[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 # Dirs of external packages
63 dbuspolicydir=@dbuspolicydir@
64 dbussessionservicedir=@dbussessionservicedir@
65 dbussystemservicedir=@dbussystemservicedir@
66 pamlibdir=@pamlibdir@
67 pamconfdir=@pamconfdir@
68 pkgconfigdatadir=$(datadir)/pkgconfig
69 pkgconfiglibdir=$(libdir)/pkgconfig
70 polkitpolicydir=$(datadir)/polkit-1/actions
71 bashcompletiondir=@bashcompletiondir@
72 zshcompletiondir=@zshcompletiondir@
73 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
74 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
75 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
76 varlogdir=$(localstatedir)/log
77 systemdstatedir=$(localstatedir)/lib/systemd
78 catalogstatedir=$(systemdstatedir)/catalog
79
80 # Our own, non-special dirs
81 pkgsysconfdir=$(sysconfdir)/systemd
82 userunitdir=$(prefix)/lib/systemd/user
83 userpresetdir=$(prefix)/lib/systemd/user-preset
84 tmpfilesdir=$(prefix)/lib/tmpfiles.d
85 sysctldir=$(prefix)/lib/sysctl.d
86 networkdir=$(prefix)/lib/systemd/network
87 pkgincludedir=$(includedir)/systemd
88 systemgeneratordir=$(rootlibexecdir)/system-generators
89 usergeneratordir=$(prefix)/lib/systemd/user-generators
90 systemshutdowndir=$(rootlibexecdir)/system-shutdown
91 systemsleepdir=$(rootlibexecdir)/system-sleep
92 systemunitdir=$(rootprefix)/lib/systemd/system
93 systempresetdir=$(rootprefix)/lib/systemd/system-preset
94 udevlibexecdir=$(rootprefix)/lib/udev
95 udevhomedir=$(udevlibexecdir)
96 udevrulesdir=$(udevlibexecdir)/rules.d
97 udevhwdbdir=$(udevlibexecdir)/hwdb.d
98 catalogdir=$(prefix)/lib/systemd/catalog
99 kernelinstalldir = $(prefix)/lib/kernel/install.d
100
101 # And these are the special ones for /
102 rootprefix=@rootprefix@
103 rootbindir=$(rootprefix)/bin
104 rootlibexecdir=$(rootprefix)/lib/systemd
105
106 CLEANFILES = $(BUILT_SOURCES)
107 DISTCLEANFILES =
108 EXTRA_DIST =
109 BUILT_SOURCES =
110 INSTALL_EXEC_HOOKS =
111 UNINSTALL_EXEC_HOOKS =
112 INSTALL_DATA_HOOKS =
113 UNINSTALL_DATA_HOOKS =
114 DISTCLEAN_LOCAL_HOOKS =
115 CLEAN_LOCAL_HOOKS =
116 pkginclude_HEADERS =
117 noinst_LTLIBRARIES =
118 lib_LTLIBRARIES =
119 include_HEADERS =
120 noinst_DATA =
121 pkgconfiglib_DATA =
122 polkitpolicy_in_in_files =
123 polkitpolicy_in_files =
124 polkitpolicy_files =
125 dist_udevrules_DATA =
126 nodist_udevrules_DATA =
127 dist_pkgsysconf_DATA =
128 dist_pkgdata_DATA =
129 dist_dbuspolicy_DATA =
130 dist_dbussystemservice_DATA =
131 check_PROGRAMS =
132 check_DATA =
133 tests=
134 manual_tests =
135 if ENABLE_TESTS
136 noinst_PROGRAMS = $(manual_tests) $(tests)
137 TESTS = $(tests)
138 else
139 noinst_PROGRAMS =
140 TESTS =
141 endif
142 udevlibexec_PROGRAMS =
143
144 AM_CPPFLAGS = \
145         -include $(top_builddir)/config.h \
146         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
147         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
148         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
149         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
150         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
151         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
152         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
153         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
154         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
155         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
156         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
157         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
158         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
159         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
160         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
161         -DROOTPREFIX=\"$(rootprefix)\" \
162         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
163         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
164         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
165         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
166         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
167         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
168         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
169         -DX_SERVER=\"$(bindir)/X\" \
170         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
171         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
172         -DQUOTACHECK=\"$(QUOTACHECK)\" \
173         -DKEXEC=\"$(KEXEC)\" \
174         -I $(top_srcdir)/src \
175         -I $(top_srcdir)/src/shared \
176         -I $(top_srcdir)/src/login \
177         -I $(top_srcdir)/src/journal \
178         -I $(top_srcdir)/src/systemd \
179         -I $(top_builddir)/src/core \
180         -I $(top_srcdir)/src/core \
181         -I $(top_srcdir)/src/libudev \
182         -I $(top_srcdir)/src/udev \
183         -I $(top_srcdir)/src/udev/net \
184         -I $(top_builddir)/src/udev \
185         -I $(top_srcdir)/src/libsystemd-bus \
186         -I $(top_srcdir)/src/libsystemd-rtnl \
187         $(OUR_CPPFLAGS)
188
189 AM_CFLAGS = $(OUR_CFLAGS)
190 AM_LDFLAGS = $(OUR_LDFLAGS)
191
192 # ------------------------------------------------------------------------------
193 define move-to-rootlibdir
194         if test "$(libdir)" != "$(rootlibdir)"; then \
195                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
196                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
197                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
198                 $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
199                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
200         fi
201 endef
202
203 INSTALL_DIRS =
204
205 RUNLEVEL1_TARGET_WANTS =
206 RUNLEVEL2_TARGET_WANTS =
207 RUNLEVEL3_TARGET_WANTS =
208 RUNLEVEL4_TARGET_WANTS =
209 RUNLEVEL5_TARGET_WANTS =
210 SHUTDOWN_TARGET_WANTS =
211 LOCAL_FS_TARGET_WANTS =
212 MULTI_USER_TARGET_WANTS =
213 SYSINIT_TARGET_WANTS =
214 SOCKETS_TARGET_WANTS =
215 TIMERS_TARGET_WANTS =
216
217 SYSTEM_UNIT_ALIASES =
218 USER_UNIT_ALIASES =
219
220 GENERAL_ALIASES =
221
222 install-target-wants-hook:
223         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && $(add-wants)
224         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && $(add-wants)
225         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && $(add-wants)
226         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && $(add-wants)
227         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && $(add-wants)
228         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
229         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
230         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
231         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
232         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
233         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
234         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
235
236 define add-wants
237         [ -z "$$what" ] || ( \
238           dir=$(DESTDIR)$(systemunitdir)/$$wants.wants && \
239           $(MKDIR_P) -m 0755 $$dir && \
240           cd $$dir && \
241           rm -f $$what && \
242           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
243 endef
244
245 install-directories-hook:
246         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
247
248 install-aliases-hook:
249         set -- $(SYSTEM_UNIT_ALIASES) && \
250                 dir=$(systemunitdir) && $(install-aliases)
251         set -- $(USER_UNIT_ALIASES) && \
252                 dir=$(userunitdir) && $(install-aliases)
253         set -- $(GENERAL_ALIASES) && \
254                 dir= && $(install-aliases)
255
256 define install-aliases
257         while [ -n "$$1" ]; do \
258                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
259                 rm -f $(DESTDIR)$$dir/$$2 && \
260                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
261                 shift 2 || exit $$?; \
262         done
263 endef
264
265 INSTALL_EXEC_HOOKS += \
266         install-target-wants-hook \
267         install-directories-hook \
268         install-aliases-hook
269
270 # ------------------------------------------------------------------------------
271 AM_V_M4 = $(AM_V_M4_$(V))
272 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
273 AM_V_M4_0 = @echo "  M4      " $@;
274
275 AM_V_XSLT = $(AM_V_XSLT_$(V))
276 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
277 AM_V_XSLT_0 = @echo "  XSLT    " $@;
278
279 AM_V_GPERF = $(AM_V_GPERF_$(V))
280 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
281 AM_V_GPERF_0 = @echo "  GPERF   " $@;
282
283 AM_V_LN = $(AM_V_LN_$(V))
284 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
285 AM_V_LN_0 = @echo "  LN      " $@;
286
287 # ------------------------------------------------------------------------------
288 rootbin_PROGRAMS = \
289         systemctl \
290         systemd-notify \
291         systemd-ask-password \
292         systemd-tty-ask-password-agent \
293         systemd-machine-id-setup
294
295 bin_PROGRAMS = \
296         systemd-cgls \
297         systemd-cgtop \
298         systemd-stdio-bridge \
299         systemd-nspawn \
300         systemd-detect-virt \
301         systemd-delta \
302         systemd-analyze \
303         systemd-run
304
305 dist_bin_SCRIPTS = \
306         src/kernel-install/kernel-install
307
308 dist_kernelinstall_SCRIPTS = \
309         src/kernel-install/50-depmod.install \
310         src/kernel-install/90-loaderentry.install
311
312 rootlibexec_PROGRAMS = \
313         systemd \
314         systemd-cgroups-agent \
315         systemd-initctl \
316         systemd-update-utmp \
317         systemd-shutdownd \
318         systemd-shutdown \
319         systemd-remount-fs \
320         systemd-reply-password \
321         systemd-fsck \
322         systemd-ac-power \
323         systemd-sysctl \
324         systemd-sleep \
325         systemd-socket-proxyd
326
327 systemgenerator_PROGRAMS = \
328         systemd-getty-generator \
329         systemd-fstab-generator \
330         systemd-system-update-generator
331
332 dist_bashcompletion_DATA = \
333         shell-completion/bash/journalctl \
334         shell-completion/bash/systemctl \
335         shell-completion/bash/systemd-analyze \
336         shell-completion/bash/systemd-run \
337         shell-completion/bash/udevadm \
338         shell-completion/bash/kernel-install
339
340 dist_zshcompletion_DATA = \
341         shell-completion/zsh/_systemctl \
342         shell-completion/zsh/_journalctl \
343         shell-completion/zsh/_udevadm \
344         shell-completion/zsh/_kernel-install \
345         shell-completion/zsh/_systemd-nspawn \
346         shell-completion/zsh/_systemd-analyze \
347         shell-completion/zsh/_sd_hosts_or_user_at_host \
348         shell-completion/zsh/_systemd-delta \
349         shell-completion/zsh/_systemd
350
351 dist_sysctl_DATA = \
352         sysctl.d/50-default.conf
353
354 dist_systemunit_DATA = \
355         units/graphical.target \
356         units/multi-user.target \
357         units/emergency.service \
358         units/emergency.target \
359         units/sysinit.target \
360         units/basic.target \
361         units/getty.target \
362         units/halt.target \
363         units/kexec.target \
364         units/local-fs.target \
365         units/local-fs-pre.target \
366         units/initrd.target \
367         units/initrd-fs.target \
368         units/initrd-root-fs.target \
369         units/remote-fs.target \
370         units/remote-fs-pre.target \
371         units/network.target \
372         units/network-online.target \
373         units/nss-lookup.target \
374         units/nss-user-lookup.target \
375         units/hibernate.target \
376         units/hybrid-sleep.target \
377         units/poweroff.target \
378         units/reboot.target \
379         units/rescue.target \
380         units/rpcbind.target \
381         units/time-sync.target \
382         units/shutdown.target \
383         units/final.target \
384         units/umount.target \
385         units/sigpwr.target \
386         units/sleep.target \
387         units/sockets.target \
388         units/timers.target \
389         units/paths.target \
390         units/suspend.target \
391         units/swap.target \
392         units/slices.target \
393         units/system.slice \
394         units/x-.slice \
395         units/systemd-initctl.socket \
396         units/systemd-shutdownd.socket \
397         units/syslog.socket \
398         units/dev-hugepages.mount \
399         units/dev-mqueue.mount \
400         units/sys-kernel-config.mount \
401         units/sys-kernel-debug.mount \
402         units/sys-fs-fuse-connections.mount \
403         units/tmp.mount \
404         units/printer.target \
405         units/sound.target \
406         units/bluetooth.target \
407         units/smartcard.target \
408         units/systemd-ask-password-wall.path \
409         units/systemd-ask-password-console.path \
410         units/systemd-udevd-control.socket \
411         units/systemd-udevd-kernel.socket \
412         units/system-update.target \
413         units/initrd-switch-root.target
414
415 nodist_systemunit_DATA = \
416         units/getty@.service \
417         units/serial-getty@.service \
418         units/console-shell.service \
419         units/console-getty.service \
420         units/systemd-initctl.service \
421         units/systemd-shutdownd.service \
422         units/systemd-remount-fs.service \
423         units/systemd-update-utmp.service \
424         units/systemd-update-utmp-runlevel.service \
425         units/systemd-ask-password-wall.service \
426         units/systemd-ask-password-console.service \
427         units/systemd-sysctl.service \
428         units/emergency.service \
429         units/rescue.service \
430         units/user@.service \
431         units/systemd-hibernate.service \
432         units/systemd-hybrid-sleep.service \
433         units/systemd-suspend.service \
434         units/systemd-halt.service \
435         units/systemd-poweroff.service \
436         units/systemd-reboot.service \
437         units/systemd-kexec.service \
438         units/systemd-fsck@.service \
439         units/systemd-fsck-root.service \
440         units/systemd-udevd.service \
441         units/systemd-udev-trigger.service \
442         units/systemd-udev-settle.service \
443         units/debug-shell.service \
444         units/initrd-parse-etc.service \
445         units/initrd-cleanup.service \
446         units/initrd-udevadm-cleanup-db.service \
447         units/initrd-switch-root.service \
448         units/systemd-nspawn@.service
449
450 dist_userunit_DATA = \
451         units/user/default.target \
452         units/user/exit.target
453
454 nodist_userunit_DATA = \
455         units/user/systemd-exit.service
456
457 EXTRA_DIST += \
458         units/getty@.service.m4 \
459         units/serial-getty@.service.m4 \
460         units/console-shell.service.m4.in \
461         units/console-getty.service.m4.in \
462         units/rescue.service.m4.in \
463         units/systemd-initctl.service.in \
464         units/systemd-shutdownd.service.in \
465         units/systemd-remount-fs.service.in \
466         units/systemd-update-utmp.service.in \
467         units/systemd-update-utmp-runlevel.service.in \
468         units/systemd-ask-password-wall.service.in \
469         units/systemd-ask-password-console.service.in \
470         units/systemd-sysctl.service.in \
471         units/emergency.service.in \
472         units/systemd-halt.service.in \
473         units/systemd-poweroff.service.in \
474         units/systemd-reboot.service.in \
475         units/systemd-kexec.service.in \
476         units/user/systemd-exit.service.in \
477         units/systemd-fsck@.service.in \
478         units/systemd-fsck-root.service.in \
479         units/user@.service.in \
480         units/systemd-udevd.service \
481         units/systemd-udev-trigger.service \
482         units/systemd-udev-settle.service \
483         units/debug-shell.service.in \
484         units/systemd-hibernate.service.in \
485         units/systemd-hybrid-sleep.service.in \
486         units/systemd-suspend.service.in \
487         units/quotaon.service.in \
488         units/initrd-parse-etc.service.in \
489         units/initrd-cleanup.service.in \
490         units/initrd-udevadm-cleanup-db.service.in \
491         units/initrd-switch-root.service.in \
492         units/systemd-nspawn@.service.in
493
494 CLEANFILES += \
495         units/console-shell.service.m4 \
496         units/console-getty.service.m4 \
497         units/rescue.service.m4
498
499 if HAVE_SYSV_COMPAT
500 nodist_systemunit_DATA += \
501         units/rc-local.service \
502         units/halt-local.service
503
504 systemgenerator_PROGRAMS += \
505         systemd-rc-local-generator
506 endif
507
508 EXTRA_DIST += \
509         units/rc-local.service.in \
510         units/halt-local.service.in
511
512 # automake is broken and can't handle files with a dash in front
513 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
514 units-install-hook:
515         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
516
517 units-uninstall-hook:
518         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
519
520 INSTALL_DATA_HOOKS += units-install-hook
521 UNINSTALL_DATA_HOOKS += units-uninstall-hook
522
523 dist_doc_DATA = \
524         README \
525         NEWS \
526         LICENSE.LGPL2.1 \
527         LICENSE.GPL2 \
528         LICENSE.MIT \
529         DISTRO_PORTING
530
531 @INTLTOOL_POLICY_RULE@
532
533 # ------------------------------------------------------------------------------
534
535 MANPAGES =
536 MANPAGES_ALIAS =
537
538 include Makefile-man.am
539
540 .PHONY: man
541 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
542
543 XML_FILES = \
544         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
545 HTML_FILES = \
546         ${XML_FILES:.xml=.html}
547 HTML_ALIAS = \
548         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
549
550 if ENABLE_MANPAGES
551 man_MANS = \
552         $(MANPAGES) \
553         $(MANPAGES_ALIAS)
554
555 noinst_DATA += \
556         $(HTML_FILES) \
557         $(HTML_ALIAS)
558
559 CLEANFILES += \
560         $(man_MANS) \
561         $(HTML_FILES) \
562         $(HTML_ALIAS)
563
564 docs/html/man:
565         $(AM_V_at)$(MKDIR_P) $(dir $@)
566         $(AM_V_LN)$(LN_S) -f ../../man $@
567
568 noinst_DATA += \
569         docs/html/man
570
571 CLEANFILES += \
572         docs/html/man
573
574 if HAVE_PYTHON
575 man/index.html: man/systemd.index.html
576         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
577
578 noinst_DATA += \
579         man/index.html
580
581 CLEANFILES += \
582         man/index.html
583
584 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
585 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
586 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
587
588 update-man-list: make-man-rules.py $(XML_GLOB)
589         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
590         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
591         @echo "Makefile-man.am has been regenerated"
592
593 man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
594         $(AM_V_at)$(MKDIR_P) $(dir $@)
595         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
596
597 man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
598         $(AM_V_at)$(MKDIR_P) $(dir $@)
599         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
600
601 EXTRA_DIST += \
602         man/systemd.index.xml \
603         man/index.html \
604         man/systemd.directives.xml
605
606 CLEANFILES += \
607         man/systemd.index.xml \
608         man/systemd.directives.xml
609
610 endif
611
612 endif
613
614 EXTRA_DIST += \
615         $(XML_FILES) \
616         $(HTML_FILES) \
617         $(HTML_ALIAS) \
618         $(man_MANS) \
619         make-man-index.py \
620         make-directive-index.py \
621         xml_helper.py
622
623 # ------------------------------------------------------------------------------
624 noinst_LTLIBRARIES += \
625         libsystemd-rtnl.la
626
627 libsystemd_rtnl_la_SOURCES = \
628         src/systemd/sd-rtnl.h \
629         src/libsystemd-rtnl/sd-rtnl.c \
630         src/libsystemd-rtnl/rtnl-internal.h \
631         src/libsystemd-rtnl/rtnl-message.c \
632         src/libsystemd-rtnl/rtnl-util.h \
633         src/libsystemd-rtnl/rtnl-util.c
634
635 test_rtnl_SOURCES = \
636         src/libsystemd-rtnl/test-rtnl.c
637
638 test_rtnl_LDADD = \
639         libsystemd-shared.la \
640         libsystemd-rtnl.la
641
642 tests += test-rtnl
643
644 # ------------------------------------------------------------------------------
645 noinst_LTLIBRARIES += \
646         libsystemd-shared.la
647
648 libsystemd_shared_la_SOURCES = \
649         src/shared/linux/auto_dev-ioctl.h \
650         src/shared/linux/fanotify.h \
651         src/shared/linux/seccomp.h \
652         src/shared/linux/seccomp-bpf.h \
653         src/shared/missing.h \
654         src/shared/list.h \
655         src/shared/macro.h \
656         src/shared/def.h \
657         src/shared/device-nodes.c \
658         src/shared/device-nodes.h \
659         src/shared/sparse-endian.h \
660         src/shared/util.c \
661         src/shared/util.h \
662         src/shared/udev-util.h \
663         src/shared/virt.c \
664         src/shared/virt.h \
665         src/shared/efivars.c \
666         src/shared/efivars.h \
667         src/shared/path-util.c \
668         src/shared/path-util.h \
669         src/shared/time-util.c \
670         src/shared/time-util.h \
671         src/shared/hashmap.c \
672         src/shared/hashmap.h \
673         src/shared/set.c \
674         src/shared/set.h \
675         src/shared/fdset.c \
676         src/shared/fdset.h \
677         src/shared/prioq.c \
678         src/shared/prioq.h \
679         src/shared/sleep-config.c \
680         src/shared/sleep-config.h \
681         src/shared/strv.c \
682         src/shared/strv.h \
683         src/shared/env-util.c \
684         src/shared/env-util.h \
685         src/shared/strbuf.c \
686         src/shared/strbuf.h \
687         src/shared/strxcpyx.c \
688         src/shared/strxcpyx.h \
689         src/shared/conf-parser.c \
690         src/shared/conf-parser.h \
691         src/shared/log.c \
692         src/shared/log.h \
693         src/shared/ratelimit.h \
694         src/shared/ratelimit.c \
695         src/shared/exit-status.c \
696         src/shared/exit-status.h \
697         src/shared/utf8.c \
698         src/shared/utf8.h \
699         src/shared/gunicode.c \
700         src/shared/gunicode.h \
701         src/shared/pager.c \
702         src/shared/pager.h \
703         src/shared/ioprio.h \
704         src/shared/socket-util.c \
705         src/shared/socket-util.h \
706         src/shared/conf-files.c \
707         src/shared/conf-files.h \
708         src/shared/cgroup-util.c \
709         src/shared/cgroup-util.h \
710         src/shared/cgroup-show.c \
711         src/shared/cgroup-show.h \
712         src/shared/unit-name.c \
713         src/shared/unit-name.h \
714         src/shared/utmp-wtmp.c \
715         src/shared/utmp-wtmp.h \
716         src/shared/watchdog.c \
717         src/shared/watchdog.h \
718         src/shared/spawn-ask-password-agent.c \
719         src/shared/spawn-ask-password-agent.h \
720         src/shared/replace-var.c \
721         src/shared/replace-var.h \
722         src/shared/spawn-polkit-agent.c \
723         src/shared/spawn-polkit-agent.h \
724         src/shared/hwclock.c \
725         src/shared/hwclock.h \
726         src/shared/time-dst.c \
727         src/shared/time-dst.h \
728         src/shared/calendarspec.c \
729         src/shared/calendarspec.h \
730         src/shared/fileio.c \
731         src/shared/fileio.h \
732         src/shared/output-mode.h \
733         src/shared/MurmurHash3.c \
734         src/shared/MurmurHash3.h \
735         src/shared/acpi-fpdt.h \
736         src/shared/acpi-fpdt.c \
737         src/shared/boot-timestamps.h \
738         src/shared/boot-timestamps.c \
739         src/shared/refcnt.h \
740         src/shared/mkdir.c \
741         src/shared/mkdir.h \
742         src/shared/smack-util.c \
743         src/shared/smack-util.h \
744         src/shared/apparmor-util.c \
745         src/shared/apparmor-util.h \
746         src/shared/ima-util.c \
747         src/shared/ima-util.h
748
749 #-------------------------------------------------------------------------------
750 noinst_LTLIBRARIES += \
751         libsystemd-dbus.la
752
753 libsystemd_dbus_la_SOURCES = \
754         src/shared/dbus-common.c \
755         src/shared/dbus-common.h \
756         src/shared/dbus-loop.c \
757         src/shared/dbus-loop.h \
758         src/shared/polkit.c \
759         src/shared/polkit.h
760
761 libsystemd_dbus_la_CFLAGS = \
762         $(AM_CFLAGS) \
763         $(DBUS_CFLAGS)
764
765 libsystemd_dbus_la_LIBADD = \
766         $(DBUS_LIBS)
767
768 # ------------------------------------------------------------------------------
769 noinst_LTLIBRARIES += \
770         libsystemd-units.la
771
772 libsystemd_units_la_SOURCES = \
773         src/shared/install.c \
774         src/shared/install.h \
775         src/shared/install-printf.c \
776         src/shared/install-printf.h \
777         src/shared/path-lookup.c \
778         src/shared/path-lookup.h \
779         src/shared/specifier.c \
780         src/shared/specifier.h
781
782 libsystemd_units_la_CFLAGS = \
783         $(AM_CFLAGS) \
784         $(DBUS_CFLAGS)
785
786 # ------------------------------------------------------------------------------
787 noinst_LTLIBRARIES += \
788         libsystemd-label.la
789
790 libsystemd_label_la_SOURCES = \
791         src/shared/socket-label.c \
792         src/shared/label.c \
793         src/shared/label.h \
794         src/shared/selinux-util.c \
795         src/shared/selinux-util.h \
796         src/shared/mkdir-label.c \
797         src/shared/ask-password-api.c \
798         src/shared/ask-password-api.h \
799         src/shared/fileio-label.c \
800         src/shared/fileio-label.h \
801         src/shared/dev-setup.c \
802         src/shared/dev-setup.h
803
804 libsystemd_label_la_CFLAGS = \
805         $(AM_CFLAGS) \
806         $(SELINUX_CFLAGS)
807
808 libsystemd_label_la_LIBADD = \
809         $(SELINUX_LIBS)
810
811 # ------------------------------------------------------------------------------
812 noinst_LTLIBRARIES += \
813         libsystemd-logs.la
814
815 libsystemd_logs_la_SOURCES = \
816         src/shared/logs-show.c \
817         src/shared/logs-show.h
818
819 libsystemd_logs_la_LIBADD = \
820         libsystemd-journal-internal.la \
821         libsystemd-id128-internal.la \
822         libsystemd-shared.la
823
824 # ------------------------------------------------------------------------------
825 noinst_LTLIBRARIES += \
826         libsystemd-capability.la
827
828 libsystemd_capability_la_SOURCES = \
829         src/shared/capability.c \
830         src/shared/capability.h
831
832 libsystemd_capability_la_CFLAGS = \
833         $(AM_CFLAGS) \
834         $(CAP_CFLAGS)
835
836 libsystemd_capability_la_LIBADD = \
837         $(CAP_LIBS)
838
839 # ------------------------------------------------------------------------------
840 noinst_LTLIBRARIES += \
841         libsystemd-audit.la
842
843 libsystemd_audit_la_SOURCES = \
844         src/shared/audit.c \
845         src/shared/audit.h
846
847 libsystemd_audit_la_LIBADD = \
848         libsystemd-capability.la
849
850 # ------------------------------------------------------------------------------
851 if HAVE_ACL
852 noinst_LTLIBRARIES += \
853         libsystemd-acl.la
854
855 libsystemd_acl_la_SOURCES = \
856         src/shared/acl-util.c \
857         src/shared/acl-util.h
858
859 libsystemd_acl_la_CFLAGS = \
860         $(AM_CFLAGS) \
861         $(ACL_CFLAGS)
862
863 libsystemd_acl_la_LIBADD = \
864         $(ACL_LIBS) \
865         libsystemd-shared.la
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-shared.la \
1022         libsystemd-dbus.la \
1023         libsystemd-audit.la \
1024         libsystemd-id128-internal.la \
1025         libsystemd-daemon.la \
1026         libudev.la \
1027         $(LIBWRAP_LIBS) \
1028         $(PAM_LIBS) \
1029         $(AUDIT_LIBS) \
1030         $(CAP_LIBS) \
1031         $(KMOD_LIBS)
1032
1033 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1034         $(AM_V_at)$(MKDIR_P) $(dir $@)
1035         $(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 ";" }' < $< > $@
1036
1037 EXTRA_DIST += \
1038         src/core/load-fragment-gperf.gperf.m4
1039
1040 CLEANFILES += \
1041         src/core/load-fragment-gperf.gperf \
1042         src/core/load-fragment-gperf.c \
1043         src/core/load-fragment-gperf-nulstr.c \
1044         src/core/syscall-list.txt \
1045         src/core/syscall-from-name.gperf
1046
1047 BUILT_SOURCES += \
1048         src/core/syscall-from-name.h \
1049         src/core/syscall-to-name.h
1050
1051 src/core/syscall-list.txt: Makefile
1052         $(AM_V_at)$(MKDIR_P) $(dir $@)
1053         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
1054
1055 src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
1056         $(AM_V_at)$(MKDIR_P) $(dir $@)
1057         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1058
1059 src/core/syscall-from-name.h: src/core/syscall-from-name.gperf Makefile
1060         $(AM_V_at)$(MKDIR_P) $(dir $@)
1061         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1062
1063 src/core/syscall-to-name.h: src/core/syscall-list.txt Makefile
1064         $(AM_V_at)$(MKDIR_P) $(dir $@)
1065         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1066
1067 # ------------------------------------------------------------------------------
1068 systemd_SOURCES = \
1069         src/core/main.c
1070
1071 systemd_CFLAGS = \
1072         $(AM_CFLAGS) \
1073         $(DBUS_CFLAGS)
1074
1075 systemd_LDADD = \
1076         libsystemd-core.la \
1077         libsystemd-daemon.la \
1078         libsystemd-id128-internal.la \
1079         libsystemd-dbus.la
1080
1081 dist_pkgsysconf_DATA += \
1082         src/core/system.conf \
1083         src/core/user.conf
1084
1085 dist_dbuspolicy_DATA += \
1086         src/core/org.freedesktop.systemd1.conf
1087
1088 dist_dbussystemservice_DATA += \
1089         src/core/org.freedesktop.systemd1.service
1090
1091 polkitpolicy_in_in_files += \
1092         src/core/org.freedesktop.systemd1.policy.in.in
1093
1094 pkgconfigdata_DATA = \
1095         src/core/systemd.pc
1096
1097 nodist_rpmmacros_DATA = \
1098         src/core/macros.systemd
1099
1100 EXTRA_DIST += \
1101         src/core/systemd.pc.in \
1102         src/core/macros.systemd.in
1103
1104 CLEANFILES += \
1105         src/core/macros.systemd \
1106         src/core/org.freedesktop.systemd1.policy.in
1107
1108 # ------------------------------------------------------------------------------
1109 manual_tests += \
1110         test-engine \
1111         test-ns \
1112         test-loopback \
1113         test-hostname \
1114         test-daemon \
1115         test-cgroup \
1116         test-install \
1117         test-watchdog \
1118         test-log
1119
1120 tests += \
1121         test-job-type \
1122         test-env-replace \
1123         test-strbuf \
1124         test-strv \
1125         test-path-util \
1126         test-strxcpyx \
1127         test-unit-name \
1128         test-unit-file \
1129         test-utf8 \
1130         test-ellipsize \
1131         test-util \
1132         test-namespace \
1133         test-date \
1134         test-sleep \
1135         test-replace-var \
1136         test-sched-prio \
1137         test-calendarspec \
1138         test-strip-tab-ansi \
1139         test-cgroup-util \
1140         test-prioq \
1141         test-fileio \
1142         test-time \
1143         test-hashmap \
1144         test-list \
1145         test-tables \
1146         test-device-nodes
1147
1148 EXTRA_DIST += \
1149         test/sched_idle_bad.service \
1150         test/sched_idle_ok.service \
1151         test/sched_rr_bad.service \
1152         test/sched_rr_ok.service \
1153         test/sched_rr_change.service
1154
1155 EXTRA_DIST += \
1156         src/test/test-helper.h
1157
1158 test_device_nodes_SOURCES = \
1159         src/test/test-device-nodes.c
1160
1161 test_device_nodes_LDADD = \
1162         libsystemd-shared.la
1163
1164 test_engine_SOURCES = \
1165         src/test/test-engine.c
1166
1167 test_engine_CFLAGS = \
1168         $(AM_CFLAGS) \
1169         $(DBUS_CFLAGS)
1170
1171 test_engine_LDADD = \
1172         libsystemd-core.la \
1173         libsystemd-daemon.la \
1174         libsystemd-dbus.la
1175
1176 test_job_type_SOURCES = \
1177         src/test/test-job-type.c
1178
1179 test_job_type_CFLAGS = \
1180         $(AM_CFLAGS) \
1181         $(DBUS_CFLAGS)
1182
1183 test_job_type_LDADD = \
1184         libsystemd-core.la \
1185         libsystemd-daemon.la
1186
1187 test_ns_SOURCES = \
1188         src/test/test-ns.c
1189
1190 test_ns_LDADD = \
1191         libsystemd-core.la
1192
1193 test_ns_CFLAGS = \
1194         $(AM_CFLAGS) \
1195         $(DBUS_CFLAGS)
1196
1197 test_loopback_SOURCES = \
1198         src/test/test-loopback.c
1199
1200 test_loopback_LDADD = \
1201         libsystemd-shared.la \
1202         libsystemd-core.la
1203
1204 test_hostname_SOURCES = \
1205         src/test/test-hostname.c
1206
1207 test_hostname_LDADD = \
1208         libsystemd-core.la
1209
1210 if ENABLE_EFI
1211 manual_tests += \
1212         test-boot-timestamp
1213
1214 test_boot_timestamp_SOURCES = \
1215         src/test/test-boot-timestamps.c
1216
1217 test_boot_timestamp_LDADD = \
1218         libsystemd-shared.la
1219 endif
1220
1221 test_unit_name_SOURCES = \
1222         src/test/test-unit-name.c
1223
1224 test_unit_name_CFLAGS = \
1225         $(AM_CFLAGS) \
1226         $(DBUS_CFLAGS)
1227
1228 test_unit_name_LDADD = \
1229         libsystemd-core.la
1230
1231 test_unit_file_SOURCES = \
1232         src/test/test-unit-file.c
1233
1234 test_unit_file_CFLAGS = \
1235         $(AM_CFLAGS) \
1236         $(DBUS_CFLAGS)
1237
1238 test_unit_file_LDADD = \
1239         libsystemd-core.la
1240
1241 test_utf8_SOURCES = \
1242         src/test/test-utf8.c
1243
1244 test_utf8_LDADD = \
1245         libsystemd-shared.la
1246
1247 test_util_SOURCES = \
1248         src/test/test-util.c
1249
1250 test_util_LDADD = \
1251         libsystemd-core.la
1252
1253 test_namespace_SOURCES = \
1254         src/test/test-namespace.c
1255
1256 test_namespace_LDADD = \
1257         libsystemd-core.la
1258
1259 test_hashmap_SOURCES = \
1260         src/test/test-hashmap.c
1261
1262 test_hashmap_LDADD = \
1263         libsystemd-core.la
1264
1265 test_list_SOURCES = \
1266         src/test/test-list.c
1267
1268 test_list_LDADD = \
1269         libsystemd-core.la
1270
1271 test_tables_SOURCES = \
1272         src/test/test-tables.c \
1273         src/shared/test-tables.h
1274
1275 test_tables_CFLAGS = \
1276         $(AM_CFLAGS) \
1277         $(DBUS_CFLAGS)
1278
1279 test_tables_LDADD = \
1280         libsystemd-core.la \
1281         libsystemd-logs.la
1282
1283 test_prioq_SOURCES = \
1284         src/test/test-prioq.c
1285
1286 test_prioq_LDADD = \
1287         libsystemd-core.la
1288
1289 test_fileio_SOURCES = \
1290         src/test/test-fileio.c
1291
1292 test_fileio_LDADD = \
1293         libsystemd-core.la
1294
1295 test_time_SOURCES = \
1296         src/test/test-time.c
1297
1298 test_time_LDADD = \
1299         libsystemd-core.la
1300
1301 test_log_SOURCES = \
1302         src/test/test-log.c
1303
1304 test_log_LDADD = \
1305         libsystemd-core.la
1306
1307 test_ellipsize_SOURCES = \
1308         src/test/test-ellipsize.c
1309
1310 test_ellipsize_LDADD = \
1311         libsystemd-core.la
1312
1313 test_date_SOURCES = \
1314         src/test/test-date.c
1315
1316 test_date_LDADD = \
1317         libsystemd-core.la
1318
1319 test_sleep_SOURCES = \
1320         src/test/test-sleep.c
1321
1322 test_sleep_LDADD = \
1323         libsystemd-core.la
1324
1325 test_replace_var_SOURCES = \
1326         src/test/test-replace-var.c
1327
1328 test_replace_var_LDADD = \
1329         libsystemd-shared.la
1330
1331 test_calendarspec_SOURCES = \
1332         src/test/test-calendarspec.c
1333
1334 test_calendarspec_LDADD = \
1335         libsystemd-shared.la
1336
1337 test_strip_tab_ansi_SOURCES = \
1338         src/test/test-strip-tab-ansi.c
1339
1340 test_strip_tab_ansi_LDADD = \
1341         libsystemd-shared.la
1342
1343 test_daemon_SOURCES = \
1344         src/test/test-daemon.c
1345
1346 test_daemon_LDADD = \
1347         libsystemd-shared.la \
1348         libsystemd-daemon.la
1349
1350 test_cgroup_SOURCES = \
1351         src/test/test-cgroup.c
1352
1353 test_cgroup_LDADD = \
1354         libsystemd-label.la \
1355         libsystemd-shared.la
1356
1357 test_cgroup_util_SOURCES = \
1358         src/test/test-cgroup-util.c
1359
1360 test_cgroup_util_LDADD = \
1361         libsystemd-label.la \
1362         libsystemd-shared.la \
1363         libsystemd-daemon.la
1364
1365 test_env_replace_SOURCES = \
1366         src/test/test-env-replace.c
1367
1368 test_env_replace_LDADD = \
1369         libsystemd-shared.la
1370
1371 test_strbuf_SOURCES = \
1372         src/test/test-strbuf.c
1373
1374 test_strbuf_LDADD = \
1375         libsystemd-shared.la
1376
1377 test_strv_SOURCES = \
1378         src/test/test-strv.c
1379
1380 test_strv_LDADD = \
1381         libsystemd-shared.la \
1382         libsystemd-units.la \
1383         libsystemd-id128-internal.la
1384
1385 test_path_util_SOURCES = \
1386         src/test/test-path-util.c
1387
1388 test_path_util_LDADD = \
1389         libsystemd-shared.la
1390
1391 test_strxcpyx_SOURCES = \
1392         src/test/test-strxcpyx.c
1393
1394 test_strxcpyx_LDADD = \
1395         libsystemd-shared.la
1396
1397 test_install_SOURCES = \
1398         src/test/test-install.c
1399
1400 test_install_CFLAGS = \
1401         $(AM_CFLAGS) \
1402         $(DBUS_CFLAGS)
1403
1404 test_install_LDADD = \
1405         libsystemd-units.la \
1406         libsystemd-label.la \
1407         libsystemd-shared.la \
1408         libsystemd-id128-internal.la
1409
1410 test_watchdog_SOURCES = \
1411         src/test/test-watchdog.c
1412
1413 test_watchdog_LDADD = \
1414         libsystemd-shared.la
1415
1416 test_sched_prio_SOURCES = \
1417         src/test/test-sched-prio.c
1418
1419 test_sched_prio_CFLAGS = \
1420         $(AM_CFLAGS) \
1421         $(DBUS_CFLAGS) \
1422         -D"STR(s)=\#s" -D"TEST_DIR=STR($(abs_top_srcdir)/test/)"
1423
1424 test_sched_prio_LDADD = \
1425         libsystemd-core.la \
1426         libsystemd-daemon.la
1427
1428 # ------------------------------------------------------------------------------
1429 ## .PHONY so it always rebuilds it
1430 .PHONY: coverage lcov-run lcov-report
1431
1432 # run lcov from scratch, always
1433 coverage:
1434         $(MAKE) lcov-run
1435         $(MAKE) lcov-report
1436
1437 coverage_dir = coverage
1438 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1439
1440 if ENABLE_COVERAGE
1441 # reset run coverage tests
1442 lcov-run:
1443         @rm -rf $(coverage_dir)
1444         lcov $(coverage_opts) --zerocounters
1445         -$(MAKE) check
1446
1447 # generate report based on current coverage data
1448 lcov-report:
1449         $(MKDIR_P) $(coverage_dir)
1450         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1451                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1452         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1453         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1454
1455 # lcov doesn't work properly with vpath builds, make sure that bad
1456 # output is not uploaded by mistake.
1457 coverage-sync: coverage
1458         test "$(builddir)" = "$(srcdir)"
1459         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1460
1461 else
1462 lcov-run lcov-report:
1463         echo "Need to reconfigure with --enable-coverage"
1464 endif
1465
1466 # ------------------------------------------------------------------------------
1467 systemd_analyze_SOURCES = \
1468         src/analyze/analyze.c
1469
1470 systemd_analyze_CFLAGS = \
1471         $(AM_CFLAGS) \
1472         $(DBUS_CFLAGS)
1473
1474 systemd_analyze_LDADD = \
1475         libsystemd-shared.la \
1476         libsystemd-bus.la
1477
1478 # ------------------------------------------------------------------------------
1479 systemd_initctl_SOURCES = \
1480         src/initctl/initctl.c
1481
1482 systemd_initctl_CFLAGS = \
1483         $(AM_CFLAGS) \
1484         $(DBUS_CFLAGS)
1485
1486 systemd_initctl_LDADD = \
1487         libsystemd-shared.la \
1488         libsystemd-daemon.la \
1489         libsystemd-bus.la
1490
1491 # ------------------------------------------------------------------------------
1492 systemd_update_utmp_SOURCES = \
1493         src/update-utmp/update-utmp.c
1494
1495 systemd_update_utmp_CFLAGS = \
1496         $(AM_CFLAGS) \
1497         $(DBUS_CFLAGS) \
1498         $(AUDIT_CFLAGS)
1499
1500 systemd_update_utmp_LDADD = \
1501         libsystemd-shared.la \
1502         libsystemd-bus.la \
1503         $(AUDIT_LIBS)
1504
1505 # ------------------------------------------------------------------------------
1506 systemd_shutdownd_SOURCES = \
1507         src/shutdownd/shutdownd.c
1508
1509 systemd_shutdownd_LDADD = \
1510         libsystemd-label.la \
1511         libsystemd-shared.la \
1512         libsystemd-daemon.la
1513
1514 pkginclude_HEADERS += \
1515         src/systemd/sd-shutdown.h
1516
1517 # ------------------------------------------------------------------------------
1518 systemd_shutdown_SOURCES = \
1519         src/core/umount.c \
1520         src/core/umount.h \
1521         src/core/shutdown.c \
1522         src/core/mount-setup.c \
1523         src/core/mount-setup.h \
1524         src/core/killall.h \
1525         src/core/killall.c
1526
1527 systemd_shutdown_LDADD = \
1528         libsystemd-label.la \
1529         libsystemd-shared.la \
1530         libudev.la
1531
1532 # ------------------------------------------------------------------------------
1533 if HAVE_KMOD
1534 systemd_modules_load_SOURCES = \
1535         src/modules-load/modules-load.c
1536
1537 systemd_modules_load_CFLAGS = \
1538         $(AM_CFLAGS) \
1539         $(KMOD_CFLAGS)
1540
1541 systemd_modules_load_LDADD = \
1542         libsystemd-shared.la \
1543         $(KMOD_LIBS)
1544
1545 rootlibexec_PROGRAMS += \
1546         systemd-modules-load
1547
1548 nodist_systemunit_DATA += \
1549         units/systemd-modules-load.service
1550
1551 SYSINIT_TARGET_WANTS += \
1552         systemd-modules-load.service
1553
1554 if ENABLE_TMPFILES
1555 nodist_systemunit_DATA += \
1556         units/kmod-static-nodes.service
1557
1558 SYSINIT_TARGET_WANTS += \
1559         kmod-static-nodes.service
1560 endif
1561 endif
1562
1563 EXTRA_DIST += \
1564         units/systemd-modules-load.service.in \
1565         units/kmod-static-nodes.service.in
1566
1567 # ------------------------------------------------------------------------------
1568 if ENABLE_TMPFILES
1569 systemd_tmpfiles_SOURCES = \
1570         src/tmpfiles/tmpfiles.c \
1571         src/shared/specifier.c \
1572         src/shared/specifier.h
1573
1574 systemd_tmpfiles_LDADD = \
1575         libsystemd-label.la \
1576         libsystemd-shared.la \
1577         libsystemd-capability.la \
1578         libsystemd-id128-internal.la
1579
1580 rootbin_PROGRAMS += \
1581         systemd-tmpfiles
1582
1583 dist_systemunit_DATA += \
1584         units/systemd-tmpfiles-clean.timer
1585
1586 nodist_systemunit_DATA += \
1587         units/systemd-tmpfiles-setup-dev.service \
1588         units/systemd-tmpfiles-setup.service \
1589         units/systemd-tmpfiles-clean.service
1590
1591 dist_tmpfiles_DATA = \
1592         tmpfiles.d/systemd.conf \
1593         tmpfiles.d/tmp.conf \
1594         tmpfiles.d/x11.conf
1595
1596 if HAVE_SYSV_COMPAT
1597 dist_tmpfiles_DATA += \
1598         tmpfiles.d/legacy.conf
1599 endif
1600
1601 SYSINIT_TARGET_WANTS += \
1602         systemd-tmpfiles-setup-dev.service \
1603         systemd-tmpfiles-setup.service
1604
1605 dist_zshcompletion_DATA += \
1606         shell-completion/zsh/_systemd-tmpfiles
1607
1608 TIMERS_TARGET_WANTS += \
1609         systemd-tmpfiles-clean.timer
1610
1611 INSTALL_DIRS += \
1612         $(tmpfilesdir) \
1613         $(sysconfdir)/tmpfiles.d
1614 endif
1615
1616 EXTRA_DIST += \
1617         units/systemd-tmpfiles-setup-dev.service.in \
1618         units/systemd-tmpfiles-setup.service.in \
1619         units/systemd-tmpfiles-clean.service.in
1620
1621 # ------------------------------------------------------------------------------
1622 systemd_machine_id_setup_SOURCES = \
1623         src/machine-id-setup/machine-id-setup-main.c \
1624         src/core/machine-id-setup.c \
1625         src/core/machine-id-setup.h
1626
1627 systemd_machine_id_setup_LDADD = \
1628         libsystemd-label.la \
1629         libsystemd-shared.la \
1630         libsystemd-id128-internal.la
1631
1632 # ------------------------------------------------------------------------------
1633 systemd_sysctl_SOURCES = \
1634         src/sysctl/sysctl.c
1635
1636 systemd_sysctl_LDADD = \
1637         libsystemd-shared.la
1638
1639 # ------------------------------------------------------------------------------
1640 systemd_sleep_SOURCES = \
1641         src/sleep/sleep.c
1642
1643 systemd_sleep_LDADD = \
1644         libsystemd-shared.la
1645
1646 # ------------------------------------------------------------------------------
1647 systemd_fsck_SOURCES = \
1648         src/fsck/fsck.c
1649
1650 systemd_fsck_CFLAGS = \
1651         $(AM_CFLAGS) \
1652         $(DBUS_CFLAGS)
1653
1654 systemd_fsck_LDADD = \
1655         libsystemd-shared.la \
1656         libsystemd-bus.la \
1657         libudev.la
1658
1659 # ------------------------------------------------------------------------------
1660 systemd_ac_power_SOURCES = \
1661         src/ac-power/ac-power.c
1662
1663 systemd_ac_power_LDADD = \
1664         libsystemd-shared.la \
1665         libudev.la
1666
1667 # ------------------------------------------------------------------------------
1668 systemd_detect_virt_SOURCES = \
1669         src/detect-virt/detect-virt.c
1670
1671 systemd_detect_virt_LDADD = \
1672         libsystemd-shared.la
1673
1674 systemd-detect-virt-install-hook:
1675         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1676
1677 INSTALL_EXEC_HOOKS += \
1678         systemd-detect-virt-install-hook
1679
1680 # ------------------------------------------------------------------------------
1681 systemd_delta_SOURCES = \
1682         src/delta/delta.c
1683
1684 systemd_delta_LDADD = \
1685         libsystemd-shared.la
1686
1687 # ------------------------------------------------------------------------------
1688 systemd_getty_generator_SOURCES = \
1689         src/getty-generator/getty-generator.c
1690
1691 systemd_getty_generator_LDADD = \
1692         libsystemd-label.la \
1693         libsystemd-shared.la
1694
1695 # ------------------------------------------------------------------------------
1696 systemd_fstab_generator_SOURCES = \
1697         src/fstab-generator/fstab-generator.c \
1698         src/core/mount-setup.c
1699
1700 systemd_fstab_generator_LDADD = \
1701         libsystemd-label.la \
1702         libsystemd-shared.la
1703
1704 # ------------------------------------------------------------------------------
1705 systemd_system_update_generator_SOURCES = \
1706         src/system-update-generator/system-update-generator.c
1707
1708 systemd_system_update_generator_LDADD = \
1709         libsystemd-label.la \
1710         libsystemd-shared.la
1711
1712 if ENABLE_EFI
1713 # ------------------------------------------------------------------------------
1714 systemgenerator_PROGRAMS +=  \
1715         systemd-efi-boot-generator
1716
1717 systemd_efi_boot_generator_SOURCES = \
1718         src/efi-boot-generator/efi-boot-generator.c
1719
1720 systemd_efi_boot_generator_LDADD = \
1721         libsystemd-label.la \
1722         libsystemd-shared.la
1723
1724 # ------------------------------------------------------------------------------
1725 bootctl_SOURCES = \
1726         src/boot/boot.h \
1727         src/boot/boot-loader.h \
1728         src/boot/bootctl.c \
1729         src/boot/boot-loader.c \
1730         src/boot/boot-efi.c
1731
1732 bootctl_LDADD = \
1733         libsystemd-shared.la \
1734         libsystemd-id128.la \
1735         libsystemd-daemon.la
1736
1737 bin_PROGRAMS += \
1738         bootctl
1739 endif
1740
1741 # ------------------------------------------------------------------------------
1742 if HAVE_BLKID
1743 systemgenerator_PROGRAMS +=  \
1744         systemd-gpt-auto-generator
1745
1746 systemd_gpt_auto_generator_SOURCES = \
1747         src/gpt-auto-generator/gpt-auto-generator.c
1748
1749 systemd_gpt_auto_generator_LDADD = \
1750         libsystemd-label.la \
1751         libsystemd-shared.la \
1752         libsystemd-id128-internal.la \
1753         libudev-private.la \
1754         $(BLKID_LIBS)
1755
1756 systemd_gpt_auto_generator_CFLAGS = \
1757         $(AM_CFLAGS) \
1758         $(BLKID_CFLAGS)
1759 endif
1760
1761 # ------------------------------------------------------------------------------
1762 systemd_rc_local_generator_SOURCES = \
1763         src/rc-local-generator/rc-local-generator.c
1764
1765 systemd_rc_local_generator_LDADD = \
1766         libsystemd-label.la \
1767         libsystemd-shared.la
1768
1769 # ------------------------------------------------------------------------------
1770 systemd_remount_fs_SOURCES = \
1771         src/remount-fs/remount-fs.c \
1772         src/core/mount-setup.c \
1773         src/core/mount-setup.h
1774
1775 systemd_remount_fs_LDADD = \
1776         libsystemd-label.la \
1777         libsystemd-shared.la
1778
1779 # ------------------------------------------------------------------------------
1780 systemd_cgroups_agent_SOURCES = \
1781         src/cgroups-agent/cgroups-agent.c
1782
1783 systemd_cgroups_agent_LDADD = \
1784         libsystemd-shared.la \
1785         libsystemd-bus.la
1786
1787 # ------------------------------------------------------------------------------
1788 systemctl_SOURCES = \
1789         src/systemctl/systemctl.c
1790
1791 systemctl_CFLAGS = \
1792         $(AM_CFLAGS) \
1793         $(DBUS_CFLAGS)
1794
1795 systemctl_LDADD = \
1796         libsystemd-units.la \
1797         libsystemd-label.la \
1798         libsystemd-shared.la \
1799         libsystemd-daemon.la \
1800         libsystemd-dbus.la \
1801         libsystemd-logs.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-shared.la \
1810         libsystemd-daemon.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-shared.la \
1853         libsystemd-daemon.la \
1854         libsystemd-id128-internal.la \
1855         libsystemd-bus.la
1856
1857 # ------------------------------------------------------------------------------
1858 systemd_run_SOURCES = \
1859         src/run/run.c
1860
1861 systemd_run_LDADD = \
1862         libsystemd-label.la \
1863         libsystemd-capability.la \
1864         libsystemd-shared.la \
1865         libsystemd-daemon.la \
1866         libsystemd-id128-internal.la \
1867         libsystemd-bus.la
1868
1869 # ------------------------------------------------------------------------------
1870 systemd_stdio_bridge_SOURCES = \
1871         src/stdio-bridge/stdio-bridge.c
1872
1873 systemd_stdio_bridge_LDADD = \
1874         libsystemd-shared.la \
1875         libsystemd-bus.la \
1876         libsystemd-daemon.la
1877
1878 # ------------------------------------------------------------------------------
1879 systemd_tty_ask_password_agent_SOURCES = \
1880         src/tty-ask-password-agent/tty-ask-password-agent.c
1881
1882 systemd_tty_ask_password_agent_LDADD = \
1883         libsystemd-label.la \
1884         libsystemd-shared.la
1885
1886 # ------------------------------------------------------------------------------
1887 libsystemd_daemon_la_SOURCES = \
1888         src/libsystemd-daemon/sd-daemon.c
1889
1890 libsystemd_daemon_internal_la_SOURCES = \
1891         $(libsystemd_daemon_la_SOURCES)
1892
1893 libsystemd_daemon_la_CFLAGS = \
1894         $(AM_CFLAGS) \
1895         -fvisibility=hidden \
1896         -DSD_EXPORT_SYMBOLS
1897
1898 libsystemd_daemon_la_LDFLAGS = \
1899         $(AM_LDFLAGS) \
1900         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1901         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1902
1903 libsystemd_daemon_la_LIBADD =  \
1904         $(RT_LIBS)
1905
1906 pkginclude_HEADERS += \
1907         src/systemd/sd-daemon.h
1908
1909 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1910 libsystemd-daemon-install-hook:
1911         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
1912
1913 libsystemd-daemon-uninstall-hook:
1914         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1915
1916 INSTALL_EXEC_HOOKS += libsystemd-daemon-install-hook
1917 UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
1918
1919 lib_LTLIBRARIES += \
1920         libsystemd-daemon.la
1921
1922 noinst_LTLIBRARIES += \
1923         libsystemd-daemon-internal.la
1924
1925 pkgconfiglib_DATA += \
1926         src/libsystemd-daemon/libsystemd-daemon.pc
1927
1928 EXTRA_DIST += \
1929         src/libsystemd-daemon/libsystemd-daemon.pc.in \
1930         src/libsystemd-daemon/libsystemd-daemon.sym
1931
1932 # ------------------------------------------------------------------------------
1933 libsystemd_bus_la_SOURCES = \
1934         src/systemd/sd-bus.h \
1935         src/systemd/sd-bus-protocol.h \
1936         src/systemd/sd-bus-vtable.h \
1937         src/systemd/sd-memfd.h \
1938         src/systemd/sd-event.h \
1939         src/libsystemd-bus/sd-bus.c \
1940         src/libsystemd-bus/bus-control.c \
1941         src/libsystemd-bus/bus-control.h \
1942         src/libsystemd-bus/bus-error.c \
1943         src/libsystemd-bus/bus-error.h \
1944         src/libsystemd-bus/bus-internal.c \
1945         src/libsystemd-bus/bus-internal.h \
1946         src/libsystemd-bus/bus-socket.c \
1947         src/libsystemd-bus/bus-socket.h \
1948         src/libsystemd-bus/bus-kernel.c \
1949         src/libsystemd-bus/bus-kernel.h \
1950         src/libsystemd-bus/bus-container.c \
1951         src/libsystemd-bus/bus-container.h \
1952         src/libsystemd-bus/bus-message.c \
1953         src/libsystemd-bus/bus-message.h \
1954         src/libsystemd-bus/bus-signature.c \
1955         src/libsystemd-bus/bus-signature.h \
1956         src/libsystemd-bus/bus-type.c \
1957         src/libsystemd-bus/bus-type.h \
1958         src/libsystemd-bus/bus-match.c \
1959         src/libsystemd-bus/bus-match.h \
1960         src/libsystemd-bus/bus-bloom.c \
1961         src/libsystemd-bus/bus-bloom.h \
1962         src/libsystemd-bus/bus-introspect.c \
1963         src/libsystemd-bus/bus-introspect.h \
1964         src/libsystemd-bus/bus-objects.c \
1965         src/libsystemd-bus/bus-objects.h \
1966         src/libsystemd-bus/bus-convenience.c \
1967         src/libsystemd-bus/kdbus.h \
1968         src/libsystemd-bus/sd-memfd.c \
1969         src/libsystemd-bus/sd-event.c \
1970         src/libsystemd-bus/bus-util.c \
1971         src/libsystemd-bus/bus-util.h \
1972         src/libsystemd-bus/event-util.h
1973
1974 libsystemd_bus_la_LIBADD =  \
1975         libsystemd-id128-internal.la \
1976         libsystemd-shared.la \
1977         libsystemd-daemon.la
1978
1979 libsystemd_bus_la_CFLAGS = \
1980         $(AM_CFLAGS) \
1981         -pthread
1982
1983 noinst_LTLIBRARIES += \
1984         libsystemd-bus.la
1985
1986 tests += \
1987         test-bus-marshal \
1988         test-bus-signature \
1989         test-bus-chat \
1990         test-bus-server \
1991         test-bus-match \
1992         test-bus-kernel \
1993         test-bus-kernel-bloom \
1994         test-bus-kernel-benchmark \
1995         test-bus-memfd \
1996         test-bus-zero-copy \
1997         test-bus-introspect \
1998         test-bus-objects \
1999         test-event
2000
2001 noinst_PROGRAMS += \
2002         busctl
2003
2004 test_bus_marshal_SOURCES = \
2005         src/libsystemd-bus/test-bus-marshal.c
2006
2007 test_bus_marshal_LDADD = \
2008         libsystemd-shared.la \
2009         libsystemd-bus.la \
2010         $(GLIB_LIBS) \
2011         $(DBUS_LIBS)
2012
2013 test_bus_marshal_CFLAGS = \
2014         $(AM_CFLAGS) \
2015         $(GLIB_CFLAGS) \
2016         $(DBUS_CFLAGS)
2017
2018 test_bus_signature_SOURCES = \
2019         src/libsystemd-bus/test-bus-signature.c
2020
2021 test_bus_signature_LDADD = \
2022         libsystemd-shared.la \
2023         libsystemd-bus.la
2024
2025 test_bus_chat_SOURCES = \
2026         src/libsystemd-bus/test-bus-chat.c
2027
2028 test_bus_chat_CFLAGS = \
2029         $(AM_CFLAGS) \
2030         -pthread
2031
2032 test_bus_chat_LDADD = \
2033         libsystemd-shared.la \
2034         libsystemd-bus.la \
2035         libsystemd-id128-internal.la
2036
2037 test_bus_server_SOURCES = \
2038         src/libsystemd-bus/test-bus-server.c
2039
2040 test_bus_server_CFLAGS = \
2041         $(AM_CFLAGS) \
2042         -pthread
2043
2044 test_bus_server_LDADD = \
2045         libsystemd-shared.la \
2046         libsystemd-bus.la \
2047         libsystemd-id128-internal.la
2048
2049 test_bus_objects_SOURCES = \
2050         src/libsystemd-bus/test-bus-objects.c
2051
2052 test_bus_objects_CFLAGS = \
2053         $(AM_CFLAGS) \
2054         -pthread
2055
2056 test_bus_objects_LDADD = \
2057         libsystemd-shared.la \
2058         libsystemd-bus.la \
2059         libsystemd-id128-internal.la
2060
2061 test_bus_match_SOURCES = \
2062         src/libsystemd-bus/test-bus-match.c
2063
2064 test_bus_match_LDADD = \
2065         libsystemd-shared.la \
2066         libsystemd-bus.la \
2067         libsystemd-id128-internal.la
2068
2069 test_bus_kernel_SOURCES = \
2070         src/libsystemd-bus/test-bus-kernel.c
2071
2072 test_bus_kernel_LDADD = \
2073         libsystemd-shared.la \
2074         libsystemd-bus.la \
2075         libsystemd-id128-internal.la
2076
2077 test_bus_kernel_bloom_SOURCES = \
2078         src/libsystemd-bus/test-bus-kernel-bloom.c
2079
2080 test_bus_kernel_bloom_LDADD = \
2081         libsystemd-shared.la \
2082         libsystemd-bus.la \
2083         libsystemd-id128-internal.la
2084
2085 test_bus_kernel_benchmark_SOURCES = \
2086         src/libsystemd-bus/test-bus-kernel-benchmark.c
2087
2088 test_bus_kernel_benchmark_LDADD = \
2089         libsystemd-shared.la \
2090         libsystemd-bus.la \
2091         libsystemd-id128-internal.la
2092
2093 test_bus_memfd_SOURCES = \
2094         src/libsystemd-bus/test-bus-memfd.c
2095
2096 test_bus_memfd_LDADD = \
2097         libsystemd-shared.la \
2098         libsystemd-bus.la
2099
2100 test_bus_zero_copy_SOURCES = \
2101         src/libsystemd-bus/test-bus-zero-copy.c
2102
2103 test_bus_zero_copy_LDADD = \
2104         libsystemd-shared.la \
2105         libsystemd-bus.la
2106
2107 test_bus_introspect_SOURCES = \
2108         src/libsystemd-bus/test-bus-introspect.c
2109
2110 test_bus_introspect_LDADD = \
2111         libsystemd-shared.la \
2112         libsystemd-bus.la
2113
2114 test_event_SOURCES = \
2115         src/libsystemd-bus/test-event.c
2116
2117 test_event_LDADD = \
2118         libsystemd-shared.la \
2119         libsystemd-bus.la \
2120         libsystemd-id128-internal.la
2121
2122 busctl_SOURCES = \
2123         src/libsystemd-bus/busctl.c
2124
2125 busctl_LDADD = \
2126         libsystemd-shared.la \
2127         libsystemd-bus.la
2128
2129 # ------------------------------------------------------------------------------
2130 if ENABLE_GTK_DOC
2131 SUBDIRS += \
2132         docs/libudev
2133
2134 noinst_DATA += \
2135         docs/html/libudev \
2136         docs/html/gudev
2137 endif
2138
2139 include_HEADERS += \
2140         src/libudev/libudev.h
2141
2142 lib_LTLIBRARIES += \
2143         libudev.la
2144
2145 libudev_la_SOURCES =\
2146         src/libudev/libudev-private.h \
2147         src/libudev/libudev.c \
2148         src/libudev/libudev-list.c \
2149         src/libudev/libudev-util.c \
2150         src/libudev/libudev-device.c \
2151         src/libudev/libudev-enumerate.c \
2152         src/libudev/libudev-monitor.c \
2153         src/libudev/libudev-queue.c \
2154         src/libudev/libudev-hwdb-def.h \
2155         src/libudev/libudev-hwdb.c
2156
2157 libudev_la_CFLAGS = \
2158         $(AM_CFLAGS) \
2159         -fvisibility=hidden
2160
2161 libudev_la_LDFLAGS = \
2162         $(AM_LDFLAGS) \
2163         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2164         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2165
2166 libudev_la_LIBADD = \
2167         libsystemd-shared.la \
2168         libsystemd-daemon-internal.la \
2169         libsystemd-id128-internal.la
2170
2171 pkgconfiglib_DATA += \
2172         src/libudev/libudev.pc
2173
2174 EXTRA_DIST += \
2175         src/libudev/libudev.pc.in \
2176         src/libudev/libudev.sym
2177
2178 CLEANFILES += \
2179         src/libudev/libudev.pc \
2180         docs/html/libudev \
2181         docs/html/gudev
2182
2183 docs/html/libudev:
2184         $(AM_V_at)$(MKDIR_P) $(dir $@)
2185         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2186
2187 docs/html/gudev:
2188         $(AM_V_at)$(MKDIR_P) $(dir $@)
2189         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2190
2191 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2192 libudev-install-hook:
2193         libname=libudev.so && $(move-to-rootlibdir)
2194
2195 libudev-uninstall-hook:
2196         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2197
2198 INSTALL_EXEC_HOOKS += libudev-install-hook
2199 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2200
2201 # ------------------------------------------------------------------------------
2202 noinst_LTLIBRARIES += \
2203         libudev-private.la
2204
2205 libudev_private_la_SOURCES =\
2206         $(libudev_la_SOURCES) \
2207         src/libudev/libudev-device-private.c \
2208         src/libudev/libudev-queue-private.c
2209
2210 libudev_private_la_CFLAGS = \
2211         $(AM_CFLAGS) \
2212         -fvisibility=default
2213
2214 libudev_private_la_LIBADD = \
2215         libsystemd-shared.la
2216
2217 # ------------------------------------------------------------------------------
2218 INSTALL_DIRS += \
2219         $(sysconfdir)/udev/rules.d \
2220         $(sysconfdir)/udev/hwdb.d
2221
2222 dist_network_DATA = \
2223         network/99-default.link
2224
2225 dist_udevrules_DATA += \
2226         rules/99-systemd.rules \
2227         rules/42-usb-hid-pm.rules \
2228         rules/50-udev-default.rules \
2229         rules/60-keyboard.rules \
2230         rules/60-persistent-storage-tape.rules \
2231         rules/60-persistent-serial.rules \
2232         rules/60-persistent-input.rules \
2233         rules/60-persistent-alsa.rules \
2234         rules/60-persistent-storage.rules \
2235         rules/64-btrfs.rules \
2236         rules/75-net-description.rules \
2237         rules/75-tty-description.rules \
2238         rules/78-sound-card.rules \
2239         rules/80-net-setup-link.rules \
2240         rules/95-udev-late.rules
2241
2242 dist_udevhwdb_DATA = \
2243         hwdb/20-pci-vendor-model.hwdb \
2244         hwdb/20-pci-classes.hwdb \
2245         hwdb/20-usb-vendor-model.hwdb \
2246         hwdb/20-usb-classes.hwdb \
2247         hwdb/20-bluetooth-vendor-product.hwdb \
2248         hwdb/20-acpi-vendor.hwdb \
2249         hwdb/20-OUI.hwdb \
2250         hwdb/60-keyboard.hwdb
2251
2252 udevconfdir = $(sysconfdir)/udev
2253 dist_udevconf_DATA = \
2254         src/udev/udev.conf
2255
2256 sharepkgconfigdir = $(datadir)/pkgconfig
2257 sharepkgconfig_DATA = \
2258         src/udev/udev.pc
2259
2260 EXTRA_DIST += \
2261         rules/99-systemd.rules.in \
2262         src/udev/udev.pc.in
2263
2264 CLEANFILES += \
2265         rules/99-systemd.rules \
2266         src/udev/udev.pc
2267
2268 EXTRA_DIST += \
2269         units/systemd-udevd.service.in \
2270         units/systemd-udev-trigger.service.in \
2271         units/systemd-udev-settle.service.in
2272
2273 CLEANFILES += \
2274         units/systemd-udevd.service \
2275         units/systemd-udev-trigger.service \
2276         units/systemd-udev-settle.service
2277
2278 SOCKETS_TARGET_WANTS += \
2279         systemd-udevd-control.socket \
2280         systemd-udevd-kernel.socket
2281 SYSINIT_TARGET_WANTS += \
2282         systemd-udevd.service \
2283         systemd-udev-trigger.service
2284
2285 rootbin_PROGRAMS += \
2286         udevadm
2287
2288 rootlibexec_PROGRAMS += \
2289         systemd-udevd
2290
2291 noinst_LTLIBRARIES += \
2292         libudev-core.la
2293
2294 src/udev/keyboard-keys.txt: Makefile
2295         $(AM_V_at)$(MKDIR_P) $(dir $@)
2296         $(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/' > $@
2297
2298 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt Makefile
2299         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2300
2301 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf Makefile
2302         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2303
2304 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt Makefile
2305         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2306
2307 libudev_core_la_SOURCES = \
2308         src/udev/udev.h \
2309         src/udev/udev-event.c \
2310         src/udev/udev-watch.c \
2311         src/udev/udev-node.c \
2312         src/udev/udev-rules.c \
2313         src/udev/udev-ctrl.c \
2314         src/udev/udev-builtin.c \
2315         src/udev/udev-builtin-btrfs.c \
2316         src/udev/udev-builtin-hwdb.c \
2317         src/udev/udev-builtin-input_id.c \
2318         src/udev/udev-builtin-keyboard.c \
2319         src/udev/udev-builtin-net_id.c \
2320         src/udev/udev-builtin-net_setup_link.c \
2321         src/udev/udev-builtin-path_id.c \
2322         src/udev/udev-builtin-usb_id.c \
2323         src/udev/net/link-config.h \
2324         src/udev/net/link-config.c \
2325         src/udev/net/link-config-parse.c \
2326         src/udev/net/ethtool-util.h \
2327         src/udev/net/ethtool-util.c
2328
2329 nodist_libudev_core_la_SOURCES = \
2330         src/udev/keyboard-keys-from-name.h \
2331         src/udev/keyboard-keys-to-name.h \
2332         src/udev/net/link-config-gperf.c
2333
2334 BUILT_SOURCES += \
2335         $(nodist_libudev_core_la_SOURCES)
2336
2337 CLEANFILES += \
2338         src/udev/keyboard-keys-from-name.gperf \
2339         src/udev/keyboard-keys.txt \
2340         src/udev/net/link-config-gperf.c
2341
2342 EXTRA_DIST += \
2343         src/udev/net/link-config-gperf.gperf
2344
2345 libudev_core_la_CFLAGS = \
2346         $(AM_CFLAGS) \
2347         $(BLKID_CFLAGS) \
2348         $(KMOD_CFLAGS)
2349
2350 libudev_core_la_LIBADD = \
2351         libudev-private.la \
2352         libsystemd-label.la \
2353         libsystemd-daemon-internal.la \
2354         libsystemd-shared.la \
2355         libsystemd-rtnl.la \
2356         libsystemd-id128-internal.la \
2357         $(BLKID_LIBS) \
2358         $(KMOD_LIBS)
2359
2360 libudev_core_la_CPPFLAGS = \
2361         $(AM_CPPFLAGS) \
2362         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2363
2364 if ENABLE_FIRMWARE
2365 libudev_core_la_SOURCES += \
2366         src/udev/udev-builtin-firmware.c
2367
2368 dist_udevrules_DATA += \
2369         rules/50-firmware.rules
2370 endif
2371
2372 if HAVE_KMOD
2373 libudev_core_la_SOURCES += \
2374         src/udev/udev-builtin-kmod.c
2375
2376 dist_udevrules_DATA += \
2377         rules/80-drivers.rules
2378 endif
2379
2380 if HAVE_BLKID
2381 libudev_core_la_SOURCES += \
2382         src/udev/udev-builtin-blkid.c
2383 endif
2384
2385 if HAVE_ACL
2386 libudev_core_la_SOURCES += \
2387         src/udev/udev-builtin-uaccess.c \
2388         src/login/logind-acl.c \
2389         src/login/sd-login.c \
2390         src/systemd/sd-login.h \
2391         src/login/login-shared.c \
2392         src/login/login-shared.h
2393
2394 libudev_core_la_LIBADD += \
2395         libsystemd-acl.la
2396 endif
2397
2398 systemd_udevd_SOURCES = \
2399         src/udev/udevd.c
2400
2401 systemd_udevd_LDADD = \
2402         libudev-core.la
2403
2404 udevadm_SOURCES = \
2405         src/udev/udevadm.c \
2406         src/udev/udevadm-info.c \
2407         src/udev/udevadm-control.c \
2408         src/udev/udevadm-monitor.c \
2409         src/udev/udevadm-hwdb.c \
2410         src/udev/udevadm-settle.c \
2411         src/udev/udevadm-trigger.c \
2412         src/udev/udevadm-test.c \
2413         src/udev/udevadm-test-builtin.c
2414
2415 udevadm_LDADD = \
2416         libudev-core.la \
2417         libsystemd-label.la \
2418         libsystemd-shared.la
2419
2420 # Update hwdb on installation. Do not bother if installing
2421 # in DESTDIR, since this is likely for packaging purposes.
2422 hwdb-update-hook:
2423         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2424
2425 INSTALL_DATA_HOOKS += \
2426         hwdb-update-hook
2427
2428 hwdb-remove-hook:
2429         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2430
2431 # ------------------------------------------------------------------------------
2432 TESTS += \
2433         test/udev-test.pl \
2434         test/rules-test.sh
2435
2436 manual_tests += \
2437         test-libudev \
2438         test-udev
2439
2440 test_libudev_SOURCES = \
2441         src/test/test-libudev.c
2442
2443 test_libudev_LDADD = \
2444         libsystemd-label.la \
2445         libsystemd-shared.la \
2446         libudev.la
2447
2448 test_udev_SOURCES = \
2449         src/test/test-udev.c
2450
2451 test_udev_LDADD = \
2452         libudev-core.la \
2453         libsystemd-shared.la \
2454         $(BLKID_LIBS) \
2455         $(KMOD_LIBS) \
2456         $(SELINUX_LIBS)
2457
2458 if HAVE_ACL
2459 test_udev_LDADD += \
2460         libsystemd-acl.la
2461 endif
2462
2463 check_DATA += \
2464         test/sys
2465
2466 # packed sysfs test tree
2467 test/sys:
2468         $(AM_V_at)$(MKDIR_P) $(dir $@)
2469         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2470
2471 test-sys-distclean:
2472         -rm -rf test/sys
2473 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2474
2475 EXTRA_DIST += \
2476         test/sys.tar.xz \
2477         test/udev-test.pl \
2478         test/rules-test.sh \
2479         test/rule-syntax-check.py
2480
2481 # ------------------------------------------------------------------------------
2482 ata_id_SOURCES = \
2483         src/udev/ata_id/ata_id.c
2484
2485 ata_id_LDADD = \
2486         libudev-private.la \
2487         libsystemd-shared.la
2488
2489 udevlibexec_PROGRAMS += \
2490         ata_id
2491
2492 # ------------------------------------------------------------------------------
2493 cdrom_id_SOURCES = \
2494         src/udev/cdrom_id/cdrom_id.c
2495
2496 cdrom_id_LDADD = \
2497         libudev.la \
2498         libsystemd-shared.la
2499
2500 udevlibexec_PROGRAMS += \
2501         cdrom_id
2502
2503 dist_udevrules_DATA += \
2504         rules/60-cdrom_id.rules
2505
2506 # ------------------------------------------------------------------------------
2507 collect_SOURCES = \
2508         src/udev/collect/collect.c
2509
2510 collect_LDADD = \
2511         libudev-private.la
2512
2513 udevlibexec_PROGRAMS += \
2514         collect
2515
2516 # ------------------------------------------------------------------------------
2517 scsi_id_SOURCES =\
2518         src/udev/scsi_id/scsi_id.c \
2519         src/udev/scsi_id/scsi_serial.c \
2520         src/udev/scsi_id/scsi.h \
2521         src/udev/scsi_id/scsi_id.h
2522
2523 scsi_id_LDADD = \
2524         libudev-private.la \
2525         libsystemd-shared.la
2526
2527 udevlibexec_PROGRAMS += \
2528         scsi_id
2529
2530 EXTRA_DIST += \
2531         src/udev/scsi_id/README
2532
2533 # ------------------------------------------------------------------------------
2534 v4l_id_SOURCES = \
2535         src/udev/v4l_id/v4l_id.c
2536
2537 v4l_id_LDADD = \
2538         libudev.la
2539
2540 udevlibexec_PROGRAMS += \
2541         v4l_id
2542
2543 dist_udevrules_DATA += \
2544         rules/60-persistent-v4l.rules
2545
2546 # ------------------------------------------------------------------------------
2547 accelerometer_SOURCES = \
2548         src/udev/accelerometer/accelerometer.c
2549
2550 accelerometer_LDADD = \
2551         libudev.la -lm \
2552         libsystemd-shared.la
2553
2554 udevlibexec_PROGRAMS += \
2555         accelerometer
2556
2557 dist_udevrules_DATA += \
2558         rules/61-accelerometer.rules
2559
2560 # ------------------------------------------------------------------------------
2561 if ENABLE_GUDEV
2562 if ENABLE_GTK_DOC
2563 SUBDIRS += \
2564         docs/gudev
2565 endif
2566
2567 libgudev_includedir = \
2568         $(includedir)/gudev-1.0/gudev
2569
2570 libgudev_include_HEADERS = \
2571         src/gudev/gudev.h \
2572         src/gudev/gudevenums.h \
2573         src/gudev/gudevenumtypes.h \
2574         src/gudev/gudevtypes.h \
2575         src/gudev/gudevclient.h \
2576         src/gudev/gudevdevice.h \
2577         src/gudev/gudevenumerator.h
2578
2579 lib_LTLIBRARIES += libgudev-1.0.la
2580
2581 pkgconfiglib_DATA += \
2582         src/gudev/gudev-1.0.pc
2583
2584 CLEANFILES += \
2585         src/gudev/gudev-1.0.pc
2586
2587 libgudev_1_0_la_SOURCES = \
2588         src/gudev/gudevenums.h \
2589         src/gudev/gudevenumtypes.h \
2590         src/gudev/gudevenumtypes.h\
2591         src/gudev/gudevtypes.h \
2592         src/gudev/gudevclient.h \
2593         src/gudev/gudevclient.c \
2594         src/gudev/gudevdevice.h \
2595         src/gudev/gudevdevice.c \
2596         src/gudev/gudevenumerator.h \
2597         src/gudev/gudevenumerator.c \
2598         src/gudev/gudevprivate.h
2599
2600 nodist_libgudev_1_0_la_SOURCES = \
2601         src/gudev/gudevmarshal.h \
2602         src/gudev/gudevmarshal.c \
2603         src/gudev/gudevenumtypes.h \
2604         src/gudev/gudevenumtypes.c
2605
2606 BUILT_SOURCES += \
2607         $(nodist_libgudev_1_0_la_SOURCES)
2608
2609 libgudev_1_0_la_CPPFLAGS = \
2610         $(AM_CPPFLAGS) \
2611         -I$(top_builddir)/src\
2612         -I$(top_srcdir)/src\
2613         -I$(top_builddir)/src/gudev \
2614         -I$(top_srcdir)/src/gudev \
2615         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2616         -D_GUDEV_COMPILATION \
2617         -DG_LOG_DOMAIN=\"GUdev\"
2618
2619 libgudev_1_0_la_CFLAGS = \
2620         $(AM_CFLAGS) \
2621         -fvisibility=default \
2622         $(GLIB_CFLAGS)
2623
2624 libgudev_1_0_la_LIBADD = \
2625         libudev.la \
2626         $(GLIB_LIBS)
2627
2628 libgudev_1_0_la_LDFLAGS = \
2629         $(AM_LDFLAGS) \
2630         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2631         -export-dynamic -no-undefined \
2632         -export-symbols-regex '^g_udev_.*'
2633
2634 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2635         $(AM_V_at)$(MKDIR_P) $(dir $@)
2636         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2637
2638 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2639         $(AM_V_at)$(MKDIR_P) $(dir $@)
2640         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2641         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2642
2643 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2644         $(AM_V_at)$(MKDIR_P) $(dir $@)
2645         $(AM_V_GEN)glib-mkenums --template $^ > $@
2646
2647 if HAVE_INTROSPECTION
2648 -include $(INTROSPECTION_MAKEFILE)
2649
2650 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2651
2652 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2653
2654 src_gudev_GUdev_1_0_gir_CFLAGS = \
2655         $(AM_CFLAGS) \
2656         $(INCLUDES) \
2657         -D_GUDEV_COMPILATION \
2658         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2659         -I$(top_srcdir)/src \
2660         -I$(top_builddir)/src \
2661         -I$(top_srcdir)/src/gudev \
2662         -I$(top_builddir)/src/gudev
2663
2664 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2665
2666 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2667         --pkg-export=gudev-1.0 \
2668         --warn-all
2669
2670 src_gudev_GUdev_1_0_gir_FILES = \
2671         src/gudev/gudev.h \
2672         src/gudev/gudevtypes.h \
2673         src/gudev/gudevenums.h \
2674         src/gudev/gudevenumtypes.h \
2675         src/gudev/gudevclient.h \
2676         src/gudev/gudevdevice.h \
2677         src/gudev/gudevenumerator.h \
2678         src/gudev/gudevclient.c \
2679         src/gudev/gudevdevice.c \
2680         src/gudev/gudevenumerator.c
2681
2682 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2683 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2684
2685 girdir = $(datadir)/gir-1.0
2686 gir_DATA = \
2687         src/gudev/GUdev-1.0.gir
2688
2689 typelibsdir = $(libdir)/girepository-1.0
2690 typelibs_DATA = \
2691         src/gudev/GUdev-1.0.typelib
2692
2693 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2694 endif # HAVE_INTROSPECTION
2695
2696 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2697 libgudev-install-hook:
2698         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2699
2700 libgudev-uninstall-hook:
2701         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2702
2703 INSTALL_EXEC_HOOKS += libgudev-install-hook
2704 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2705 endif
2706
2707 EXTRA_DIST += \
2708         src/gudev/gudev-1.0.pc.in \
2709         src/gudev/gudevmarshal.list \
2710         src/gudev/gudevenumtypes.h.template \
2711         src/gudev/gudevenumtypes.c.template \
2712         src/gudev/gjs-example.js \
2713         src/gudev/seed-example-enum.js \
2714         src/gudev/seed-example.js
2715
2716 # ------------------------------------------------------------------------------
2717 mtd_probe_SOURCES =  \
2718         src/udev/mtd_probe/mtd_probe.c \
2719         src/udev/mtd_probe/mtd_probe.h \
2720         src/udev/mtd_probe/probe_smartmedia.c
2721
2722 mtd_probe_CPPFLAGS = \
2723         $(AM_CPPFLAGS)
2724
2725 dist_udevrules_DATA += \
2726         rules/75-probe_mtd.rules
2727
2728 udevlibexec_PROGRAMS += \
2729         mtd_probe
2730
2731 # ------------------------------------------------------------------------------
2732 libsystemd_id128_la_SOURCES = \
2733         src/libsystemd-id128/sd-id128.c
2734
2735 libsystemd_id128_la_CFLAGS = \
2736         $(AM_CFLAGS) \
2737         -fvisibility=hidden
2738
2739 libsystemd_id128_la_LDFLAGS = \
2740         $(AM_LDFLAGS) \
2741         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2742         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2743
2744 libsystemd_id128_la_LIBADD = \
2745         libsystemd-shared.la
2746
2747 libsystemd_id128_internal_la_SOURCES = \
2748         $(libsystemd_id128_la_SOURCES)
2749
2750 test_id128_SOURCES = \
2751         src/test/test-id128.c
2752
2753 test_id128_LDADD = \
2754         libsystemd-shared.la \
2755         libsystemd-id128-internal.la \
2756         libsystemd-daemon.la
2757
2758 tests += \
2759         test-id128
2760
2761 pkginclude_HEADERS += \
2762         src/systemd/sd-id128.h
2763
2764 lib_LTLIBRARIES += \
2765         libsystemd-id128.la
2766
2767 noinst_LTLIBRARIES += \
2768         libsystemd-id128-internal.la
2769
2770 pkgconfiglib_DATA += \
2771         src/libsystemd-id128/libsystemd-id128.pc
2772
2773 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2774 libsystemd-id128-install-hook:
2775         libname=libsystemd-id128.so && $(move-to-rootlibdir)
2776
2777 libsystemd-id128-uninstall-hook:
2778         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
2779
2780 INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
2781 UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
2782
2783 EXTRA_DIST += \
2784         src/libsystemd-id128/libsystemd-id128.pc.in \
2785         src/libsystemd-id128/libsystemd-id128.sym
2786
2787 # ------------------------------------------------------------------------------
2788
2789 rootlibexec_PROGRAMS += \
2790         systemd-activate
2791
2792 systemd_activate_SOURCES = \
2793         src/activate/activate.c
2794
2795 systemd_activate_LDADD = \
2796         libsystemd-shared.la \
2797         libsystemd-daemon.la
2798
2799 # ------------------------------------------------------------------------------
2800 systemd_journald_SOURCES = \
2801         src/journal/journald.c \
2802         src/journal/journald-server.h
2803
2804 systemd_journald_LDADD = \
2805         libsystemd-journal-internal.la \
2806         libsystemd-shared.la \
2807         libsystemd-id128-internal.la
2808
2809 systemd_cat_SOURCES = \
2810         src/journal/cat.c
2811
2812 systemd_cat_LDADD = \
2813         libsystemd-shared.la \
2814         libsystemd-journal-internal.la
2815
2816 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
2817 journalctl_CFLAGS = \
2818         $(AM_CFLAGS)
2819
2820 journalctl_SOURCES = \
2821         src/journal/journalctl.c
2822
2823 journalctl_LDADD = \
2824         libsystemd-shared.la \
2825         libsystemd-journal-internal.la \
2826         libsystemd-id128-internal.la \
2827         libsystemd-logs.la
2828
2829 if HAVE_ACL
2830 journalctl_LDADD += \
2831         libsystemd-acl.la
2832 endif
2833
2834 if HAVE_QRENCODE
2835 journalctl_SOURCES += \
2836         src/journal/journal-qrcode.c \
2837         src/journal/journal-qrcode.h
2838
2839 journalctl_CFLAGS += \
2840         $(QRENCODE_CFLAGS)
2841
2842 journalctl_LDADD += \
2843         $(QRENCODE_LIBS)
2844 endif
2845
2846 test_journal_SOURCES = \
2847         src/journal/test-journal.c
2848
2849 test_journal_LDADD = \
2850         libsystemd-shared.la \
2851         libsystemd-journal-internal.la \
2852         libsystemd-id128-internal.la
2853
2854 test_journal_send_SOURCES = \
2855         src/journal/test-journal-send.c
2856
2857 test_journal_send_LDADD = \
2858         libsystemd-shared.la \
2859         libsystemd-journal-internal.la \
2860         libsystemd-id128-internal.la
2861
2862 test_journal_syslog_SOURCES = \
2863         src/journal/test-journal-syslog.c
2864
2865 test_journal_syslog_LDADD = \
2866         libsystemd-journal-internal.la \
2867         libsystemd-shared.la \
2868         libsystemd-id128-internal.la
2869
2870 test_journal_match_SOURCES = \
2871         src/journal/test-journal-match.c
2872
2873 test_journal_match_LDADD = \
2874         libsystemd-shared.la \
2875         libsystemd-journal-internal.la \
2876         libsystemd-id128-internal.la
2877
2878 test_journal_enum_SOURCES = \
2879         src/journal/test-journal-enum.c
2880
2881 test_journal_enum_LDADD = \
2882         libsystemd-shared.la \
2883         libsystemd-journal-internal.la \
2884         libsystemd-id128-internal.la
2885
2886 test_journal_stream_SOURCES = \
2887         src/journal/test-journal-stream.c
2888
2889 test_journal_stream_LDADD = \
2890         libsystemd-shared.la \
2891         libsystemd-journal-internal.la \
2892         libsystemd-id128-internal.la
2893
2894 test_journal_init_SOURCES = \
2895         src/journal/test-journal-init.c
2896
2897 test_journal_init_LDADD = \
2898         libsystemd-shared.la \
2899         libsystemd-daemon-internal.la \
2900         $(RT_LIBS) \
2901         libsystemd-journal.la
2902
2903 test_journal_verify_SOURCES = \
2904         src/journal/test-journal-verify.c
2905
2906 test_journal_verify_LDADD = \
2907         libsystemd-shared.la \
2908         libsystemd-journal-internal.la \
2909         libsystemd-id128-internal.la
2910
2911 test_journal_interleaving_SOURCES = \
2912         src/journal/test-journal-interleaving.c
2913
2914 test_journal_interleaving_LDADD = \
2915         libsystemd-shared.la \
2916         libsystemd-journal-internal.la \
2917         libsystemd-id128-internal.la
2918
2919 test_mmap_cache_SOURCES = \
2920         src/journal/test-mmap-cache.c
2921
2922 test_mmap_cache_LDADD = \
2923         libsystemd-shared.la \
2924         libsystemd-journal-internal.la
2925
2926 test_catalog_SOURCES = \
2927         src/journal/test-catalog.c
2928
2929 test_catalog_CFLAGS = \
2930         $(AM_CFLAGS) \
2931         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
2932
2933 test_catalog_LDADD = \
2934         libsystemd-shared.la \
2935         libsystemd-label.la \
2936         libsystemd-journal-internal.la \
2937         libsystemd-id128-internal.la
2938
2939 libsystemd_journal_la_SOURCES = \
2940         src/journal/sd-journal.c \
2941         src/systemd/sd-journal.h \
2942         src/systemd/_sd-common.h \
2943         src/journal/journal-file.c \
2944         src/journal/journal-file.h \
2945         src/journal/journal-vacuum.c \
2946         src/journal/journal-vacuum.h \
2947         src/journal/journal-verify.c \
2948         src/journal/journal-verify.h \
2949         src/journal/lookup3.c \
2950         src/journal/lookup3.h \
2951         src/journal/journal-send.c \
2952         src/journal/journal-def.h \
2953         src/journal/compress.h \
2954         src/journal/catalog.c \
2955         src/journal/catalog.h \
2956         src/journal/mmap-cache.c \
2957         src/journal/mmap-cache.h
2958
2959 libsystemd_journal_la_CFLAGS = \
2960         $(AM_CFLAGS) \
2961         -fvisibility=hidden
2962
2963 libsystemd_journal_la_LDFLAGS = \
2964         $(AM_LDFLAGS) \
2965         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
2966         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
2967
2968 libsystemd_journal_la_LIBADD = \
2969         libsystemd-shared.la \
2970         libsystemd-label.la \
2971         libsystemd-daemon-internal.la \
2972         $(RT_LIBS) \
2973         libsystemd-id128-internal.la
2974
2975 libsystemd_journal_internal_la_SOURCES = \
2976         $(libsystemd_journal_la_SOURCES) \
2977         src/journal/journald-kmsg.c \
2978         src/journal/journald-kmsg.h \
2979         src/journal/journald-syslog.c \
2980         src/journal/journald-syslog.h \
2981         src/journal/journald-stream.c \
2982         src/journal/journald-stream.h \
2983         src/journal/journald-server.c \
2984         src/journal/journald-server.h \
2985         src/journal/journald-console.c \
2986         src/journal/journald-console.h \
2987         src/journal/journald-native.c \
2988         src/journal/journald-native.h \
2989         src/journal/journald-rate-limit.c \
2990         src/journal/journald-rate-limit.h \
2991         src/journal/journal-internal.h
2992
2993 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
2994 libsystemd_journal_internal_la_CFLAGS = \
2995         $(AM_CFLAGS)
2996
2997 libsystemd_journal_internal_la_LIBADD = \
2998         libsystemd-audit.la \
2999         libsystemd-daemon.la \
3000         libudev.la \
3001         libsystemd-shared.la \
3002         libsystemd-label.la
3003
3004 nodist_libsystemd_journal_internal_la_SOURCES = \
3005         src/journal/journald-gperf.c
3006
3007 if ENABLE_LOGIND
3008 libsystemd_journal_internal_la_LIBADD += \
3009         libsystemd-login-internal.la
3010 endif
3011
3012 if HAVE_ACL
3013 libsystemd_journal_internal_la_LIBADD += \
3014         libsystemd-acl.la
3015 endif
3016
3017 if HAVE_XZ
3018 libsystemd_journal_la_SOURCES += \
3019         src/journal/compress.c
3020
3021 libsystemd_journal_la_CFLAGS += \
3022         $(XZ_CFLAGS)
3023
3024 libsystemd_journal_la_LIBADD += \
3025         $(XZ_LIBS)
3026
3027 libsystemd_journal_internal_la_CFLAGS += \
3028         $(XZ_CFLAGS)
3029
3030 libsystemd_journal_internal_la_LIBADD += \
3031         $(XZ_LIBS)
3032
3033 endif
3034
3035 if HAVE_GCRYPT
3036 libsystemd_journal_la_SOURCES += \
3037         src/journal/journal-authenticate.c \
3038         src/journal/journal-authenticate.h \
3039         src/journal/fsprg.c \
3040         src/journal/fsprg.h
3041
3042 libsystemd_journal_la_CFLAGS += \
3043         $(GCRYPT_CFLAGS) \
3044         -Wno-pointer-arith
3045
3046 libsystemd_journal_la_LIBADD += \
3047         $(GCRYPT_LIBS)
3048
3049 libsystemd_journal_internal_la_CFLAGS += \
3050         $(GCRYPT_CFLAGS) \
3051         -Wno-pointer-arith
3052
3053 libsystemd_journal_internal_la_LIBADD += \
3054         $(GCRYPT_LIBS)
3055 endif
3056
3057 # move lib from $(libdir) to $(rootlibdir) and update devel link, if
3058 # needed. Also, grant read access to new journal files to members of
3059 # "adm" and "wheel".
3060 libsystemd-journal-install-hook:
3061         libname=libsystemd-journal.so && $(move-to-rootlibdir)
3062         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3063         -chown 0:0 $(DESTDIR)/var/log/journal
3064         -chmod 755 $(DESTDIR)/var/log/journal
3065         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3066         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3067
3068 libsystemd-journal-uninstall-hook:
3069         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
3070
3071 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
3072 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
3073
3074 # ------------------------------------------------------------------------------
3075
3076 # Update catalog on installation. Do not bother if installing
3077 # in DESTDIR, since this is likely for packaging purposes.
3078 catalog-update-hook:
3079         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3080
3081 INSTALL_DATA_HOOKS += \
3082         catalog-update-hook
3083
3084 catalog-remove-hook:
3085         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3086
3087 UNINSTALL_DATA_HOOKS += \
3088         catalog-remove-hook
3089
3090 manual_tests += \
3091         test-journal-enum
3092
3093 tests += \
3094         test-journal \
3095         test-journal-send \
3096         test-journal-syslog \
3097         test-journal-match \
3098         test-journal-stream \
3099         test-journal-init \
3100         test-journal-verify \
3101         test-journal-interleaving \
3102         test-mmap-cache \
3103         test-catalog
3104
3105 pkginclude_HEADERS += \
3106         src/systemd/sd-journal.h \
3107         src/systemd/sd-messages.h \
3108         src/systemd/_sd-common.h
3109
3110 lib_LTLIBRARIES += \
3111         libsystemd-journal.la
3112
3113 noinst_LTLIBRARIES += \
3114         libsystemd-journal-internal.la
3115
3116 rootlibexec_PROGRAMS += \
3117         systemd-journald
3118
3119 rootbin_PROGRAMS += \
3120         journalctl
3121
3122 bin_PROGRAMS += \
3123         systemd-cat
3124
3125 dist_systemunit_DATA += \
3126         units/systemd-journald.socket
3127
3128 nodist_systemunit_DATA += \
3129         units/systemd-journald.service \
3130         units/systemd-journal-flush.service
3131
3132 dist_pkgsysconf_DATA += \
3133         src/journal/journald.conf
3134
3135 pkgconfiglib_DATA += \
3136         src/journal/libsystemd-journal.pc
3137
3138 dist_catalog_DATA = \
3139         catalog/systemd.catalog
3140
3141 SOCKETS_TARGET_WANTS += \
3142         systemd-journald.socket
3143 SYSINIT_TARGET_WANTS += \
3144         systemd-journald.service \
3145         systemd-journal-flush.service
3146
3147 EXTRA_DIST += \
3148         src/journal/libsystemd-journal.pc.in \
3149         src/journal/libsystemd-journal.sym \
3150         units/systemd-journald.service.in \
3151         units/systemd-journal-flush.service.in \
3152         src/journal/journald-gperf.gperf
3153
3154 CLEANFILES += \
3155         src/journal/journald-gperf.c
3156
3157 # ------------------------------------------------------------------------------
3158 if HAVE_MICROHTTPD
3159 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3160
3161 rootlibexec_PROGRAMS += \
3162         systemd-journal-gatewayd
3163
3164 systemd_journal_gatewayd_SOURCES = \
3165         src/journal/journal-gatewayd.c \
3166         src/journal/microhttpd-util.h \
3167         src/journal/microhttpd-util.c
3168
3169 systemd_journal_gatewayd_LDADD = \
3170         libsystemd-shared.la \
3171         libsystemd-logs.la \
3172         libsystemd-journal-internal.la \
3173         libsystemd-id128-internal.la \
3174         libsystemd-daemon.la \
3175         libsystemd-bus.la \
3176         $(MICROHTTPD_LIBS)
3177
3178 systemd_journal_gatewayd_CFLAGS = \
3179         $(AM_CFLAGS) \
3180         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
3181         $(MICROHTTPD_CFLAGS)
3182
3183 dist_systemunit_DATA += \
3184         units/systemd-journal-gatewayd.socket
3185
3186 nodist_systemunit_DATA += \
3187         units/systemd-journal-gatewayd.service
3188
3189 dist_gatewayddocumentroot_DATA = \
3190         src/journal/browse.html
3191
3192 endif
3193
3194 EXTRA_DIST += \
3195         units/systemd-journal-gatewayd.service.in
3196
3197 # ------------------------------------------------------------------------------
3198
3199 systemd_socket_proxyd_SOURCES = \
3200         src/socket-proxy/socket-proxyd.c
3201
3202 systemd_socket_proxyd_LDADD = \
3203         libsystemd-shared.la \
3204         libsystemd-logs.la \
3205         libsystemd-journal-internal.la \
3206         libsystemd-id128-internal.la \
3207         libsystemd-daemon.la \
3208         libsystemd-bus.la
3209
3210 # ------------------------------------------------------------------------------
3211 if ENABLE_COREDUMP
3212 systemd_coredump_SOURCES = \
3213         src/journal/coredump.c
3214
3215 systemd_coredump_LDADD = \
3216         libsystemd-journal-internal.la \
3217         libsystemd-label.la \
3218         libsystemd-shared.la
3219
3220 if ENABLE_LOGIND
3221 systemd_coredump_LDADD += \
3222         libsystemd-login-internal.la
3223 endif
3224
3225 rootlibexec_PROGRAMS += \
3226         systemd-coredump
3227
3228 systemd_coredumpctl_SOURCES = \
3229         src/journal/coredumpctl.c
3230
3231 systemd_coredumpctl_LDADD = \
3232         libsystemd-shared.la \
3233         libsystemd-journal.la \
3234         libsystemd-journal-internal.la \
3235         libsystemd-id128-internal.la
3236
3237 bin_PROGRAMS += \
3238         systemd-coredumpctl
3239
3240 dist_bashcompletion_DATA += \
3241         shell-completion/bash/systemd-coredumpctl
3242
3243 dist_zshcompletion_DATA += \
3244         shell-completion/zsh/_systemd-coredumpctl
3245
3246 sysctl_DATA = \
3247         sysctl.d/50-coredump.conf
3248
3249 CLEANFILES += \
3250         sysctl.d/50-coredump.conf
3251 endif
3252
3253 EXTRA_DIST += \
3254         sysctl.d/50-coredump.conf.in
3255
3256 # ------------------------------------------------------------------------------
3257 if ENABLE_BINFMT
3258 systemd_binfmt_SOURCES = \
3259         src/binfmt/binfmt.c
3260
3261 systemd_binfmt_LDADD = \
3262         libsystemd-shared.la
3263
3264 rootlibexec_PROGRAMS += \
3265         systemd-binfmt
3266
3267 dist_systemunit_DATA += \
3268         units/proc-sys-fs-binfmt_misc.automount \
3269         units/proc-sys-fs-binfmt_misc.mount
3270
3271 nodist_systemunit_DATA += \
3272         units/systemd-binfmt.service
3273
3274 INSTALL_DIRS += \
3275         $(prefix)/lib/binfmt.d \
3276         $(sysconfdir)/binfmt.d
3277
3278 SYSINIT_TARGET_WANTS += \
3279         systemd-binfmt.service \
3280         proc-sys-fs-binfmt_misc.automount
3281
3282 endif
3283
3284 EXTRA_DIST += \
3285         units/systemd-binfmt.service.in
3286
3287 # ------------------------------------------------------------------------------
3288 if ENABLE_VCONSOLE
3289 systemd_vconsole_setup_SOURCES = \
3290         src/vconsole/vconsole-setup.c
3291
3292 systemd_vconsole_setup_LDADD = \
3293         libsystemd-shared.la
3294
3295 rootlibexec_PROGRAMS += \
3296         systemd-vconsole-setup
3297
3298 nodist_systemunit_DATA += \
3299         units/systemd-vconsole-setup.service
3300
3301 SYSINIT_TARGET_WANTS += \
3302         systemd-vconsole-setup.service
3303 endif
3304
3305 EXTRA_DIST += \
3306         units/systemd-vconsole-setup.service.in
3307
3308 # ------------------------------------------------------------------------------
3309 if ENABLE_READAHEAD
3310 systemd_readahead_SOURCES = \
3311         src/readahead/readahead.c \
3312         src/readahead/readahead-collect.c \
3313         src/readahead/readahead-replay.c \
3314         src/readahead/readahead-analyze.c \
3315         src/readahead/readahead-common.c \
3316         src/readahead/readahead-common.h
3317
3318 systemd_readahead_LDADD = \
3319         libsystemd-shared.la \
3320         libsystemd-daemon.la \
3321         libudev.la
3322
3323 dist_doc_DATA += \
3324         src/readahead/sd-readahead.c \
3325         src/systemd/sd-readahead.h
3326
3327 rootlibexec_PROGRAMS += \
3328         systemd-readahead
3329
3330 dist_systemunit_DATA += \
3331         units/systemd-readahead-drop.service \
3332         units/systemd-readahead-done.timer
3333
3334 nodist_systemunit_DATA += \
3335         units/systemd-readahead-collect.service \
3336         units/systemd-readahead-replay.service \
3337         units/systemd-readahead-done.service
3338
3339 endif
3340
3341 EXTRA_DIST += \
3342         units/systemd-readahead-collect.service.in \
3343         units/systemd-readahead-replay.service.in \
3344         units/systemd-readahead-done.service.in
3345
3346 # ------------------------------------------------------------------------------
3347 if ENABLE_BOOTCHART
3348 systemd_bootchart_SOURCES = \
3349         src/bootchart/bootchart.c \
3350         src/bootchart/bootchart.h \
3351         src/bootchart/store.c \
3352         src/bootchart/store.h \
3353         src/bootchart/svg.c \
3354         src/bootchart/svg.h
3355
3356 systemd_bootchart_LDADD = \
3357         libsystemd-shared.la \
3358         libsystemd-journal.la
3359
3360 rootlibexec_PROGRAMS += \
3361         systemd-bootchart
3362
3363 dist_pkgsysconf_DATA += \
3364         src/bootchart/bootchart.conf
3365 endif
3366
3367 # ------------------------------------------------------------------------------
3368 if ENABLE_QUOTACHECK
3369 rootlibexec_PROGRAMS += \
3370         systemd-quotacheck
3371
3372 nodist_systemunit_DATA += \
3373         units/systemd-quotacheck.service
3374
3375 systemd_quotacheck_SOURCES = \
3376         src/quotacheck/quotacheck.c
3377
3378 systemd_quotacheck_LDADD = \
3379         libsystemd-shared.la
3380 endif
3381
3382 EXTRA_DIST += \
3383         units/systemd-quotacheck.service.in
3384
3385 nodist_systemunit_DATA += \
3386         units/quotaon.service
3387
3388 # ------------------------------------------------------------------------------
3389 if ENABLE_RANDOMSEED
3390 rootlibexec_PROGRAMS += \
3391         systemd-random-seed
3392
3393 nodist_systemunit_DATA += \
3394         units/systemd-random-seed.service
3395
3396 systemd_random_seed_SOURCES = \
3397         src/random-seed/random-seed.c
3398
3399 systemd_random_seed_LDADD = \
3400         libsystemd-label.la \
3401         libsystemd-shared.la
3402
3403 SYSINIT_TARGET_WANTS += \
3404         systemd-random-seed.service
3405
3406 endif
3407
3408 EXTRA_DIST += \
3409         units/systemd-random-seed.service.in
3410
3411 # ------------------------------------------------------------------------------
3412 if ENABLE_BACKLIGHT
3413 rootlibexec_PROGRAMS += \
3414         systemd-backlight
3415
3416 nodist_systemunit_DATA += \
3417         units/systemd-backlight@.service
3418
3419 systemd_backlight_SOURCES = \
3420         src/backlight/backlight.c
3421
3422 systemd_backlight_LDADD = \
3423         libsystemd-label.la \
3424         libsystemd-shared.la \
3425         libudev-private.la
3426 endif
3427
3428 EXTRA_DIST += \
3429         units/systemd-backlight@.service.in
3430
3431 # ------------------------------------------------------------------------------
3432 if ENABLE_RFKILL
3433 rootlibexec_PROGRAMS += \
3434         systemd-rfkill
3435
3436 nodist_systemunit_DATA += \
3437         units/systemd-rfkill@.service
3438
3439 systemd_rfkill_SOURCES = \
3440         src/rfkill/rfkill.c
3441
3442 systemd_rfkill_LDADD = \
3443         libsystemd-label.la \
3444         libsystemd-shared.la \
3445         libudev-private.la
3446 endif
3447
3448 EXTRA_DIST += \
3449         units/systemd-rfkill@.service.in
3450
3451 # ------------------------------------------------------------------------------
3452 if HAVE_LIBCRYPTSETUP
3453 rootlibexec_PROGRAMS += \
3454         systemd-cryptsetup
3455
3456 systemgenerator_PROGRAMS += \
3457         systemd-cryptsetup-generator
3458
3459 dist_systemunit_DATA += \
3460         units/cryptsetup.target
3461
3462 systemd_cryptsetup_SOURCES = \
3463         src/cryptsetup/cryptsetup.c
3464
3465 systemd_cryptsetup_CFLAGS = \
3466         $(AM_CFLAGS) \
3467         $(LIBCRYPTSETUP_CFLAGS)
3468
3469 systemd_cryptsetup_LDADD = \
3470         libsystemd-label.la \
3471         libsystemd-shared.la \
3472         libudev.la \
3473         $(LIBCRYPTSETUP_LIBS)
3474
3475 systemd_cryptsetup_generator_SOURCES = \
3476         src/cryptsetup/cryptsetup-generator.c
3477
3478 systemd_cryptsetup_generator_LDADD = \
3479         libsystemd-label.la \
3480         libsystemd-shared.la
3481
3482 SYSINIT_TARGET_WANTS += \
3483         cryptsetup.target
3484
3485 endif
3486
3487 # ------------------------------------------------------------------------------
3488 if ENABLE_HOSTNAMED
3489 systemd_hostnamed_SOURCES = \
3490         src/hostname/hostnamed.c
3491
3492 systemd_hostnamed_LDADD = \
3493         libsystemd-label.la \
3494         libsystemd-shared.la \
3495         libsystemd-daemon.la \
3496         libsystemd-bus.la
3497
3498 rootlibexec_PROGRAMS += \
3499         systemd-hostnamed
3500
3501 nodist_systemunit_DATA += \
3502         units/systemd-hostnamed.service
3503
3504 dist_dbuspolicy_DATA += \
3505         src/hostname/org.freedesktop.hostname1.conf
3506
3507 dist_dbussystemservice_DATA += \
3508         src/hostname/org.freedesktop.hostname1.service
3509
3510 polkitpolicy_files += \
3511         src/hostname/org.freedesktop.hostname1.policy
3512
3513 SYSTEM_UNIT_ALIASES += \
3514         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3515
3516 hostnamectl_SOURCES = \
3517         src/hostname/hostnamectl.c
3518
3519 hostnamectl_CFLAGS = \
3520         $(AM_CFLAGS) \
3521         $(DBUS_CFLAGS)
3522
3523 hostnamectl_LDADD = \
3524         libsystemd-shared.la \
3525         libsystemd-dbus.la \
3526         libsystemd-id128-internal.la
3527
3528 bin_PROGRAMS += \
3529         hostnamectl
3530
3531 dist_bashcompletion_DATA += \
3532         shell-completion/bash/hostnamectl
3533
3534 dist_zshcompletion_DATA += \
3535         shell-completion/zsh/_hostnamectl
3536
3537 endif
3538
3539 polkitpolicy_in_files += \
3540         src/hostname/org.freedesktop.hostname1.policy.in
3541
3542 EXTRA_DIST += \
3543         units/systemd-hostnamed.service.in
3544
3545 # ------------------------------------------------------------------------------
3546 if ENABLE_LOCALED
3547 systemd_localed_SOURCES = \
3548         src/locale/localed.c
3549
3550 systemd_localed_LDADD = \
3551         libsystemd-label.la \
3552         libsystemd-shared.la \
3553         libsystemd-daemon.la \
3554         libsystemd-bus.la
3555
3556 nodist_systemunit_DATA += \
3557         units/systemd-localed.service
3558
3559 rootlibexec_PROGRAMS += \
3560         systemd-localed
3561
3562 dist_dbuspolicy_DATA += \
3563         src/locale/org.freedesktop.locale1.conf
3564
3565 dist_dbussystemservice_DATA += \
3566         src/locale/org.freedesktop.locale1.service
3567
3568 polkitpolicy_files += \
3569         src/locale/org.freedesktop.locale1.policy
3570
3571 SYSTEM_UNIT_ALIASES += \
3572         systemd-localed.service dbus-org.freedesktop.locale1.service
3573
3574 dist_pkgdata_DATA += \
3575         src/locale/kbd-model-map
3576
3577 dist_noinst_SCRIPT = \
3578         src/locale/generate-kbd-model-map
3579
3580 update-kbd-model-map: src/locale/generate-kbd-model-map
3581         $PYTHON $< > src/locale/kbd-model-map
3582
3583 localectl_SOURCES = \
3584         src/locale/localectl.c
3585
3586 localectl_CFLAGS = \
3587         $(AM_CFLAGS) \
3588         $(DBUS_CFLAGS)
3589
3590 localectl_LDADD = \
3591         libsystemd-shared.la \
3592         libsystemd-dbus.la \
3593         libsystemd-id128-internal.la
3594
3595 bin_PROGRAMS += \
3596         localectl
3597
3598 dist_bashcompletion_DATA += \
3599         shell-completion/bash/localectl
3600
3601 dist_zshcompletion_DATA += \
3602         shell-completion/zsh/_localectl
3603
3604 endif
3605
3606 polkitpolicy_in_files += \
3607         src/locale/org.freedesktop.locale1.policy.in
3608
3609 EXTRA_DIST += \
3610         units/systemd-localed.service.in
3611
3612 # ------------------------------------------------------------------------------
3613 if ENABLE_TIMEDATED
3614 systemd_timedated_SOURCES = \
3615         src/timedate/timedated.c
3616
3617 systemd_timedated_LDADD = \
3618         libsystemd-label.la \
3619         libsystemd-shared.la \
3620         libsystemd-daemon.la \
3621         libsystemd-bus.la
3622
3623 rootlibexec_PROGRAMS += \
3624         systemd-timedated
3625
3626 dist_dbussystemservice_DATA += \
3627         src/timedate/org.freedesktop.timedate1.service
3628
3629 dist_dbuspolicy_DATA += \
3630         src/timedate/org.freedesktop.timedate1.conf
3631
3632 nodist_systemunit_DATA += \
3633         units/systemd-timedated.service
3634
3635 polkitpolicy_files += \
3636         src/timedate/org.freedesktop.timedate1.policy
3637
3638 INSTALL_DIRS += \
3639         $(prefix)/lib/systemd/ntp-units.d \
3640         $(sysconfdir)/systemd/ntp-units.d
3641
3642 SYSTEM_UNIT_ALIASES += \
3643         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3644
3645 timedatectl_SOURCES = \
3646         src/timedate/timedatectl.c
3647
3648 timedatectl_CFLAGS = \
3649         $(AM_CFLAGS) \
3650         $(DBUS_CFLAGS)
3651
3652 timedatectl_LDADD = \
3653         libsystemd-shared.la \
3654         libsystemd-dbus.la
3655
3656 bin_PROGRAMS += \
3657         timedatectl
3658
3659 dist_bashcompletion_DATA += \
3660         shell-completion/bash/timedatectl
3661
3662 dist_zshcompletion_DATA += \
3663         shell-completion/zsh/_timedatectl
3664 endif
3665
3666 polkitpolicy_in_files += \
3667         src/timedate/org.freedesktop.timedate1.policy.in
3668
3669 EXTRA_DIST += \
3670         units/systemd-timedated.service.in
3671
3672 # ------------------------------------------------------------------------------
3673 if HAVE_MYHOSTNAME
3674 libnss_myhostname_la_SOURCES = \
3675         src/nss-myhostname/nss-myhostname.c \
3676         src/nss-myhostname/ifconf.h \
3677         src/nss-myhostname/netlink.c
3678
3679 libnss_myhostname_la_LDFLAGS = \
3680         $(AM_LDFLAGS) \
3681         -module \
3682         -export-dynamic \
3683         -avoid-version \
3684         -shared \
3685         -shrext .so.2
3686
3687 lib_LTLIBRARIES += \
3688         libnss_myhostname.la
3689 endif
3690
3691 # ------------------------------------------------------------------------------
3692 if ENABLE_MACHINED
3693 systemd_machined_SOURCES = \
3694         src/machine/machined.c \
3695         src/machine/machined.h
3696
3697 systemd_machined_LDADD = \
3698         libsystemd-machine-core.la \
3699         $(libsystemd_machine_core_la_LIBADD)
3700
3701 rootlibexec_PROGRAMS += \
3702         systemd-machined
3703
3704 libsystemd_machine_core_la_SOURCES = \
3705         src/machine/machined-dbus.c \
3706         src/machine/machine.c \
3707         src/machine/machine.h \
3708         src/machine/machine-dbus.c
3709
3710 libsystemd_machine_core_la_LIBADD = \
3711         libsystemd-label.la \
3712         libsystemd-audit.la \
3713         libsystemd-shared.la \
3714         libsystemd-daemon.la \
3715         libsystemd-bus.la \
3716         libsystemd-id128-internal.la \
3717         libudev.la
3718
3719 noinst_LTLIBRARIES += \
3720         libsystemd-machine-core.la
3721
3722 machinectl_SOURCES = \
3723         src/machine/machinectl.c
3724
3725 machinectl_CFLAGS = \
3726         $(AM_CFLAGS) \
3727         $(DBUS_CFLAGS)
3728
3729 machinectl_LDADD = \
3730         libsystemd-shared.la \
3731         libsystemd-bus.la
3732
3733 rootbin_PROGRAMS += \
3734         machinectl
3735
3736 test_machine_tables_SOURCES = \
3737         src/machine/test-machine-tables.c
3738
3739 test_machine_tables_LDADD = \
3740         libsystemd-machine-core.la
3741
3742 tests += \
3743         test-machine-tables
3744
3745 nodist_systemunit_DATA += \
3746         units/systemd-machined.service
3747
3748 dist_systemunit_DATA += \
3749         units/machine.slice
3750
3751 dist_dbussystemservice_DATA += \
3752         src/machine/org.freedesktop.machine1.service
3753
3754 dist_dbuspolicy_DATA += \
3755         src/machine/org.freedesktop.machine1.conf
3756
3757 dist_zshcompletion_DATA += \
3758         shell-completion/zsh/_machinectl
3759
3760 SYSTEM_UNIT_ALIASES += \
3761         systemd-machined.service dbus-org.freedesktop.machine1.service
3762
3763 EXTRA_DIST += \
3764         units/systemd-machined.service.in
3765
3766 endif
3767
3768 # ------------------------------------------------------------------------------
3769 if ENABLE_LOGIND
3770 systemd_logind_SOURCES = \
3771         src/login/logind.c \
3772         src/login/logind.h
3773
3774 nodist_systemd_logind_SOURCES = \
3775         src/login/logind-gperf.c
3776
3777 systemd_logind_CFLAGS = \
3778         $(libsystemd_logind_core_la_CFLAGS)
3779
3780 systemd_logind_LDADD = \
3781         libsystemd-logind-core.la \
3782         $(libsystemd_logind_core_la_LIBADD)
3783
3784 libsystemd_logind_core_la_SOURCES = \
3785         src/login/logind-core.c \
3786         src/login/logind-dbus.c \
3787         src/login/logind-device.c \
3788         src/login/logind-device.h \
3789         src/login/logind-button.c \
3790         src/login/logind-button.h \
3791         src/login/logind-action.c \
3792         src/login/logind-action.h \
3793         src/login/logind-seat.c \
3794         src/login/logind-seat.h \
3795         src/login/logind-session.c \
3796         src/login/logind-session.h \
3797         src/login/logind-session-device.c \
3798         src/login/logind-session-device.h \
3799         src/login/logind-user.c \
3800         src/login/logind-user.h \
3801         src/login/logind-inhibit.c \
3802         src/login/logind-inhibit.h \
3803         src/login/logind-session-dbus.c \
3804         src/login/logind-seat-dbus.c \
3805         src/login/logind-user-dbus.c \
3806         src/login/logind-acl.h \
3807         src/login/login-shared.c \
3808         src/login/login-shared.h
3809
3810 libsystemd_logind_core_la_CFLAGS = \
3811         $(AM_CFLAGS) \
3812         $(DBUS_CFLAGS)
3813
3814 libsystemd_logind_core_la_LIBADD = \
3815         libsystemd-label.la \
3816         libsystemd-audit.la \
3817         libsystemd-shared.la \
3818         libsystemd-daemon.la \
3819         libsystemd-dbus.la \
3820         libsystemd-id128-internal.la \
3821         libudev.la
3822
3823 if HAVE_ACL
3824 libsystemd_logind_core_la_SOURCES += \
3825         src/login/logind-acl.c
3826
3827 libsystemd_logind_core_la_LIBADD += \
3828         libsystemd-acl.la
3829 endif
3830
3831 noinst_LTLIBRARIES += \
3832         libsystemd-logind-core.la
3833
3834 systemd_user_sessions_SOURCES = \
3835         src/login/user-sessions.c
3836
3837 systemd_user_sessions_LDADD = \
3838         libsystemd-shared.la
3839
3840 rootlibexec_PROGRAMS += \
3841         systemd-logind \
3842         systemd-user-sessions
3843
3844 loginctl_SOURCES = \
3845         src/login/loginctl.c \
3846         src/login/sysfs-show.c
3847
3848 loginctl_CFLAGS = \
3849         $(AM_CFLAGS) \
3850         $(DBUS_CFLAGS)
3851
3852 loginctl_LDADD = \
3853         libsystemd-shared.la \
3854         libsystemd-dbus.la \
3855         libudev.la
3856
3857 rootbin_PROGRAMS += \
3858         loginctl
3859
3860 dist_bashcompletion_DATA += \
3861         shell-completion/bash/loginctl
3862
3863 dist_zshcompletion_DATA += \
3864         shell-completion/zsh/_loginctl \
3865         shell-completion/zsh/_systemd-inhibit
3866
3867 systemd_inhibit_SOURCES = \
3868         src/login/inhibit.c
3869
3870 systemd_inhibit_CFLAGS = \
3871         $(AM_CFLAGS) \
3872         $(DBUS_CFLAGS)
3873
3874 systemd_inhibit_LDADD = \
3875         libsystemd-shared.la \
3876         libsystemd-bus.la
3877
3878 rootbin_PROGRAMS += \
3879         systemd-inhibit
3880
3881 test_login_SOURCES = \
3882         src/login/test-login.c
3883
3884 test_login_LDADD = \
3885         libsystemd-login-internal.la \
3886         libsystemd-shared.la
3887
3888 test_login_shared_SOURCES = \
3889         src/login/test-login-shared.c
3890
3891 test_login_shared_LDADD = \
3892         libsystemd-login-internal.