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