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