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