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