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