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