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