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