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