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