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