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