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