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