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