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