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