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