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