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