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