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