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