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