chiark / gitweb /
import: add support for pulling raw tar balls as containers
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #  Copyright 2013 Zbigniew Jędrzejewski-Szmek
8 #  Copyright 2013 David Strauss
9 #
10 #  systemd is free software; you can redistribute it and/or modify it
11 #  under the terms of the GNU Lesser General Public License as published by
12 #  the Free Software Foundation; either version 2.1 of the License, or
13 #  (at your option) any later version.
14 #
15 #  systemd is distributed in the hope that it will be useful, but
16 #  WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 #  Lesser General Public License for more details.
19 #
20 #  You should have received a copy of the GNU Lesser General Public License
21 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 GCC_COLORS ?= 'ooh, shiny!'
28 export GCC_COLORS
29
30 SUBDIRS = . po
31
32 # remove targets if the command fails
33 .DELETE_ON_ERROR:
34
35 # keep intermediate files
36 .SECONDARY:
37
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
40
41 LIBUDEV_CURRENT=7
42 LIBUDEV_REVISION=2
43 LIBUDEV_AGE=6
44
45 LIBGUDEV_CURRENT=2
46 LIBGUDEV_REVISION=0
47 LIBGUDEV_AGE=2
48
49 LIBSYSTEMD_CURRENT=5
50 LIBSYSTEMD_REVISION=1
51 LIBSYSTEMD_AGE=5
52
53 # The following four libraries only exist for compatibility reasons,
54 # their version info should not be bumped anymore
55 LIBSYSTEMD_LOGIN_CURRENT=9
56 LIBSYSTEMD_LOGIN_REVISION=3
57 LIBSYSTEMD_LOGIN_AGE=9
58
59 LIBSYSTEMD_DAEMON_CURRENT=0
60 LIBSYSTEMD_DAEMON_REVISION=12
61 LIBSYSTEMD_DAEMON_AGE=0
62
63 LIBSYSTEMD_ID128_CURRENT=0
64 LIBSYSTEMD_ID128_REVISION=28
65 LIBSYSTEMD_ID128_AGE=0
66
67 LIBSYSTEMD_JOURNAL_CURRENT=11
68 LIBSYSTEMD_JOURNAL_REVISION=5
69 LIBSYSTEMD_JOURNAL_AGE=11
70
71 # Dirs of external packages
72 dbuspolicydir=@dbuspolicydir@
73 dbussessionservicedir=@dbussessionservicedir@
74 dbussystemservicedir=@dbussystemservicedir@
75 pamlibdir=@pamlibdir@
76 pamconfdir=@pamconfdir@
77 pkgconfiglibdir=$(libdir)/pkgconfig
78 polkitpolicydir=$(datadir)/polkit-1/actions
79 bashcompletiondir=@bashcompletiondir@
80 zshcompletiondir=@zshcompletiondir@
81 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
82 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
83 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
84 varlogdir=$(localstatedir)/log
85 systemdstatedir=$(localstatedir)/lib/systemd
86 catalogstatedir=$(systemdstatedir)/catalog
87 xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
88
89 # Our own, non-special dirs
90 pkgsysconfdir=$(sysconfdir)/systemd
91 userunitdir=$(prefix)/lib/systemd/user
92 userpresetdir=$(prefix)/lib/systemd/user-preset
93 tmpfilesdir=$(prefix)/lib/tmpfiles.d
94 sysusersdir=$(prefix)/lib/sysusers.d
95 sysctldir=$(prefix)/lib/sysctl.d
96 binfmtdir=$(prefix)/lib/binfmt.d
97 modulesloaddir=$(prefix)/lib/modules-load.d
98 networkdir=$(rootprefix)/lib/systemd/network
99 pkgincludedir=$(includedir)/systemd
100 systemgeneratordir=$(rootlibexecdir)/system-generators
101 usergeneratordir=$(prefix)/lib/systemd/user-generators
102 systemshutdowndir=$(rootlibexecdir)/system-shutdown
103 systemsleepdir=$(rootlibexecdir)/system-sleep
104 systemunitdir=$(rootprefix)/lib/systemd/system
105 systempresetdir=$(rootprefix)/lib/systemd/system-preset
106 udevlibexecdir=$(rootprefix)/lib/udev
107 udevhomedir=$(udevlibexecdir)
108 udevrulesdir=$(udevlibexecdir)/rules.d
109 udevhwdbdir=$(udevlibexecdir)/hwdb.d
110 catalogdir=$(prefix)/lib/systemd/catalog
111 kernelinstalldir = $(prefix)/lib/kernel/install.d
112 factory_etcdir = $(prefix)/share/factory/etc
113 factory_pamdir = $(prefix)/share/factory/etc/pam.d
114
115 # And these are the special ones for /
116 rootprefix=@rootprefix@
117 rootbindir=$(rootprefix)/bin
118 rootlibexecdir=$(rootprefix)/lib/systemd
119
120 CLEANFILES = $(BUILT_SOURCES)
121 DISTCLEANFILES =
122 EXTRA_DIST =
123 BUILT_SOURCES =
124 INSTALL_EXEC_HOOKS =
125 UNINSTALL_EXEC_HOOKS =
126 INSTALL_DATA_HOOKS =
127 UNINSTALL_DATA_HOOKS =
128 DISTCLEAN_LOCAL_HOOKS =
129 CLEAN_LOCAL_HOOKS =
130 pkginclude_HEADERS =
131 noinst_LTLIBRARIES =
132 lib_LTLIBRARIES =
133 include_HEADERS =
134 noinst_DATA =
135 pkgconfiglib_DATA =
136 polkitpolicy_in_in_files =
137 polkitpolicy_in_files =
138 polkitpolicy_files =
139 dist_udevrules_DATA =
140 nodist_udevrules_DATA =
141 dist_pkgsysconf_DATA =
142 nodist_pkgsysconf_DATA =
143 dist_pkgdata_DATA =
144 dist_dbuspolicy_DATA =
145 dist_dbussystemservice_DATA =
146 dist_systemunit_DATA_busnames =
147 check_PROGRAMS =
148 check_DATA =
149 tests=
150 manual_tests =
151 if ENABLE_TESTS
152 export PYTHON
153 noinst_PROGRAMS = $(manual_tests) $(tests)
154 TESTS = $(tests)
155 else
156 noinst_PROGRAMS =
157 TESTS =
158 endif
159 udevlibexec_PROGRAMS =
160
161 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
162         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
163         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
164
165 AM_CPPFLAGS = \
166         -include $(top_builddir)/config.h \
167         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
168         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
169         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
170         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
171         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
172         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
173         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
174         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
175         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
176         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
177         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
178         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
179         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
180         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
181         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
182         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
183         -DROOTPREFIX=\"$(rootprefix)\" \
184         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
185         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
186         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
187         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
188         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
189         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
190         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
191         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
192         -DX_SERVER=\"$(bindir)/X\" \
193         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
194         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
195         -DQUOTACHECK=\"$(QUOTACHECK)\" \
196         -DKEXEC=\"$(KEXEC)\" \
197         -DLIBDIR=\"$(libdir)\" \
198         -DROOTLIBDIR=\"$(rootlibdir)\" \
199         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
200         -I $(top_srcdir)/src \
201         -I $(top_builddir)/src/shared \
202         -I $(top_srcdir)/src/shared \
203         -I $(top_srcdir)/src/network \
204         -I $(top_srcdir)/src/login \
205         -I $(top_srcdir)/src/journal \
206         -I $(top_srcdir)/src/timedate \
207         -I $(top_srcdir)/src/timesync \
208         -I $(top_srcdir)/src/resolve \
209         -I $(top_builddir)/src/resolve \
210         -I $(top_srcdir)/src/systemd \
211         -I $(top_builddir)/src/core \
212         -I $(top_srcdir)/src/core \
213         -I $(top_srcdir)/src/libudev \
214         -I $(top_srcdir)/src/udev \
215         -I $(top_srcdir)/src/udev/net \
216         -I $(top_builddir)/src/udev \
217         -I $(top_srcdir)/src/libsystemd/sd-bus \
218         -I $(top_srcdir)/src/libsystemd/sd-event \
219         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
220         -I $(top_srcdir)/src/libsystemd/sd-network \
221         -I $(top_srcdir)/src/libsystemd/sd-hwdb \
222         -I $(top_srcdir)/src/libsystemd-network \
223         -I $(top_srcdir)/src/libsystemd-terminal \
224         $(OUR_CPPFLAGS)
225
226 AM_CFLAGS = $(OUR_CFLAGS)
227 AM_LDFLAGS = $(OUR_LDFLAGS)
228
229 # ------------------------------------------------------------------------------
230 define move-to-rootlibdir
231         if test "$(libdir)" != "$(rootlibdir)"; then \
232                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
233                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
234                 rm -f $(DESTDIR)$(libdir)/$$libname && \
235                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
236                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
237         fi
238 endef
239
240 INSTALL_DIRS =
241
242 RUNLEVEL1_TARGET_WANTS =
243 RUNLEVEL2_TARGET_WANTS =
244 RUNLEVEL3_TARGET_WANTS =
245 RUNLEVEL4_TARGET_WANTS =
246 RUNLEVEL5_TARGET_WANTS =
247 SHUTDOWN_TARGET_WANTS =
248 LOCAL_FS_TARGET_WANTS =
249 MULTI_USER_TARGET_WANTS =
250 SYSINIT_TARGET_WANTS =
251 SOCKETS_TARGET_WANTS =
252 BUSNAMES_TARGET_WANTS =
253 TIMERS_TARGET_WANTS =
254 USER_SOCKETS_TARGET_WANTS =
255 USER_DEFAULT_TARGET_WANTS =
256 USER_BUSNAMES_TARGET_WANTS =
257
258 SYSTEM_UNIT_ALIASES =
259 USER_UNIT_ALIASES =
260 GENERAL_ALIASES =
261
262 install-target-wants-hook:
263         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
264         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
265         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
266         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
267         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
268         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
269         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
270         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
271         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
272         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
273         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
274         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
275         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
276         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
277
278 install-busnames-target-wants-hook:
279         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
280         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
281
282 define add-wants
283         [ -z "$$what" ] || ( \
284           dir=$(DESTDIR)$$dir/$$wants.wants && \
285           $(MKDIR_P) -m 0755 $$dir && \
286           cd $$dir && \
287           rm -f $$what && \
288           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
289 endef
290
291 install-directories-hook:
292         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
293
294 install-aliases-hook:
295         set -- $(SYSTEM_UNIT_ALIASES) && \
296                 dir=$(systemunitdir) && $(install-aliases)
297         set -- $(USER_UNIT_ALIASES) && \
298                 dir=$(userunitdir) && $(install-relative-aliases)
299         set -- $(GENERAL_ALIASES) && \
300                 dir= && $(install-relative-aliases)
301
302 define install-aliases
303         while [ -n "$$1" ]; do \
304                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
305                 rm -f $(DESTDIR)$$dir/$$2 && \
306                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
307                 shift 2 || exit $$?; \
308         done
309 endef
310
311 define install-relative-aliases
312         while [ -n "$$1" ]; do \
313                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
314                 rm -f $(DESTDIR)$$dir/$$2 && \
315                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
316                 shift 2 || exit $$?; \
317         done
318 endef
319
320 install-touch-usr-hook:
321         touch -c $(DESTDIR)/$(prefix)
322
323 INSTALL_EXEC_HOOKS += \
324         install-target-wants-hook \
325         install-directories-hook \
326         install-aliases-hook \
327         install-touch-usr-hook
328
329 if ENABLE_KDBUS
330 INSTALL_EXEC_HOOKS += \
331         install-busnames-target-wants-hook
332 endif
333
334 # ------------------------------------------------------------------------------
335 AM_V_M4 = $(AM_V_M4_$(V))
336 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
337 AM_V_M4_0 = @echo "  M4      " $@;
338
339 AM_V_XSLT = $(AM_V_XSLT_$(V))
340 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
341 AM_V_XSLT_0 = @echo "  XSLT    " $@;
342
343 AM_V_GPERF = $(AM_V_GPERF_$(V))
344 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
345 AM_V_GPERF_0 = @echo "  GPERF   " $@;
346
347 AM_V_LN = $(AM_V_LN_$(V))
348 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
349 AM_V_LN_0 = @echo "  LN      " $@;
350
351 AM_V_RM = $(AM_V_RM_$(V))
352 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
353 AM_V_RM_0 = @echo "  RM      " $@;
354
355 # ------------------------------------------------------------------------------
356 rootbin_PROGRAMS = \
357         systemctl \
358         systemd-notify \
359         systemd-ask-password \
360         systemd-tty-ask-password-agent \
361         systemd-machine-id-setup \
362         systemd-escape
363
364 bin_PROGRAMS = \
365         systemd-cgls \
366         systemd-cgtop \
367         systemd-nspawn \
368         systemd-detect-virt \
369         systemd-delta \
370         systemd-analyze \
371         systemd-run \
372         systemd-stdio-bridge \
373         systemd-path
374
375 dist_bin_SCRIPTS = \
376         src/kernel-install/kernel-install
377
378 dist_kernelinstall_SCRIPTS = \
379         src/kernel-install/50-depmod.install \
380         src/kernel-install/90-loaderentry.install
381
382 rootlibexec_PROGRAMS = \
383         systemd \
384         systemd-cgroups-agent \
385         systemd-initctl \
386         systemd-shutdownd \
387         systemd-shutdown \
388         systemd-remount-fs \
389         systemd-reply-password \
390         systemd-fsck \
391         systemd-machine-id-commit \
392         systemd-ac-power \
393         systemd-sysctl \
394         systemd-sleep \
395         systemd-bus-proxyd \
396         systemd-socket-proxyd \
397         systemd-update-done
398
399 if HAVE_UTMP
400 rootlibexec_PROGRAMS += \
401         systemd-update-utmp
402 endif
403
404 systemgenerator_PROGRAMS = \
405         systemd-getty-generator \
406         systemd-fstab-generator \
407         systemd-system-update-generator \
408         systemd-debug-generator
409
410 dist_bashcompletion_DATA = \
411         shell-completion/bash/busctl \
412         shell-completion/bash/journalctl \
413         shell-completion/bash/systemd-analyze \
414         shell-completion/bash/systemd-cat \
415         shell-completion/bash/systemd-cgls \
416         shell-completion/bash/systemd-cgtop \
417         shell-completion/bash/systemd-delta \
418         shell-completion/bash/systemd-detect-virt \
419         shell-completion/bash/systemd-nspawn \
420         shell-completion/bash/systemd-run \
421         shell-completion/bash/udevadm \
422         shell-completion/bash/kernel-install
423
424 nodist_bashcompletion_DATA = \
425         shell-completion/bash/systemctl
426
427 dist_zshcompletion_DATA = \
428         shell-completion/zsh/_journalctl \
429         shell-completion/zsh/_udevadm \
430         shell-completion/zsh/_kernel-install \
431         shell-completion/zsh/_systemd-nspawn \
432         shell-completion/zsh/_systemd-analyze \
433         shell-completion/zsh/_systemd-run \
434         shell-completion/zsh/_sd_hosts_or_user_at_host \
435         shell-completion/zsh/_sd_outputmodes \
436         shell-completion/zsh/_sd_unit_files \
437         shell-completion/zsh/_systemd-delta \
438         shell-completion/zsh/_systemd
439
440 nodist_zshcompletion_DATA = \
441         shell-completion/zsh/_systemctl
442
443 EXTRA_DIST += \
444         shell-completion/bash/systemctl.in \
445         shell-completion/zsh/_systemctl.in
446
447 CLEANFILES += \
448         $(nodist_bashcompletion_DATA) \
449         $(nodist_zshcompletion_DATA)
450
451 dist_sysctl_DATA = \
452         sysctl.d/50-default.conf
453
454 dist_systemunit_DATA = \
455         units/graphical.target \
456         units/multi-user.target \
457         units/emergency.target \
458         units/sysinit.target \
459         units/basic.target \
460         units/getty.target \
461         units/halt.target \
462         units/kexec.target \
463         units/local-fs.target \
464         units/local-fs-pre.target \
465         units/initrd.target \
466         units/initrd-fs.target \
467         units/initrd-root-fs.target \
468         units/remote-fs.target \
469         units/remote-fs-pre.target \
470         units/network.target \
471         units/network-pre.target \
472         units/network-online.target \
473         units/nss-lookup.target \
474         units/nss-user-lookup.target \
475         units/poweroff.target \
476         units/reboot.target \
477         units/rescue.target \
478         units/rpcbind.target \
479         units/time-sync.target \
480         units/shutdown.target \
481         units/final.target \
482         units/umount.target \
483         units/sigpwr.target \
484         units/sleep.target \
485         units/sockets.target \
486         units/timers.target \
487         units/paths.target \
488         units/suspend.target \
489         units/swap.target \
490         units/slices.target \
491         units/system.slice \
492         units/x-.slice \
493         units/systemd-initctl.socket \
494         units/systemd-shutdownd.socket \
495         units/syslog.socket \
496         units/dev-hugepages.mount \
497         units/dev-mqueue.mount \
498         units/sys-kernel-config.mount \
499         units/sys-kernel-debug.mount \
500         units/sys-fs-fuse-connections.mount \
501         units/tmp.mount \
502         units/printer.target \
503         units/sound.target \
504         units/bluetooth.target \
505         units/smartcard.target \
506         units/systemd-ask-password-wall.path \
507         units/systemd-ask-password-console.path \
508         units/systemd-udevd-control.socket \
509         units/systemd-udevd-kernel.socket \
510         units/system-update.target \
511         units/initrd-switch-root.target \
512         units/machines.target
513
514 if ENABLE_KDBUS
515 dist_systemunit_DATA += \
516         $(dist_systemunit_DATA_busnames)
517 endif
518
519 dist_systemunit_DATA_busnames += \
520         units/busnames.target
521
522 nodist_systemunit_DATA = \
523         units/getty@.service \
524         units/serial-getty@.service \
525         units/console-shell.service \
526         units/console-getty.service \
527         units/container-getty@.service \
528         units/systemd-initctl.service \
529         units/systemd-shutdownd.service \
530         units/systemd-remount-fs.service \
531         units/systemd-ask-password-wall.service \
532         units/systemd-ask-password-console.service \
533         units/systemd-sysctl.service \
534         units/emergency.service \
535         units/rescue.service \
536         units/user@.service \
537         units/systemd-suspend.service \
538         units/systemd-halt.service \
539         units/systemd-poweroff.service \
540         units/systemd-reboot.service \
541         units/systemd-kexec.service \
542         units/systemd-fsck@.service \
543         units/systemd-fsck-root.service \
544         units/systemd-machine-id-commit.service \
545         units/systemd-udevd.service \
546         units/systemd-udev-trigger.service \
547         units/systemd-udev-settle.service \
548         units/systemd-hwdb-update.service \
549         units/debug-shell.service \
550         units/initrd-parse-etc.service \
551         units/initrd-cleanup.service \
552         units/initrd-udevadm-cleanup-db.service \
553         units/initrd-switch-root.service \
554         units/systemd-nspawn@.service \
555         units/systemd-update-done.service
556
557 if HAVE_UTMP
558 nodist_systemunit_DATA += \
559         units/systemd-update-utmp.service \
560         units/systemd-update-utmp-runlevel.service
561 endif
562
563 dist_userunit_DATA = \
564         units/user/basic.target \
565         units/user/default.target \
566         units/user/exit.target
567
568 nodist_userunit_DATA = \
569         units/user/systemd-exit.service
570
571 dist_systempreset_DATA = \
572         system-preset/90-systemd.preset
573
574 EXTRA_DIST += \
575         units/getty@.service.m4 \
576         units/serial-getty@.service.m4 \
577         units/console-shell.service.m4.in \
578         units/console-getty.service.m4.in \
579         units/container-getty@.service.m4.in \
580         units/rescue.service.in \
581         units/systemd-initctl.service.in \
582         units/systemd-shutdownd.service.in \
583         units/systemd-remount-fs.service.in \
584         units/systemd-update-utmp.service.in \
585         units/systemd-update-utmp-runlevel.service.in \
586         units/systemd-ask-password-wall.service.in \
587         units/systemd-ask-password-console.service.in \
588         units/systemd-sysctl.service.in \
589         units/emergency.service.in \
590         units/systemd-halt.service.in \
591         units/systemd-poweroff.service.in \
592         units/systemd-reboot.service.in \
593         units/systemd-kexec.service.in \
594         units/user/systemd-exit.service.in \
595         units/systemd-fsck@.service.in \
596         units/systemd-fsck-root.service.in \
597         units/systemd-machine-id-commit.service.in \
598         units/user@.service.m4.in \
599         units/debug-shell.service.in \
600         units/systemd-suspend.service.in \
601         units/quotaon.service.in \
602         units/initrd-parse-etc.service.in \
603         units/initrd-cleanup.service.in \
604         units/initrd-udevadm-cleanup-db.service.in \
605         units/initrd-switch-root.service.in \
606         units/systemd-nspawn@.service.in \
607         units/systemd-update-done.service.in
608
609 CLEANFILES += \
610         units/console-shell.service.m4 \
611         units/console-getty.service.m4 \
612         units/container-getty@.service.m4 \
613         units/user@.service.m4
614
615 if HAVE_SYSV_COMPAT
616 nodist_systemunit_DATA += \
617         units/rc-local.service \
618         units/halt-local.service
619
620 systemgenerator_PROGRAMS += \
621         systemd-sysv-generator \
622         systemd-rc-local-generator
623 endif
624
625 EXTRA_DIST += \
626         units/rc-local.service.in \
627         units/halt-local.service.in
628
629 # automake is broken and can't handle files with a dash in front
630 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
631 units-install-hook:
632         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
633
634 units-uninstall-hook:
635         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
636
637 INSTALL_DATA_HOOKS += units-install-hook
638 UNINSTALL_DATA_HOOKS += units-uninstall-hook
639
640 dist_doc_DATA = \
641         README \
642         NEWS \
643         LICENSE.LGPL2.1 \
644         LICENSE.GPL2 \
645         LICENSE.MIT \
646         DISTRO_PORTING \
647         src/libsystemd/sd-bus/PORTING-DBUS1 \
648         src/libsystemd/sd-bus/DIFFERENCES \
649         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
650
651 @INTLTOOL_POLICY_RULE@
652
653 # ------------------------------------------------------------------------------
654
655 MANPAGES =
656 MANPAGES_ALIAS =
657
658 include Makefile-man.am
659
660 .PHONY: man update-man-list
661 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
662
663 XML_FILES = \
664         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
665 HTML_FILES = \
666         ${XML_FILES:.xml=.html}
667 HTML_ALIAS = \
668         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
669
670 if ENABLE_MANPAGES
671 man_MANS = \
672         $(MANPAGES) \
673         $(MANPAGES_ALIAS)
674
675 noinst_DATA += \
676         $(HTML_FILES) \
677         $(HTML_ALIAS)
678
679 CLEANFILES += \
680         $(man_MANS) \
681         $(HTML_FILES) \
682         $(HTML_ALIAS)
683
684 docs/html/man:
685         $(AM_V_at)$(MKDIR_P) $(dir $@)
686         $(AM_V_LN)$(LN_S) -f ../../man $@
687
688 noinst_DATA += \
689         docs/html/man
690
691 CLEANFILES += \
692         docs/html/man
693
694 if HAVE_PYTHON
695 man/index.html: man/systemd.index.html
696         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
697
698 noinst_DATA += \
699         man/index.html
700
701 CLEANFILES += \
702         man/index.html
703
704 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
705 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
706 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
707
708 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
709         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
710         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
711         @echo "Makefile-man.am has been regenerated"
712
713 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
714         $(AM_V_at)$(MKDIR_P) $(dir $@)
715         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
716
717 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
718         $(AM_V_at)$(MKDIR_P) $(dir $@)
719         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
720
721 EXTRA_DIST += \
722         man/systemd.index.xml \
723         man/index.html \
724         man/systemd.directives.xml \
725         man/glib-event-glue.c
726
727 CLEANFILES += \
728         man/systemd.index.xml \
729         man/systemd.directives.xml
730
731 endif
732
733 endif
734
735 EXTRA_DIST += \
736         $(XML_FILES) \
737         $(HTML_FILES) \
738         $(HTML_ALIAS) \
739         $(man_MANS) \
740         tools/make-man-index.py \
741         tools/make-directive-index.py \
742         tools/xml_helper.py
743
744 # ------------------------------------------------------------------------------
745 noinst_LTLIBRARIES += \
746         libsystemd-shared.la
747
748 libsystemd_shared_la_SOURCES = \
749         src/shared/capability.c \
750         src/shared/capability.h \
751         src/shared/linux/auto_dev-ioctl.h \
752         src/shared/ioprio.h \
753         src/shared/missing.h \
754         src/shared/initreq.h \
755         src/shared/securebits.h \
756         src/shared/special.h \
757         src/shared/list.h \
758         src/shared/unaligned.h \
759         src/shared/macro.h \
760         src/shared/def.h \
761         src/shared/sparse-endian.h \
762         src/shared/refcnt.h \
763         src/shared/udev-util.h \
764         src/shared/device-nodes.c \
765         src/shared/device-nodes.h \
766         src/shared/util.c \
767         src/shared/util.h \
768         src/shared/virt.c \
769         src/shared/virt.h \
770         src/shared/architecture.c \
771         src/shared/architecture.h \
772         src/shared/efivars.c \
773         src/shared/efivars.h \
774         src/shared/fstab-util.c \
775         src/shared/fstab-util.h \
776         src/shared/path-util.c \
777         src/shared/path-util.h \
778         src/shared/time-util.c \
779         src/shared/time-util.h \
780         src/shared/locale-util.c \
781         src/shared/locale-util.h \
782         src/shared/mempool.c \
783         src/shared/mempool.h \
784         src/shared/hashmap.c \
785         src/shared/hashmap.h \
786         src/shared/siphash24.c \
787         src/shared/siphash24.h \
788         src/shared/set.h \
789         src/shared/fdset.c \
790         src/shared/fdset.h \
791         src/shared/prioq.c \
792         src/shared/prioq.h \
793         src/shared/sleep-config.c \
794         src/shared/sleep-config.h \
795         src/shared/strv.c \
796         src/shared/strv.h \
797         src/shared/env-util.c \
798         src/shared/env-util.h \
799         src/shared/strbuf.c \
800         src/shared/strbuf.h \
801         src/shared/strxcpyx.c \
802         src/shared/strxcpyx.h \
803         src/shared/conf-parser.c \
804         src/shared/conf-parser.h \
805         src/shared/log.c \
806         src/shared/log.h \
807         src/shared/ratelimit.h \
808         src/shared/ratelimit.c \
809         src/shared/exit-status.c \
810         src/shared/exit-status.h \
811         src/shared/utf8.c \
812         src/shared/utf8.h \
813         src/shared/gunicode.c \
814         src/shared/gunicode.h \
815         src/shared/pager.c \
816         src/shared/pager.h \
817         src/shared/socket-util.c \
818         src/shared/socket-util.h \
819         src/shared/in-addr-util.c \
820         src/shared/in-addr-util.h \
821         src/shared/ether-addr-util.h \
822         src/shared/conf-files.c \
823         src/shared/conf-files.h \
824         src/shared/cgroup-util.c \
825         src/shared/cgroup-util.h \
826         src/shared/cgroup-show.c \
827         src/shared/cgroup-show.h \
828         src/shared/unit-name.c \
829         src/shared/unit-name.h \
830         src/shared/utmp-wtmp.h \
831         src/shared/watchdog.c \
832         src/shared/watchdog.h \
833         src/shared/spawn-ask-password-agent.c \
834         src/shared/spawn-ask-password-agent.h \
835         src/shared/replace-var.c \
836         src/shared/replace-var.h \
837         src/shared/spawn-polkit-agent.c \
838         src/shared/spawn-polkit-agent.h \
839         src/shared/clock-util.c \
840         src/shared/clock-util.h \
841         src/shared/time-dst.c \
842         src/shared/time-dst.h \
843         src/shared/calendarspec.c \
844         src/shared/calendarspec.h \
845         src/shared/fileio.c \
846         src/shared/fileio.h \
847         src/shared/output-mode.h \
848         src/shared/MurmurHash2.c \
849         src/shared/MurmurHash2.h \
850         src/shared/acpi-fpdt.h \
851         src/shared/acpi-fpdt.c \
852         src/shared/boot-timestamps.h \
853         src/shared/boot-timestamps.c \
854         src/shared/mkdir.c \
855         src/shared/mkdir.h \
856         src/shared/smack-util.c \
857         src/shared/smack-util.h \
858         src/shared/apparmor-util.c \
859         src/shared/apparmor-util.h \
860         src/shared/ima-util.c \
861         src/shared/ima-util.h \
862         src/shared/ptyfwd.c \
863         src/shared/ptyfwd.h \
864         src/shared/errno-list.c \
865         src/shared/errno-list.h \
866         src/shared/af-list.c \
867         src/shared/af-list.h \
868         src/shared/arphrd-list.c \
869         src/shared/arphrd-list.h \
870         src/shared/cap-list.c \
871         src/shared/cap-list.h \
872         src/shared/audit.c \
873         src/shared/audit.h \
874         src/shared/xml.c \
875         src/shared/xml.h \
876         src/shared/json.c \
877         src/shared/json.h \
878         src/shared/bus-label.c \
879         src/shared/bus-label.h \
880         src/shared/gpt.h \
881         src/shared/clean-ipc.h \
882         src/shared/clean-ipc.c \
883         src/shared/login-shared.c \
884         src/shared/login-shared.h \
885         src/shared/ring.c \
886         src/shared/ring.h \
887         src/shared/barrier.c \
888         src/shared/barrier.h \
889         src/shared/pty.c \
890         src/shared/pty.h \
891         src/shared/async.c \
892         src/shared/async.h \
893         src/shared/base-filesystem.c \
894         src/shared/base-filesystem.h \
895         src/shared/memfd-util.c \
896         src/shared/memfd-util.h \
897         src/shared/uid-range.c \
898         src/shared/uid-range.h \
899         src/shared/nss-util.h \
900         src/shared/verbs.c \
901         src/shared/verbs.h \
902         src/shared/sigbus.c \
903         src/shared/sigbus.h \
904         src/shared/build.h
905
906 if HAVE_UTMP
907 libsystemd_shared_la_SOURCES += \
908         src/shared/utmp-wtmp.c
909 endif
910
911 nodist_libsystemd_shared_la_SOURCES = \
912         src/shared/errno-from-name.h \
913         src/shared/errno-to-name.h \
914         src/shared/af-from-name.h \
915         src/shared/af-to-name.h \
916         src/shared/arphrd-from-name.h \
917         src/shared/arphrd-to-name.h \
918         src/shared/cap-from-name.h \
919         src/shared/cap-to-name.h
920
921 libsystemd_shared_la_CFLAGS = \
922         $(AM_CFLAGS) \
923         $(CAP_CFLAGS) \
924         $(SECCOMP_CFLAGS) \
925         -pthread
926
927 libsystemd_shared_la_LIBADD = \
928         $(CAP_LIBS) \
929         -lm
930
931 # ------------------------------------------------------------------------------
932 noinst_LTLIBRARIES += \
933         libsystemd-units.la
934
935 libsystemd_units_la_SOURCES = \
936         src/shared/install.c \
937         src/shared/install.h \
938         src/shared/install-printf.c \
939         src/shared/install-printf.h \
940         src/shared/path-lookup.c \
941         src/shared/path-lookup.h \
942         src/shared/specifier.c \
943         src/shared/specifier.h
944
945 # ------------------------------------------------------------------------------
946 noinst_LTLIBRARIES += \
947         libsystemd-label.la
948
949 libsystemd_label_la_SOURCES = \
950         src/shared/socket-label.c \
951         src/shared/label.c \
952         src/shared/label.h \
953         src/shared/selinux-util.c \
954         src/shared/selinux-util.h \
955         src/shared/mkdir-label.c \
956         src/shared/ask-password-api.c \
957         src/shared/ask-password-api.h \
958         src/shared/switch-root.h \
959         src/shared/switch-root.c \
960         src/shared/fileio-label.c \
961         src/shared/fileio-label.h \
962         src/shared/dev-setup.c \
963         src/shared/dev-setup.h \
964         src/shared/dropin.c \
965         src/shared/dropin.h \
966         src/shared/condition.c \
967         src/shared/condition.h \
968         src/shared/generator.h \
969         src/shared/generator.c \
970         src/shared/btrfs-util.c \
971         src/shared/btrfs-util.h \
972         src/shared/btrfs-ctree.h \
973         src/shared/machine-image.c \
974         src/shared/machine-image.h \
975         src/shared/copy.c \
976         src/shared/copy.h
977
978 libsystemd_label_la_CFLAGS = \
979         $(AM_CFLAGS) \
980         $(SELINUX_CFLAGS)
981
982 libsystemd_label_la_LIBADD = \
983         $(SELINUX_LIBS)
984
985 # -----------------------------------------------------------------------------
986
987 if HAVE_LIBIPTC
988 noinst_LTLIBRARIES += \
989         libsystemd-fw.la
990
991 libsystemd_fw_la_SOURCES = \
992         src/shared/fw-util.h \
993         src/shared/fw-util.c
994
995 libsystemd_fw_la_CFLAGS = \
996         $(AM_CFLAGS) \
997         $(LIBIPTC_CFLAGS)
998
999 libsystemd_fw_la_LIBADD = \
1000         $(LIBIPTC_LIBS)
1001 endif
1002
1003 # -----------------------------------------------------------------------------
1004
1005 if ENABLE_LDCONFIG
1006 dist_systemunit_DATA += \
1007         units/ldconfig.service
1008
1009 SYSINIT_TARGET_WANTS += \
1010         ldconfig.service
1011 endif
1012
1013 # ------------------------------------------------------------------------------
1014
1015 if HAVE_SECCOMP
1016 noinst_LTLIBRARIES += \
1017         libsystemd-seccomp.la
1018
1019 libsystemd_seccomp_la_SOURCES = \
1020         src/shared/seccomp-util.h \
1021         src/shared/seccomp-util.c
1022
1023 libsystemd_seccomp_la_CFLAGS = \
1024         $(AM_CFLAGS) \
1025         $(SECCOMP_CFLAGS)
1026
1027 libsystemd_seccomp_la_LIBADD = \
1028         $(SECCOMP_LIBS)
1029 endif
1030
1031 # ------------------------------------------------------------------------------
1032 noinst_LTLIBRARIES += \
1033         libsystemd-logs.la
1034
1035 libsystemd_logs_la_SOURCES = \
1036         src/shared/logs-show.c \
1037         src/shared/logs-show.h
1038
1039 # ------------------------------------------------------------------------------
1040 if HAVE_ACL
1041 noinst_LTLIBRARIES += \
1042         libsystemd-acl.la
1043
1044 libsystemd_acl_la_SOURCES = \
1045         src/shared/acl-util.c \
1046         src/shared/acl-util.h
1047
1048 libsystemd_acl_la_CFLAGS = \
1049         $(AM_CFLAGS) \
1050         $(ACL_CFLAGS)
1051
1052 libsystemd_acl_la_LIBADD = \
1053         $(ACL_LIBS)
1054 endif
1055
1056 # ------------------------------------------------------------------------------
1057 noinst_LTLIBRARIES += \
1058         libsystemd-core.la
1059
1060 libsystemd_core_la_SOURCES = \
1061         src/core/unit.c \
1062         src/core/unit.h \
1063         src/core/unit-printf.c \
1064         src/core/unit-printf.h \
1065         src/core/job.c \
1066         src/core/job.h \
1067         src/core/manager.c \
1068         src/core/manager.h \
1069         src/core/transaction.c \
1070         src/core/transaction.h \
1071         src/core/load-fragment.c \
1072         src/core/load-fragment.h \
1073         src/core/service.c \
1074         src/core/service.h \
1075         src/core/socket.c \
1076         src/core/socket.h \
1077         src/core/busname.c \
1078         src/core/busname.h \
1079         src/core/bus-endpoint.c \
1080         src/core/bus-endpoint.h \
1081         src/core/bus-policy.c \
1082         src/core/bus-policy.h \
1083         src/core/target.c \
1084         src/core/target.h \
1085         src/core/snapshot.c \
1086         src/core/snapshot.h \
1087         src/core/device.c \
1088         src/core/device.h \
1089         src/core/mount.c \
1090         src/core/mount.h \
1091         src/core/automount.c \
1092         src/core/automount.h \
1093         src/core/swap.c \
1094         src/core/swap.h \
1095         src/core/timer.c \
1096         src/core/timer.h \
1097         src/core/path.c \
1098         src/core/path.h \
1099         src/core/slice.c \
1100         src/core/slice.h \
1101         src/core/scope.c \
1102         src/core/scope.h \
1103         src/core/load-dropin.c \
1104         src/core/load-dropin.h \
1105         src/core/execute.c \
1106         src/core/execute.h \
1107         src/core/kill.c \
1108         src/core/kill.h \
1109         src/core/dbus.c \
1110         src/core/dbus.h \
1111         src/core/dbus-manager.c \
1112         src/core/dbus-manager.h \
1113         src/core/dbus-unit.c \
1114         src/core/dbus-unit.h \
1115         src/core/dbus-job.c \
1116         src/core/dbus-job.h \
1117         src/core/dbus-service.c \
1118         src/core/dbus-service.h \
1119         src/core/dbus-socket.c \
1120         src/core/dbus-socket.h \
1121         src/core/dbus-busname.c \
1122         src/core/dbus-busname.h \
1123         src/core/dbus-target.c \
1124         src/core/dbus-target.h \
1125         src/core/dbus-snapshot.c \
1126         src/core/dbus-snapshot.h \
1127         src/core/dbus-device.c \
1128         src/core/dbus-device.h \
1129         src/core/dbus-mount.c \
1130         src/core/dbus-mount.h \
1131         src/core/dbus-automount.c \
1132         src/core/dbus-automount.h \
1133         src/core/dbus-swap.c \
1134         src/core/dbus-swap.h \
1135         src/core/dbus-timer.c \
1136         src/core/dbus-timer.h \
1137         src/core/dbus-path.c \
1138         src/core/dbus-path.h \
1139         src/core/dbus-slice.c \
1140         src/core/dbus-slice.h \
1141         src/core/dbus-scope.c \
1142         src/core/dbus-scope.h \
1143         src/core/dbus-execute.c \
1144         src/core/dbus-execute.h \
1145         src/core/dbus-kill.c \
1146         src/core/dbus-kill.h \
1147         src/core/dbus-cgroup.c \
1148         src/core/dbus-cgroup.h \
1149         src/core/cgroup.c \
1150         src/core/cgroup.h \
1151         src/core/selinux-access.c \
1152         src/core/selinux-access.h \
1153         src/core/selinux-setup.c \
1154         src/core/selinux-setup.h \
1155         src/core/smack-setup.c \
1156         src/core/smack-setup.h \
1157         src/core/ima-setup.c \
1158         src/core/ima-setup.h \
1159         src/core/locale-setup.h \
1160         src/core/locale-setup.c \
1161         src/core/hostname-setup.c \
1162         src/core/hostname-setup.h \
1163         src/core/machine-id-setup.c \
1164         src/core/machine-id-setup.h \
1165         src/core/mount-setup.c \
1166         src/core/mount-setup.h \
1167         src/core/kmod-setup.c \
1168         src/core/kmod-setup.h \
1169         src/core/loopback-setup.h \
1170         src/core/loopback-setup.c \
1171         src/core/namespace.c \
1172         src/core/namespace.h \
1173         src/core/killall.h \
1174         src/core/killall.c \
1175         src/core/audit-fd.c \
1176         src/core/audit-fd.h \
1177         src/core/show-status.c \
1178         src/core/show-status.h \
1179         src/core/failure-action.c \
1180         src/core/failure-action.h
1181
1182 nodist_libsystemd_core_la_SOURCES = \
1183         src/core/load-fragment-gperf.c \
1184         src/core/load-fragment-gperf-nulstr.c
1185
1186 libsystemd_core_la_CFLAGS = \
1187         $(AM_CFLAGS) \
1188         $(PAM_CFLAGS) \
1189         $(AUDIT_CFLAGS) \
1190         $(KMOD_CFLAGS) \
1191         $(APPARMOR_CFLAGS) \
1192         $(SECCOMP_CFLAGS) \
1193         $(MOUNT_CFLAGS) \
1194         -pthread
1195
1196 libsystemd_core_la_LIBADD = \
1197         libsystemd-units.la \
1198         libsystemd-label.la \
1199         libudev-internal.la \
1200         libsystemd-shared.la \
1201         libsystemd-internal.la \
1202         $(PAM_LIBS) \
1203         $(AUDIT_LIBS) \
1204         $(KMOD_LIBS) \
1205         $(APPARMOR_LIBS) \
1206         $(SECCOMP_LIBS) \
1207         $(MOUNT_LIBS)
1208
1209 if HAVE_SECCOMP
1210 libsystemd_core_la_LIBADD += \
1211         libsystemd-seccomp.la
1212 endif
1213
1214 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1215         $(AM_V_at)$(MKDIR_P) $(dir $@)
1216         $(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 ";" }' < $< > $@
1217
1218 EXTRA_DIST += \
1219         src/core/load-fragment-gperf.gperf.m4
1220
1221 CLEANFILES += \
1222         src/core/load-fragment-gperf.gperf \
1223         src/core/load-fragment-gperf.c \
1224         src/core/load-fragment-gperf-nulstr.c \
1225         src/shared/errno-list.txt \
1226         src/shared/errno-from-name.gperf \
1227         src/shared/af-list.txt \
1228         src/shared/af-from-name.gperf \
1229         src/shared/arphrd-list.txt \
1230         src/shared/arphrd-from-name.gperf \
1231         src/shared/cap-list.txt \
1232         src/shared/cap-from-name.gperf \
1233         src/resolve/dns_type-list.txt \
1234         src/resolve/dns_type-from-name.gperf
1235
1236 BUILT_SOURCES += \
1237         src/shared/errno-from-name.h \
1238         src/shared/errno-to-name.h \
1239         src/shared/af-from-name.h \
1240         src/shared/af-to-name.h \
1241         src/shared/arphrd-from-name.h \
1242         src/shared/arphrd-to-name.h \
1243         src/shared/cap-from-name.h \
1244         src/shared/cap-to-name.h \
1245         src/resolve/dns_type-from-name.h \
1246         src/resolve/dns_type-to-name.h
1247
1248 %-from-name.gperf: %-list.txt
1249         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1250
1251 %-from-name.h: %-from-name.gperf
1252         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1253
1254
1255 src/shared/errno-list.txt:
1256         $(AM_V_at)$(MKDIR_P) $(dir $@)
1257         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1258
1259 src/shared/errno-to-name.h: src/shared/errno-list.txt
1260         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1261
1262
1263 src/shared/af-list.txt:
1264         $(AM_V_at)$(MKDIR_P) $(dir $@)
1265         $(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; }' >$@
1266
1267 src/shared/af-to-name.h: src/shared/af-list.txt
1268         $(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 "};"}' <$< >$@
1269
1270
1271 src/shared/arphrd-list.txt:
1272         $(AM_V_at)$(MKDIR_P) $(dir $@)
1273         $(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_//' >$@
1274
1275 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1276         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1277
1278 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1279         $(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 }' <$< >$@
1280
1281
1282 src/shared/cap-list.txt:
1283         $(AM_V_at)$(MKDIR_P) $(dir $@)
1284         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
1285
1286 src/shared/cap-to-name.h: src/shared/cap-list.txt
1287         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
1288
1289 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
1290         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1291
1292 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
1293         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1294
1295
1296 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1297         $(AM_V_at)$(MKDIR_P) $(dir $@)
1298         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1299
1300 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1301         $(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" }' <$< >$@
1302
1303 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1304         $(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 }' <$< >$@
1305
1306 # ------------------------------------------------------------------------------
1307 systemd_SOURCES = \
1308         src/core/main.c
1309
1310 systemd_CFLAGS = \
1311         $(AM_CFLAGS) \
1312         $(SECCOMP_CFLAGS)
1313
1314 systemd_LDADD = \
1315         libsystemd-core.la \
1316         $(RT_LIBS)
1317
1318 dist_pkgsysconf_DATA += \
1319         src/core/system.conf \
1320         src/core/user.conf
1321
1322 dist_dbuspolicy_DATA += \
1323         src/core/org.freedesktop.systemd1.conf
1324
1325 dist_dbussystemservice_DATA += \
1326         src/core/org.freedesktop.systemd1.service
1327
1328 polkitpolicy_in_in_files += \
1329         src/core/org.freedesktop.systemd1.policy.in.in
1330
1331 pkgconfiglib_DATA += \
1332         src/core/systemd.pc
1333
1334 nodist_rpmmacros_DATA = \
1335         src/core/macros.systemd
1336
1337 EXTRA_DIST += \
1338         src/core/systemd.pc.in \
1339         src/core/macros.systemd.in
1340
1341 CLEANFILES += \
1342         src/core/macros.systemd \
1343         src/core/org.freedesktop.systemd1.policy.in
1344
1345 # ------------------------------------------------------------------------------
1346
1347 manual_tests += \
1348         test-ns \
1349         test-loopback \
1350         test-hostname \
1351         test-daemon \
1352         test-cgroup \
1353         test-install \
1354         test-watchdog \
1355         test-log \
1356         test-ipcrm \
1357         test-btrfs
1358
1359 if HAVE_LIBIPTC
1360 manual_tests += \
1361         test-fw-util
1362 endif
1363
1364 if HAVE_KMOD
1365 manual_tests += \
1366         test-rtnl-manual
1367 endif
1368
1369 tests += \
1370         test-engine \
1371         test-cgroup-mask \
1372         test-job-type \
1373         test-env-replace \
1374         test-strbuf \
1375         test-strv \
1376         test-path \
1377         test-path-util \
1378         test-strxcpyx \
1379         test-unit-name \
1380         test-unit-file \
1381         test-utf8 \
1382         test-ellipsize \
1383         test-util \
1384         test-path-lookup \
1385         test-ring \
1386         test-barrier \
1387         test-pty \
1388         test-tmpfiles \
1389         test-namespace \
1390         test-date \
1391         test-sleep \
1392         test-replace-var \
1393         test-sched-prio \
1394         test-calendarspec \
1395         test-strip-tab-ansi \
1396         test-cgroup-util \
1397         test-fstab-util \
1398         test-prioq \
1399         test-fileio \
1400         test-time \
1401         test-hashmap \
1402         test-set \
1403         test-list \
1404         test-unaligned \
1405         test-tables \
1406         test-device-nodes \
1407         test-xml \
1408         test-json \
1409         test-architecture \
1410         test-socket-util \
1411         test-fdset \
1412         test-conf-files \
1413         test-capability \
1414         test-async \
1415         test-ratelimit \
1416         test-condition \
1417         test-uid-range \
1418         test-bus-policy \
1419         test-locale-util \
1420         test-execute \
1421         test-copy \
1422         test-cap-list \
1423         test-sigbus \
1424         test-verbs
1425
1426 EXTRA_DIST += \
1427         test/a.service \
1428         test/basic.target \
1429         test/b.service \
1430         test/c.service \
1431         test/daughter.service \
1432         test/d.service \
1433         test/end.service \
1434         test/e.service \
1435         test/f.service \
1436         test/grandchild.service \
1437         test/g.service \
1438         test/hello-after-sleep.target \
1439         test/hello.service \
1440         test/h.service \
1441         test/parent-deep.slice \
1442         test/parent.slice \
1443         test/paths.target \
1444         test/sched_idle_bad.service \
1445         test/sched_idle_ok.service \
1446         test/sched_rr_bad.service \
1447         test/sched_rr_change.service \
1448         test/sched_rr_ok.service \
1449         test/shutdown.target \
1450         test/sleep.service \
1451         test/sockets.target \
1452         test/son.service \
1453         test/sysinit.target \
1454         test/testsuite.target \
1455         test/timers.target \
1456         test/unstoppable.service \
1457         test/path-changed.service \
1458         test/path-directorynotempty.service \
1459         test/path-existsglob.service \
1460         test/path-exists.service \
1461         test/path-makedirectory.service \
1462         test/path-modified.service \
1463         test/path-mycustomunit.service \
1464         test/path-service.service \
1465         test/path-changed.path \
1466         test/path-directorynotempty.path \
1467         test/path-existsglob.path \
1468         test/path-exists.path \
1469         test/path-makedirectory.path \
1470         test/path-modified.path \
1471         test/path-unit.path \
1472         test/exec-environment-empty.service \
1473         test/exec-environment-multiple.service \
1474         test/exec-environment.service \
1475         test/exec-group.service \
1476         test/exec-ignoresigpipe-no.service \
1477         test/exec-ignoresigpipe-yes.service \
1478         test/exec-personality-x86-64.service \
1479         test/exec-personality-x86.service \
1480         test/exec-privatedevices-no.service \
1481         test/exec-privatedevices-yes.service \
1482         test/exec-privatetmp-no.service \
1483         test/exec-privatetmp-yes.service \
1484         test/exec-systemcallerrornumber.service \
1485         test/exec-systemcallfilter-failing2.service \
1486         test/exec-systemcallfilter-failing.service \
1487         test/exec-systemcallfilter-not-failing2.service \
1488         test/exec-systemcallfilter-not-failing.service \
1489         test/exec-user.service \
1490         test/exec-workingdirectory.service \
1491         test/exec-umask-0177.service \
1492         test/exec-umask-default.service \
1493         test/bus-policy/hello.conf \
1494         test/bus-policy/methods.conf \
1495         test/bus-policy/ownerships.conf \
1496         test/bus-policy/signals.conf \
1497         test/bus-policy/check-own-rules.conf \
1498         test/bus-policy/many-rules.conf \
1499         test/bus-policy/test.conf
1500
1501
1502 EXTRA_DIST += \
1503         src/test/test-helper.h
1504
1505 test_device_nodes_SOURCES = \
1506         src/test/test-device-nodes.c
1507
1508 test_device_nodes_LDADD = \
1509         libsystemd-shared.la
1510
1511 test_engine_SOURCES = \
1512         src/test/test-engine.c
1513
1514 test_engine_CFLAGS = \
1515         $(AM_CFLAGS) \
1516         $(SECCOMP_CFLAGS)
1517
1518 test_engine_LDADD = \
1519         libsystemd-core.la \
1520         $(RT_LIBS)
1521
1522 test_job_type_SOURCES = \
1523         src/test/test-job-type.c
1524
1525 test_job_type_CFLAGS = \
1526         $(AM_CFLAGS) \
1527         $(SECCOMP_CFLAGS)
1528
1529 test_job_type_LDADD = \
1530         libsystemd-core.la \
1531         $(RT_LIBS)
1532
1533 test_ns_SOURCES = \
1534         src/test/test-ns.c
1535
1536 test_ns_CFLAGS = \
1537         $(AM_CFLAGS) \
1538         $(SECCOMP_CFLAGS)
1539
1540 test_ns_LDADD = \
1541         libsystemd-core.la
1542
1543 test_loopback_SOURCES = \
1544         src/test/test-loopback.c
1545
1546 test_loopback_LDADD = \
1547         libsystemd-core.la
1548
1549 test_hostname_SOURCES = \
1550         src/test/test-hostname.c
1551
1552 test_hostname_LDADD = \
1553         libsystemd-core.la
1554
1555 if ENABLE_EFI
1556 manual_tests += \
1557         test-boot-timestamp
1558
1559 test_boot_timestamp_SOURCES = \
1560         src/test/test-boot-timestamps.c
1561
1562 test_boot_timestamp_LDADD = \
1563         libsystemd-shared.la
1564 endif
1565
1566 test_unit_name_SOURCES = \
1567         src/test/test-unit-name.c
1568
1569 test_unit_name_CFLAGS = \
1570         $(AM_CFLAGS) \
1571         $(SECCOMP_CFLAGS)
1572
1573 test_unit_name_LDADD = \
1574         libsystemd-core.la \
1575         $(RT_LIBS)
1576
1577 test_unit_file_SOURCES = \
1578         src/test/test-unit-file.c
1579
1580 test_unit_file_CFLAGS = \
1581         $(AM_CFLAGS) \
1582         $(SECCOMP_CFLAGS)
1583
1584 test_unit_file_LDADD = \
1585         libsystemd-core.la \
1586         $(RT_LIBS)
1587
1588 test_utf8_SOURCES = \
1589         src/test/test-utf8.c
1590
1591 test_utf8_LDADD = \
1592         libsystemd-shared.la
1593
1594 test_capability_SOURCES = \
1595         src/test/test-capability.c
1596
1597 test_capability_LDADD = \
1598         libsystemd-shared.la
1599
1600 test_async_SOURCES = \
1601         src/test/test-async.c
1602
1603 test_async_LDADD = \
1604         libsystemd-shared.la
1605
1606 test_locale_util_SOURCES = \
1607         src/test/test-locale-util.c
1608
1609 test_locale_util_LDADD = \
1610         libsystemd-shared.la
1611
1612 test_copy_SOURCES = \
1613         src/test/test-copy.c
1614
1615 test_copy_LDADD = \
1616         libsystemd-label.la \
1617         libsystemd-shared.la
1618
1619 test_sigbus_SOURCES = \
1620         src/test/test-sigbus.c
1621
1622 test_sigbus_LDADD = \
1623         libsystemd-shared.la
1624
1625 test_condition_SOURCES = \
1626         src/test/test-condition.c
1627
1628 test_condition_LDADD = \
1629         libsystemd-label.la \
1630         libsystemd-internal.la \
1631         libsystemd-shared.la
1632
1633 test_fdset_SOURCES = \
1634         src/test/test-fdset.c
1635
1636 test_fdset_LDADD = \
1637         libsystemd-shared.la \
1638         libsystemd-internal.la
1639
1640 test_fstab_util_SOURCES = \
1641         src/test/test-fstab-util.c
1642
1643 test_fstab_util_LDADD = \
1644         libsystemd-shared.la
1645
1646 test_ratelimit_SOURCES = \
1647         src/test/test-ratelimit.c
1648
1649 test_ratelimit_LDADD = \
1650         libsystemd-shared.la
1651
1652 test_util_SOURCES = \
1653         src/test/test-util.c
1654
1655 test_util_LDADD = \
1656         libsystemd-shared.la
1657
1658 test_path_lookup_SOURCES = \
1659         src/test/test-path-lookup.c
1660
1661 test_path_lookup_LDADD = \
1662         -lm \
1663         libsystemd-units.la \
1664         libsystemd-shared.la
1665
1666 test_uid_range_SOURCES = \
1667         src/test/test-uid-range.c
1668
1669 test_uid_range_LDADD = \
1670         libsystemd-shared.la
1671
1672 test_cap_list_SOURCES = \
1673         src/test/test-cap-list.c
1674
1675 test_cap_list_LDADD = \
1676         libsystemd-shared.la
1677
1678 test_socket_util_SOURCES = \
1679         src/test/test-socket-util.c
1680
1681 test_socket_util_LDADD = \
1682         libsystemd-shared.la
1683
1684 test_ring_SOURCES = \
1685         src/test/test-ring.c
1686
1687 test_ring_LDADD = \
1688         libsystemd-shared.la
1689
1690 test_barrier_SOURCES = \
1691         src/test/test-barrier.c
1692
1693 test_barrier_LDADD = \
1694         libsystemd-shared.la
1695
1696 test_pty_SOURCES = \
1697         src/test/test-pty.c
1698
1699 test_pty_LDADD = \
1700         libsystemd-core.la
1701
1702 test_tmpfiles_SOURCES = \
1703         src/test/test-tmpfiles.c
1704
1705 test_tmpfiles_LDADD = \
1706         libsystemd-shared.la
1707
1708 test_namespace_SOURCES = \
1709         src/test/test-namespace.c
1710
1711 test_verbs_SOURCES = \
1712         src/test/test-verbs.c
1713
1714 test_verbs_LDADD = \
1715         libsystemd-shared.la
1716
1717 test_namespace_LDADD = \
1718         libsystemd-core.la
1719
1720 CLEANFILES += \
1721         src/test/test-hashmap-ordered.c
1722
1723 BUILT_SOURCES += \
1724         src/test/test-hashmap-ordered.c
1725
1726 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1727         $(AM_V_at)$(MKDIR_P) $(dir $@)
1728         $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1729                            { if (!match($$0, "^#include"))          \
1730                                  gsub(/hashmap/, "ordered_hashmap"); \
1731                              gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
1732                              gsub(/Hashmap/, "OrderedHashmap");      \
1733                              print }' <$< >$@
1734
1735 nodist_test_hashmap_SOURCES = \
1736         src/test/test-hashmap-ordered.c
1737
1738 test_hashmap_SOURCES = \
1739         src/test/test-hashmap.c \
1740         src/test/test-hashmap-plain.c
1741
1742 test_hashmap_LDADD = \
1743         libsystemd-shared.la
1744
1745 test_set_SOURCES = \
1746         src/test/test-set.c
1747
1748 test_set_LDADD = \
1749         libsystemd-shared.la
1750
1751 test_xml_SOURCES = \
1752         src/test/test-xml.c
1753
1754 test_xml_LDADD = \
1755         libsystemd-shared.la
1756
1757 test_json_SOURCES = \
1758         src/test/test-json.c
1759
1760 test_json_LDADD = \
1761         libsystemd-shared.la
1762
1763 test_list_SOURCES = \
1764         src/test/test-list.c
1765
1766 test_list_LDADD = \
1767         libsystemd-shared.la
1768
1769 test_unaligned_LDADD = \
1770         libsystemd-shared.la
1771
1772 test_unaligned_SOURCES = \
1773         src/test/test-unaligned.c
1774
1775 test_tables_SOURCES = \
1776         src/test/test-tables.c \
1777         src/shared/test-tables.h \
1778         src/bus-proxyd/bus-xml-policy.c \
1779         src/bus-proxyd/bus-xml-policy.h \
1780         src/journal/journald-server.c \
1781         src/journal/journald-server.h
1782
1783 test_tables_CPPFLAGS = \
1784         $(AM_CPPFLAGS) \
1785         -I$(top_srcdir)/src/bus-proxyd
1786
1787 test_tables_CFLAGS = \
1788         $(AM_CFLAGS) \
1789         $(SECCOMP_CFLAGS)
1790
1791 test_tables_LDADD = \
1792         libsystemd-logs.la \
1793         libsystemd-journal-internal.la \
1794         libsystemd-journal-core.la \
1795         libsystemd-core.la \
1796         libudev-core.la \
1797         $(RT_LIBS)
1798
1799 test_prioq_SOURCES = \
1800         src/test/test-prioq.c
1801
1802 test_prioq_LDADD = \
1803         libsystemd-shared.la
1804
1805 test_fileio_SOURCES = \
1806         src/test/test-fileio.c
1807
1808 test_fileio_LDADD = \
1809         libsystemd-shared.la
1810
1811 test_time_SOURCES = \
1812         src/test/test-time.c
1813
1814 test_time_LDADD = \
1815         libsystemd-shared.la
1816
1817 test_architecture_SOURCES = \
1818         src/test/test-architecture.c
1819
1820 test_architecture_LDADD = \
1821         libsystemd-shared.la
1822
1823 test_log_SOURCES = \
1824         src/test/test-log.c
1825
1826 test_log_LDADD = \
1827         libsystemd-shared.la
1828
1829 test_ipcrm_SOURCES = \
1830         src/test/test-ipcrm.c
1831
1832 test_ipcrm_LDADD = \
1833         libsystemd-shared.la \
1834         -lrt
1835
1836 test_btrfs_SOURCES = \
1837         src/test/test-btrfs.c
1838
1839 test_btrfs_LDADD = \
1840         libsystemd-label.la \
1841         libsystemd-shared.la
1842
1843 if HAVE_LIBIPTC
1844 test_fw_util_SOURCES = \
1845         src/test/test-fw-util.c
1846
1847 test_fw_util_CFLAGS = \
1848         $(AM_CFLAGS) \
1849         $(LIBIPTC_CFLAGS)
1850
1851 test_fw_util_LDADD = \
1852         libsystemd-fw.la \
1853         libsystemd-shared.la \
1854         $(LIBIPTC_LIBS)
1855 endif
1856
1857 test_rtnl_manual_SOURCES = \
1858         src/test/test-rtnl-manual.c
1859
1860 test_rtnl_manual_CFLAGS = \
1861         $(AM_CFLAGS) \
1862         $(KMOD_CFLAGS)
1863
1864 test_rtnl_manual_LDADD = \
1865         libsystemd-internal.la \
1866         libsystemd-shared.la \
1867         $(KMOD_LIBS)
1868
1869 test_ellipsize_SOURCES = \
1870         src/test/test-ellipsize.c
1871
1872 test_ellipsize_LDADD = \
1873         libsystemd-shared.la
1874
1875 test_date_SOURCES = \
1876         src/test/test-date.c
1877
1878 test_date_LDADD = \
1879         libsystemd-shared.la
1880
1881 test_sleep_SOURCES = \
1882         src/test/test-sleep.c
1883
1884 test_sleep_LDADD = \
1885         libsystemd-core.la
1886
1887 test_replace_var_SOURCES = \
1888         src/test/test-replace-var.c
1889
1890 test_replace_var_LDADD = \
1891         libsystemd-shared.la
1892
1893 test_calendarspec_SOURCES = \
1894         src/test/test-calendarspec.c
1895
1896 test_calendarspec_LDADD = \
1897         libsystemd-shared.la
1898
1899 test_strip_tab_ansi_SOURCES = \
1900         src/test/test-strip-tab-ansi.c
1901
1902 test_strip_tab_ansi_LDADD = \
1903         libsystemd-shared.la
1904
1905 test_daemon_SOURCES = \
1906         src/test/test-daemon.c
1907
1908 test_daemon_LDADD = \
1909         libsystemd-internal.la \
1910         libsystemd-shared.la
1911
1912 test_cgroup_SOURCES = \
1913         src/test/test-cgroup.c
1914
1915 test_cgroup_LDADD = \
1916         libsystemd-label.la \
1917         libsystemd-shared.la \
1918         libsystemd-internal.la
1919
1920 test_cgroup_mask_SOURCES = \
1921         src/test/test-cgroup-mask.c
1922
1923 test_cgroup_mask_CPPFLAGS = \
1924         $(AM_CPPFLAGS)
1925
1926 test_cgroup_mask_CFLAGS = \
1927         $(AM_CFLAGS) \
1928         $(SECCOMP_CFLAGS)
1929
1930 test_cgroup_mask_LDADD = \
1931         libsystemd-core.la \
1932         $(RT_LIBS)
1933
1934 test_cgroup_util_SOURCES = \
1935         src/test/test-cgroup-util.c
1936
1937 test_cgroup_util_LDADD = \
1938         libsystemd-label.la \
1939         libsystemd-internal.la \
1940         libsystemd-shared.la
1941
1942 test_env_replace_SOURCES = \
1943         src/test/test-env-replace.c
1944
1945 test_env_replace_LDADD = \
1946         libsystemd-shared.la
1947
1948 test_strbuf_SOURCES = \
1949         src/test/test-strbuf.c
1950
1951 test_strbuf_LDADD = \
1952         libsystemd-shared.la
1953
1954 test_strv_SOURCES = \
1955         src/test/test-strv.c
1956
1957 test_strv_LDADD = \
1958         libsystemd-units.la \
1959         libsystemd-internal.la \
1960         libsystemd-shared.la
1961
1962 test_path_util_SOURCES = \
1963         src/test/test-path-util.c
1964
1965 test_path_util_LDADD = \
1966         libsystemd-shared.la
1967
1968 test_path_SOURCES = \
1969         src/test/test-path.c
1970
1971 test_path_CFLAGS = \
1972         $(AM_CFLAGS)
1973
1974 test_path_LDADD = \
1975         libsystemd-core.la
1976
1977 test_execute_SOURCES = \
1978         src/test/test-execute.c
1979
1980 test_execute_CFLAGS = \
1981         $(AM_CFLAGS)
1982
1983 test_execute_LDADD = \
1984         libsystemd-core.la
1985
1986 test_strxcpyx_SOURCES = \
1987         src/test/test-strxcpyx.c
1988
1989 test_strxcpyx_LDADD = \
1990         libsystemd-shared.la
1991
1992 test_install_SOURCES = \
1993         src/test/test-install.c
1994
1995 test_install_LDADD = \
1996         libsystemd-units.la \
1997         libsystemd-label.la \
1998         libsystemd-shared.la \
1999         libsystemd-internal.la
2000
2001 test_watchdog_SOURCES = \
2002         src/test/test-watchdog.c
2003
2004 test_watchdog_LDADD = \
2005         libsystemd-shared.la
2006
2007 test_sched_prio_SOURCES = \
2008         src/test/test-sched-prio.c
2009
2010 test_sched_prio_CPPFLAGS = \
2011         $(AM_CPPFLAGS)
2012
2013 test_sched_prio_CFLAGS = \
2014         $(AM_CFLAGS) \
2015         $(SECCOMP_CFLAGS)
2016
2017 test_sched_prio_LDADD = \
2018         libsystemd-core.la \
2019         $(RT_LIBS)
2020
2021 test_conf_files_SOURCES = \
2022         src/test/test-conf-files.c
2023
2024 test_conf_files_LDADD = \
2025         libsystemd-shared.la
2026
2027 test_bus_policy_SOURCES = \
2028         src/bus-proxyd/test-bus-xml-policy.c
2029
2030 test_bus_policy_LDADD = \
2031         libsystemd-proxy.la \
2032         libsystemd-internal.la \
2033         libsystemd-shared.la
2034
2035 # ------------------------------------------------------------------------------
2036 ## .PHONY so it always rebuilds it
2037 .PHONY: coverage lcov-run lcov-report coverage-sync
2038
2039 # run lcov from scratch, always
2040 coverage: all
2041         $(MAKE) lcov-run
2042         $(MAKE) lcov-report
2043
2044 coverage_dir = coverage
2045 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2046
2047 if ENABLE_COVERAGE
2048 # reset run coverage tests
2049 lcov-run:
2050         @rm -rf $(coverage_dir)
2051         lcov $(coverage_opts) --zerocounters
2052         -$(MAKE) check
2053
2054 # generate report based on current coverage data
2055 lcov-report:
2056         $(MKDIR_P) $(coverage_dir)
2057         lcov $(coverage_opts) --compat-libtool --capture --no-external \
2058                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
2059         lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2060         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
2061         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2062
2063 # lcov doesn't work properly with vpath builds, make sure that bad
2064 # output is not uploaded by mistake.
2065 coverage-sync: coverage
2066         test "$(builddir)" = "$(srcdir)"
2067         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2068
2069 else
2070 lcov-run lcov-report:
2071         echo "Need to reconfigure with --enable-coverage"
2072 endif
2073
2074 # ------------------------------------------------------------------------------
2075 systemd_analyze_SOURCES = \
2076         src/analyze/analyze.c \
2077         src/analyze/analyze-verify.c \
2078         src/analyze/analyze-verify.h
2079
2080 systemd_verify_CFLAGS = \
2081         $(AM_CFLAGS) \
2082         $(SECCOMP_CFLAGS)
2083
2084 systemd_analyze_LDADD = \
2085         libsystemd-core.la \
2086         libsystemd-internal.la \
2087         libsystemd-shared.la \
2088         $(RT_LIBS)
2089
2090 # ------------------------------------------------------------------------------
2091 systemd_initctl_SOURCES = \
2092         src/initctl/initctl.c
2093
2094 systemd_initctl_LDADD = \
2095         libsystemd-internal.la \
2096         libsystemd-shared.la
2097
2098 # ------------------------------------------------------------------------------
2099 systemd_update_utmp_SOURCES = \
2100         src/update-utmp/update-utmp.c
2101
2102 systemd_update_utmp_CFLAGS = \
2103         $(AM_CFLAGS) \
2104         $(AUDIT_CFLAGS)
2105
2106 systemd_update_utmp_LDADD = \
2107         libsystemd-internal.la \
2108         libsystemd-shared.la \
2109         $(AUDIT_LIBS)
2110
2111 # ------------------------------------------------------------------------------
2112 systemd_update_done_SOURCES = \
2113         src/update-done/update-done.c
2114
2115 systemd_update_done_LDADD = \
2116         libsystemd-internal.la \
2117         libsystemd-label.la \
2118         libsystemd-shared.la
2119
2120 # ------------------------------------------------------------------------------
2121 systemd_shutdownd_SOURCES = \
2122         src/shutdownd/shutdownd.c
2123
2124 systemd_shutdownd_LDADD = \
2125         libsystemd-label.la \
2126         libsystemd-internal.la \
2127         libsystemd-shared.la
2128
2129 dist_doc_DATA += \
2130         src/systemd/sd-shutdown.h
2131
2132 # ------------------------------------------------------------------------------
2133 systemd_shutdown_SOURCES = \
2134         src/core/umount.c \
2135         src/core/umount.h \
2136         src/core/shutdown.c \
2137         src/core/mount-setup.c \
2138         src/core/mount-setup.h \
2139         src/core/killall.h \
2140         src/core/killall.c
2141
2142 systemd_shutdown_LDADD = \
2143         libsystemd-label.la \
2144         libudev-internal.la \
2145         libsystemd-shared.la
2146
2147 # ------------------------------------------------------------------------------
2148 if HAVE_KMOD
2149 systemd_modules_load_SOURCES = \
2150         src/modules-load/modules-load.c
2151
2152 systemd_modules_load_CFLAGS = \
2153         $(AM_CFLAGS) \
2154         $(KMOD_CFLAGS)
2155
2156 systemd_modules_load_LDADD = \
2157         libsystemd-shared.la \
2158         $(KMOD_LIBS)
2159
2160 rootlibexec_PROGRAMS += \
2161         systemd-modules-load
2162
2163 nodist_systemunit_DATA += \
2164         units/systemd-modules-load.service
2165
2166 SYSINIT_TARGET_WANTS += \
2167         systemd-modules-load.service
2168
2169 if ENABLE_TMPFILES
2170 nodist_systemunit_DATA += \
2171         units/kmod-static-nodes.service
2172
2173 SYSINIT_TARGET_WANTS += \
2174         kmod-static-nodes.service
2175 endif
2176 endif
2177
2178 EXTRA_DIST += \
2179         units/systemd-modules-load.service.in \
2180         units/kmod-static-nodes.service.in
2181
2182 # ------------------------------------------------------------------------------
2183 if ENABLE_TMPFILES
2184 systemd_tmpfiles_SOURCES = \
2185         src/tmpfiles/tmpfiles.c
2186
2187 systemd_tmpfiles_LDADD = \
2188         libsystemd-units.la \
2189         libsystemd-label.la \
2190         libsystemd-internal.la \
2191         libsystemd-shared.la
2192
2193 rootbin_PROGRAMS += \
2194         systemd-tmpfiles
2195
2196 dist_systemunit_DATA += \
2197         units/systemd-tmpfiles-clean.timer
2198
2199 nodist_systemunit_DATA += \
2200         units/systemd-tmpfiles-setup-dev.service \
2201         units/systemd-tmpfiles-setup.service \
2202         units/systemd-tmpfiles-clean.service
2203
2204 nodist_tmpfiles_DATA = \
2205         tmpfiles.d/etc.conf
2206
2207 dist_tmpfiles_DATA = \
2208         tmpfiles.d/systemd.conf \
2209         tmpfiles.d/systemd-nologin.conf \
2210         tmpfiles.d/tmp.conf \
2211         tmpfiles.d/x11.conf \
2212         tmpfiles.d/var.conf
2213
2214 if HAVE_SYSV_COMPAT
2215 dist_tmpfiles_DATA += \
2216         tmpfiles.d/legacy.conf
2217 endif
2218
2219 SYSINIT_TARGET_WANTS += \
2220         systemd-tmpfiles-setup-dev.service \
2221         systemd-tmpfiles-setup.service
2222
2223 dist_zshcompletion_DATA += \
2224         shell-completion/zsh/_systemd-tmpfiles
2225
2226 TIMERS_TARGET_WANTS += \
2227         systemd-tmpfiles-clean.timer
2228
2229 INSTALL_DIRS += \
2230         $(tmpfilesdir) \
2231         $(sysconfdir)/tmpfiles.d
2232 endif
2233
2234 EXTRA_DIST += \
2235         tmpfiles.d/etc.conf.m4 \
2236         units/systemd-tmpfiles-setup-dev.service.in \
2237         units/systemd-tmpfiles-setup.service.in \
2238         units/systemd-tmpfiles-clean.service.in
2239
2240 CLEANFILES += \
2241         tmpfiles.d/etc.conf
2242
2243 # ------------------------------------------------------------------------------
2244 if ENABLE_SYSUSERS
2245 systemd_sysusers_SOURCES = \
2246         src/sysusers/sysusers.c
2247
2248 systemd_sysusers_LDADD = \
2249         libsystemd-units.la \
2250         libsystemd-label.la \
2251         libsystemd-internal.la \
2252         libsystemd-shared.la
2253
2254 rootbin_PROGRAMS += \
2255         systemd-sysusers
2256
2257 nodist_systemunit_DATA += \
2258         units/systemd-sysusers.service
2259
2260 SYSINIT_TARGET_WANTS += \
2261         systemd-sysusers.service
2262
2263 dist_sysusers_DATA = \
2264         sysusers.d/systemd.conf
2265
2266 nodist_sysusers_DATA = \
2267         sysusers.d/basic.conf
2268
2269 EXTRA_DIST += \
2270         units/systemd-sysusers.service.in \
2271         sysusers.d/basic.conf.in
2272
2273 CLEANFILES += \
2274         sysusers.d/basic.conf
2275
2276 INSTALL_DIRS += \
2277         $(sysusersdir)
2278 endif
2279
2280 # ------------------------------------------------------------------------------
2281 dist_factory_etc_DATA = \
2282         factory/etc/nsswitch.conf
2283
2284 if HAVE_PAM
2285 dist_factory_pam_DATA = \
2286         factory/etc/pam.d/system-auth \
2287         factory/etc/pam.d/other
2288 endif
2289
2290 # ------------------------------------------------------------------------------
2291 if ENABLE_FIRSTBOOT
2292 systemd_firstboot_SOURCES = \
2293         src/firstboot/firstboot.c
2294
2295 systemd_firstboot_LDADD = \
2296         libsystemd-units.la \
2297         libsystemd-label.la \
2298         libsystemd-internal.la \
2299         libsystemd-shared.la \
2300         -lcrypt
2301
2302 rootbin_PROGRAMS += \
2303         systemd-firstboot
2304
2305 nodist_systemunit_DATA += \
2306         units/systemd-firstboot.service
2307
2308 EXTRA_DIST += \
2309         units/systemd-firstboot.service.in
2310
2311 SYSINIT_TARGET_WANTS += \
2312         systemd-firstboot.service
2313 endif
2314
2315 # ------------------------------------------------------------------------------
2316 systemd_machine_id_setup_SOURCES = \
2317         src/machine-id-setup/machine-id-setup-main.c \
2318         src/core/machine-id-setup.c \
2319         src/core/machine-id-setup.h
2320
2321 systemd_machine_id_setup_LDADD = \
2322         libsystemd-label.la \
2323         libsystemd-internal.la \
2324         libsystemd-shared.la
2325
2326 # ------------------------------------------------------------------------------
2327 systemd_sysctl_SOURCES = \
2328         src/sysctl/sysctl.c
2329
2330 systemd_sysctl_LDADD = \
2331         libsystemd-shared.la
2332
2333 # ------------------------------------------------------------------------------
2334 systemd_sleep_SOURCES = \
2335         src/sleep/sleep.c
2336
2337 systemd_sleep_LDADD = \
2338         libsystemd-shared.la
2339
2340 # ------------------------------------------------------------------------------
2341 systemd_fsck_SOURCES = \
2342         src/fsck/fsck.c
2343
2344 systemd_fsck_LDADD = \
2345         libsystemd-internal.la \
2346         libudev-internal.la \
2347         libsystemd-shared.la
2348
2349 # ------------------------------------------------------------------------------
2350 systemd_machine_id_commit_SOURCES = \
2351         src/machine-id-commit/machine-id-commit.c \
2352         src/core/machine-id-setup.c \
2353         src/core/machine-id-setup.h
2354
2355 systemd_machine_id_commit_LDADD = \
2356         libsystemd-label.la \
2357         libsystemd-internal.la \
2358         libsystemd-shared.la
2359
2360 SYSINIT_TARGET_WANTS += \
2361         systemd-machine-id-commit.service
2362
2363 # ------------------------------------------------------------------------------
2364 systemd_ac_power_SOURCES = \
2365         src/ac-power/ac-power.c
2366
2367 systemd_ac_power_LDADD = \
2368         libudev-internal.la \
2369         libsystemd-shared.la
2370
2371 # ------------------------------------------------------------------------------
2372 systemd_detect_virt_SOURCES = \
2373         src/detect-virt/detect-virt.c
2374
2375 systemd_detect_virt_LDADD = \
2376         libsystemd-shared.la
2377
2378 INSTALL_EXEC_HOOKS += \
2379         systemd-detect-virt-install-hook
2380
2381 # ------------------------------------------------------------------------------
2382 systemd_delta_SOURCES = \
2383         src/delta/delta.c
2384
2385 systemd_delta_LDADD = \
2386         libsystemd-shared.la
2387
2388 # ------------------------------------------------------------------------------
2389 systemd_getty_generator_SOURCES = \
2390         src/getty-generator/getty-generator.c
2391
2392 systemd_getty_generator_LDADD = \
2393         libsystemd-label.la \
2394         libsystemd-shared.la
2395
2396 # ------------------------------------------------------------------------------
2397 systemd_debug_generator_SOURCES = \
2398         src/debug-generator/debug-generator.c
2399
2400 systemd_debug_generator_LDADD = \
2401         libsystemd-label.la \
2402         libsystemd-shared.la
2403
2404 # ------------------------------------------------------------------------------
2405 systemd_fstab_generator_SOURCES = \
2406         src/fstab-generator/fstab-generator.c \
2407         src/core/mount-setup.c
2408
2409 systemd_fstab_generator_LDADD = \
2410         libsystemd-label.la \
2411         libsystemd-shared.la
2412
2413 # ------------------------------------------------------------------------------
2414 systemd_system_update_generator_SOURCES = \
2415         src/system-update-generator/system-update-generator.c
2416
2417 systemd_system_update_generator_LDADD = \
2418         libsystemd-label.la \
2419         libsystemd-shared.la
2420
2421 # ------------------------------------------------------------------------------
2422 if ENABLE_HIBERNATE
2423 systemgenerator_PROGRAMS += \
2424         systemd-hibernate-resume-generator
2425
2426 rootlibexec_PROGRAMS += \
2427         systemd-hibernate-resume
2428
2429 systemd_hibernate_resume_SOURCES = \
2430         src/hibernate-resume/hibernate-resume.c
2431
2432 systemd_hibernate_resume_LDADD = \
2433         libsystemd-internal.la \
2434         libsystemd-shared.la
2435
2436 systemd_hibernate_resume_generator_SOURCES = \
2437         src/hibernate-resume/hibernate-resume-generator.c
2438
2439 systemd_hibernate_resume_generator_LDADD = \
2440         libsystemd-label.la \
2441         libsystemd-shared.la
2442
2443 EXTRA_DIST += \
2444         units/systemd-hibernate.service.in \
2445         units/systemd-hibernate-resume@.service.in \
2446         units/systemd-hybrid-sleep.service.in
2447
2448 dist_systemunit_DATA += \
2449         units/hibernate.target \
2450         units/hybrid-sleep.target
2451
2452 nodist_systemunit_DATA += \
2453         units/systemd-hibernate.service \
2454         units/systemd-hibernate-resume@.service \
2455         units/systemd-hybrid-sleep.service
2456 endif
2457
2458 # ------------------------------------------------------------------------------
2459 if ENABLE_EFI
2460 systemgenerator_PROGRAMS +=  \
2461         systemd-efi-boot-generator
2462
2463 systemd_efi_boot_generator_SOURCES = \
2464         src/efi-boot-generator/efi-boot-generator.c
2465
2466 systemd_efi_boot_generator_LDADD = \
2467         libsystemd-label.la \
2468         libsystemd-shared.la
2469
2470 # ------------------------------------------------------------------------------
2471 bootctl_SOURCES = \
2472         src/boot/boot.h \
2473         src/boot/boot-loader.h \
2474         src/boot/bootctl.c \
2475         src/boot/boot-loader.c \
2476         src/boot/boot-efi.c
2477
2478 bootctl_LDADD = \
2479         libsystemd-shared.la \
2480         libsystemd-internal.la
2481
2482 bin_PROGRAMS += \
2483         bootctl
2484
2485 dist_bashcompletion_DATA += \
2486         shell-completion/bash/bootctl
2487
2488 dist_zshcompletion_DATA += \
2489         shell-completion/zsh/_bootctl
2490
2491 endif
2492
2493 # ------------------------------------------------------------------------------
2494 if HAVE_BLKID
2495 systemgenerator_PROGRAMS +=  \
2496         systemd-gpt-auto-generator
2497
2498 systemd_gpt_auto_generator_SOURCES = \
2499         src/gpt-auto-generator/gpt-auto-generator.c \
2500         src/shared/blkid-util.h
2501
2502 systemd_gpt_auto_generator_LDADD = \
2503         libsystemd-label.la \
2504         libsystemd-internal.la \
2505         libudev-internal.la \
2506         libsystemd-shared.la \
2507         $(BLKID_LIBS)
2508
2509 systemd_gpt_auto_generator_CFLAGS = \
2510         $(AM_CFLAGS) \
2511         $(BLKID_CFLAGS)
2512 endif
2513
2514 # ------------------------------------------------------------------------------
2515 if ENABLE_KDBUS
2516 systemgenerator_PROGRAMS +=  \
2517         systemd-dbus1-generator
2518
2519 systemd_dbus1_generator_SOURCES = \
2520         src/dbus1-generator/dbus1-generator.c
2521
2522 systemd_dbus1_generator_LDADD = \
2523         libsystemd-label.la \
2524         libsystemd-internal.la \
2525         libsystemd-shared.la
2526
2527 dbus1-generator-install-hook:
2528         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2529         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2530         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2531
2532 dbus1-generator-uninstall-hook:
2533         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2534
2535 dist_xinitrc_SCRIPTS = \
2536         xorg/50-systemd-user.sh
2537
2538 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2539 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2540 endif
2541
2542 # ------------------------------------------------------------------------------
2543 systemd_sysv_generator_SOURCES = \
2544         src/sysv-generator/sysv-generator.c
2545
2546 systemd_sysv_generator_LDADD = \
2547         libsystemd-core.la \
2548         libsystemd-label.la \
2549         libsystemd-shared.la
2550
2551 # ------------------------------------------------------------------------------
2552 systemd_rc_local_generator_SOURCES = \
2553         src/rc-local-generator/rc-local-generator.c
2554
2555 systemd_rc_local_generator_LDADD = \
2556         libsystemd-label.la \
2557         libsystemd-shared.la
2558
2559 # ------------------------------------------------------------------------------
2560 systemd_remount_fs_SOURCES = \
2561         src/remount-fs/remount-fs.c \
2562         src/core/mount-setup.c \
2563         src/core/mount-setup.h
2564
2565 systemd_remount_fs_LDADD = \
2566         libsystemd-label.la \
2567         libsystemd-shared.la
2568
2569 # ------------------------------------------------------------------------------
2570 systemd_cgroups_agent_SOURCES = \
2571         src/cgroups-agent/cgroups-agent.c
2572
2573 systemd_cgroups_agent_LDADD = \
2574         libsystemd-internal.la \
2575         libsystemd-shared.la
2576
2577 # ------------------------------------------------------------------------------
2578 systemd_escape_SOURCES = \
2579         src/escape/escape.c
2580
2581 systemd_escape_LDADD = \
2582         libsystemd-shared.la
2583
2584 # -----------------------------------------------------------------------------
2585 systemctl_SOURCES = \
2586         src/systemctl/systemctl.c
2587
2588 systemctl_LDADD = \
2589         libsystemd-units.la \
2590         libsystemd-label.la \
2591         libsystemd-internal.la \
2592         libsystemd-logs.la \
2593         libsystemd-journal-internal.la \
2594         libsystemd-shared.la
2595
2596 # ------------------------------------------------------------------------------
2597 systemd_notify_SOURCES = \
2598         src/notify/notify.c
2599
2600 systemd_notify_LDADD = \
2601         libsystemd-internal.la \
2602         libsystemd-shared.la
2603
2604 # ------------------------------------------------------------------------------
2605 systemd_path_SOURCES = \
2606         src/path/path.c
2607
2608 systemd_path_LDADD = \
2609         libsystemd-internal.la \
2610         libsystemd-shared.la
2611
2612 # ------------------------------------------------------------------------------
2613 systemd_ask_password_SOURCES = \
2614         src/ask-password/ask-password.c
2615
2616 systemd_ask_password_LDADD = \
2617         libsystemd-label.la \
2618         libsystemd-shared.la
2619
2620 # ------------------------------------------------------------------------------
2621 systemd_reply_password_SOURCES = \
2622         src/reply-password/reply-password.c
2623
2624 systemd_reply_password_LDADD = \
2625         libsystemd-shared.la
2626
2627 # ------------------------------------------------------------------------------
2628 systemd_cgls_SOURCES = \
2629         src/cgls/cgls.c
2630
2631 systemd_cgls_LDADD = \
2632         libsystemd-internal.la \
2633         libsystemd-shared.la
2634
2635 # ------------------------------------------------------------------------------
2636 systemd_cgtop_SOURCES = \
2637         src/cgtop/cgtop.c
2638
2639 systemd_cgtop_LDADD = \
2640         libsystemd-shared.la
2641
2642 # ------------------------------------------------------------------------------
2643 systemd_nspawn_SOURCES = \
2644         src/nspawn/nspawn.c \
2645         src/core/mount-setup.c \
2646         src/core/mount-setup.h \
2647         src/core/loopback-setup.c \
2648         src/core/loopback-setup.h
2649
2650 systemd_nspawn_CFLAGS = \
2651         $(AM_CFLAGS) \
2652         $(SECCOMP_CFLAGS) \
2653         $(BLKID_CFLAGS)
2654
2655 systemd_nspawn_LDADD = \
2656         libsystemd-label.la \
2657         libsystemd-internal.la \
2658         libudev-internal.la \
2659         libsystemd-shared.la \
2660         $(BLKID_LIBS)
2661
2662 if HAVE_SECCOMP
2663 systemd_nspawn_LDADD += \
2664         libsystemd-seccomp.la \
2665         $(SECCOMP_LIBS)
2666 endif
2667
2668 if HAVE_LIBIPTC
2669 systemd_nspawn_LDADD += \
2670         libsystemd-fw.la
2671 endif
2672
2673 # ------------------------------------------------------------------------------
2674 systemd_run_SOURCES = \
2675         src/run/run.c
2676
2677 systemd_run_LDADD = \
2678         libsystemd-label.la \
2679         libsystemd-internal.la \
2680         libsystemd-shared.la
2681
2682 # ------------------------------------------------------------------------------
2683 noinst_LTLIBRARIES += \
2684         libsystemd-proxy.la
2685
2686 libsystemd_proxy_la_SOURCES = \
2687         src/bus-proxyd/bus-xml-policy.c \
2688         src/bus-proxyd/bus-xml-policy.h \
2689         src/bus-proxyd/driver.c \
2690         src/bus-proxyd/driver.h \
2691         src/bus-proxyd/proxy.c \
2692         src/bus-proxyd/proxy.h \
2693         src/bus-proxyd/synthesize.c \
2694         src/bus-proxyd/synthesize.h
2695
2696 libsystemd_proxy_la_CFLAGS = \
2697         $(AM_CFLAGS) \
2698         -pthread
2699
2700 libsystemd_proxy_la_LIBADD = \
2701         libsystemd-internal.la \
2702         libsystemd-shared.la
2703
2704 systemd_bus_proxyd_SOURCES = \
2705         src/bus-proxyd/bus-proxyd.c
2706
2707 systemd_bus_proxyd_CFLAGS = \
2708         $(AM_CFLAGS) \
2709         -pthread
2710
2711 systemd_bus_proxyd_LDADD = \
2712         libsystemd-proxy.la \
2713         libsystemd-internal.la \
2714         libsystemd-shared.la
2715
2716 systemd_stdio_bridge_SOURCES = \
2717         src/bus-proxyd/stdio-bridge.c
2718
2719 systemd_stdio_bridge_LDADD = \
2720         libsystemd-proxy.la \
2721         libsystemd-internal.la \
2722         libsystemd-shared.la
2723
2724 if ENABLE_KDBUS
2725 nodist_systemunit_DATA += \
2726         units/systemd-bus-proxyd.service
2727
2728 dist_systemunit_DATA += \
2729         units/systemd-bus-proxyd.socket
2730
2731 nodist_userunit_DATA += \
2732         units/user/systemd-bus-proxyd.service
2733
2734 dist_userunit_DATA += \
2735         units/user/systemd-bus-proxyd.socket
2736 endif
2737
2738 EXTRA_DIST += \
2739         units/systemd-bus-proxyd.service.m4.in \
2740         units/user/systemd-bus-proxyd.service.in
2741
2742 CLEANFILES += \
2743         units/systemd-bus-proxyd.service.m4
2744
2745 if HAVE_SMACK
2746 bus-proxyd-set-cap-hook:
2747         -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
2748
2749 INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
2750 endif
2751
2752 # ------------------------------------------------------------------------------
2753 systemd_tty_ask_password_agent_SOURCES = \
2754         src/tty-ask-password-agent/tty-ask-password-agent.c
2755
2756 systemd_tty_ask_password_agent_LDADD = \
2757         libsystemd-label.la \
2758         libsystemd-shared.la
2759
2760 # ------------------------------------------------------------------------------
2761 libsystemd_internal_la_SOURCES = \
2762         src/systemd/sd-bus.h \
2763         src/systemd/sd-bus-protocol.h \
2764         src/systemd/sd-bus-vtable.h \
2765         src/systemd/sd-utf8.h \
2766         src/systemd/sd-event.h \
2767         src/systemd/sd-rtnl.h \
2768         src/systemd/sd-resolve.h \
2769         src/systemd/sd-login.h \
2770         src/systemd/sd-id128.h \
2771         src/systemd/sd-daemon.h \
2772         src/systemd/sd-path.h \
2773         src/systemd/sd-network.h \
2774         src/systemd/sd-hwdb.h \
2775         src/libsystemd/sd-bus/sd-bus.c \
2776         src/libsystemd/sd-bus/bus-control.c \
2777         src/libsystemd/sd-bus/bus-control.h \
2778         src/libsystemd/sd-bus/bus-error.c \
2779         src/libsystemd/sd-bus/bus-error.h \
2780         src/libsystemd/sd-bus/bus-common-errors.h \
2781         src/libsystemd/sd-bus/bus-common-errors.c \
2782         src/libsystemd/sd-bus/bus-internal.c \
2783         src/libsystemd/sd-bus/bus-internal.h \
2784         src/libsystemd/sd-bus/bus-socket.c \
2785         src/libsystemd/sd-bus/bus-socket.h \
2786         src/libsystemd/sd-bus/bus-kernel.c \
2787         src/libsystemd/sd-bus/bus-kernel.h \
2788         src/libsystemd/sd-bus/bus-container.c \
2789         src/libsystemd/sd-bus/bus-container.h \
2790         src/libsystemd/sd-bus/bus-message.c \
2791         src/libsystemd/sd-bus/bus-message.h \
2792         src/libsystemd/sd-bus/bus-creds.c \
2793         src/libsystemd/sd-bus/bus-creds.h \
2794         src/libsystemd/sd-bus/bus-signature.c \
2795         src/libsystemd/sd-bus/bus-signature.h \
2796         src/libsystemd/sd-bus/bus-type.c \
2797         src/libsystemd/sd-bus/bus-type.h \
2798         src/libsystemd/sd-bus/bus-match.c \
2799         src/libsystemd/sd-bus/bus-match.h \
2800         src/libsystemd/sd-bus/bus-bloom.c \
2801         src/libsystemd/sd-bus/bus-bloom.h \
2802         src/libsystemd/sd-bus/bus-introspect.c \
2803         src/libsystemd/sd-bus/bus-introspect.h \
2804         src/libsystemd/sd-bus/bus-objects.c \
2805         src/libsystemd/sd-bus/bus-objects.h \
2806         src/libsystemd/sd-bus/bus-gvariant.c \
2807         src/libsystemd/sd-bus/bus-gvariant.h \
2808         src/libsystemd/sd-bus/bus-convenience.c \
2809         src/libsystemd/sd-bus/bus-track.c \
2810         src/libsystemd/sd-bus/bus-track.h \
2811         src/libsystemd/sd-bus/bus-util.c \
2812         src/libsystemd/sd-bus/bus-util.h \
2813         src/libsystemd/sd-bus/bus-slot.c \
2814         src/libsystemd/sd-bus/bus-slot.h \
2815         src/libsystemd/sd-bus/bus-protocol.h \
2816         src/libsystemd/sd-bus/kdbus.h \
2817         src/libsystemd/sd-utf8/sd-utf8.c \
2818         src/libsystemd/sd-event/sd-event.c \
2819         src/libsystemd/sd-event/event-util.h \
2820         src/libsystemd/sd-rtnl/sd-rtnl.c \
2821         src/libsystemd/sd-rtnl/rtnl-internal.h \
2822         src/libsystemd/sd-rtnl/rtnl-message.c \
2823         src/libsystemd/sd-rtnl/rtnl-types.h \
2824         src/libsystemd/sd-rtnl/rtnl-types.c \
2825         src/libsystemd/sd-rtnl/rtnl-util.h \
2826         src/libsystemd/sd-rtnl/rtnl-util.c \
2827         src/libsystemd/sd-rtnl/local-addresses.h \
2828         src/libsystemd/sd-rtnl/local-addresses.c \
2829         src/libsystemd/sd-id128/sd-id128.c \
2830         src/libsystemd/sd-daemon/sd-daemon.c \
2831         src/libsystemd/sd-login/sd-login.c \
2832         src/libsystemd/sd-path/sd-path.c \
2833         src/libsystemd/sd-network/sd-network.c \
2834         src/libsystemd/sd-network/network-util.h \
2835         src/libsystemd/sd-network/network-util.c \
2836         src/libsystemd/sd-hwdb/sd-hwdb.c \
2837         src/libsystemd/sd-hwdb/hwdb-util.h \
2838         src/libsystemd/sd-hwdb/hwdb-internal.h
2839
2840 nodist_libsystemd_internal_la_SOURCES = \
2841         src/libsystemd/libsystemd.sym
2842
2843 libsystemd_internal_la_CFLAGS = \
2844         $(AM_CFLAGS) \
2845         -pthread
2846
2847 libsystemd_internal_la_LIBADD = \
2848         $(RT_LIBS)
2849
2850 libsystemd_resolve_la_SOURCES = \
2851         src/libsystemd/sd-resolve/sd-resolve.c \
2852         src/libsystemd/sd-resolve/resolve-util.h
2853
2854 libsystemd_resolve_la_CFLAGS = \
2855         $(AM_CFLAGS) \
2856         -pthread
2857
2858 libsystemd_resolve_la_LIBADD = \
2859         -lresolv
2860
2861 noinst_LTLIBRARIES += \
2862         libsystemd-internal.la \
2863         libsystemd-resolve.la
2864
2865 libsystemd_dump_la_SOURCES = \
2866         src/libsystemd/sd-bus/bus-dump.c \
2867         src/libsystemd/sd-bus/bus-dump.h
2868
2869 noinst_LTLIBRARIES += \
2870         libsystemd-dump.la
2871
2872 EXTRA_DIST += \
2873         src/libsystemd/libsystemd.sym.m4 \
2874         src/libsystemd/libsystemd.pc.in \
2875         src/libsystemd/sd-bus/DIFFERENCES \
2876         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2877
2878 CLEANFILES += \
2879         src/libsystemd/libsystemd.sym
2880
2881 BUILT_SOURCES += \
2882         src/libsystemd/libsystemd.sym
2883
2884 libsystemd_la_SOURCES = \
2885         $(libsystemd_internal_la_SOURCES) \
2886         $(libsystemd_resolve_la_SOURCES) \
2887         $(libsystemd_journal_internal_la_SOURCES)
2888
2889 nodist_libsystemd_la_SOURCES = \
2890         $(nodist_libsystemd_internal_la_SOURCES)
2891
2892 libsystemd_la_CFLAGS = \
2893         $(libsystemd_internal_la_CFLAGS) \
2894         $(libsystemd_resolve_la_CFLAGS) \
2895         $(libsystemd_journal_internal_la_CFLAGS)
2896
2897 libsystemd_la_LDFLAGS = \
2898         $(AM_LDFLAGS) \
2899         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2900         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2901
2902 libsystemd_la_LIBADD = \
2903         libsystemd-shared.la \
2904         $(libsystemd_internal_la_LIBADD) \
2905         $(libsystemd_journal_internal_la_LIBADD) \
2906         $(libsystemd_resolve_la_LIBADD)
2907
2908 libsystemd-install-hook:
2909         libname=libsystemd.so && $(move-to-rootlibdir)
2910
2911 libsystemd-uninstall-hook:
2912         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2913
2914 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2915 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2916
2917 pkgconfiglib_DATA += \
2918         src/libsystemd/libsystemd.pc
2919
2920 pkginclude_HEADERS += \
2921         src/systemd/sd-login.h \
2922         src/systemd/sd-id128.h \
2923         src/systemd/sd-daemon.h
2924
2925 if ENABLE_KDBUS
2926 pkginclude_HEADERS += \
2927         src/systemd/sd-bus.h \
2928         src/systemd/sd-bus-protocol.h \
2929         src/systemd/sd-bus-vtable.h \
2930         src/systemd/sd-utf8.h \
2931         src/systemd/sd-event.h \
2932         src/systemd/sd-rtnl.h \
2933         src/systemd/sd-resolve.h \
2934         src/systemd/sd-path.h
2935 endif
2936
2937 lib_LTLIBRARIES += \
2938         libsystemd.la
2939
2940 tests += \
2941         test-bus-marshal \
2942         test-bus-signature \
2943         test-bus-chat \
2944         test-bus-cleanup \
2945         test-bus-server \
2946         test-bus-match \
2947         test-bus-kernel \
2948         test-bus-kernel-bloom \
2949         test-bus-kernel-benchmark \
2950         test-bus-zero-copy \
2951         test-bus-introspect \
2952         test-bus-objects \
2953         test-bus-error \
2954         test-bus-creds \
2955         test-bus-gvariant \
2956         test-event \
2957         test-rtnl \
2958         test-local-addresses \
2959         test-resolve
2960
2961 bin_PROGRAMS += \
2962         busctl
2963
2964 test_bus_marshal_SOURCES = \
2965         src/libsystemd/sd-bus/test-bus-marshal.c
2966
2967 test_bus_marshal_LDADD = \
2968         libsystemd-dump.la \
2969         libsystemd-internal.la \
2970         libsystemd-shared.la \
2971         $(GLIB_LIBS) \
2972         $(DBUS_LIBS)
2973
2974 test_bus_marshal_CFLAGS = \
2975         $(AM_CFLAGS) \
2976         $(GLIB_CFLAGS) \
2977         $(DBUS_CFLAGS)
2978
2979 test_bus_signature_SOURCES = \
2980         src/libsystemd/sd-bus/test-bus-signature.c
2981
2982 test_bus_signature_LDADD = \
2983         libsystemd-internal.la \
2984         libsystemd-shared.la
2985
2986 test_bus_chat_SOURCES = \
2987         src/libsystemd/sd-bus/test-bus-chat.c
2988
2989 test_bus_chat_CFLAGS = \
2990         $(AM_CFLAGS) \
2991         -pthread
2992
2993 test_bus_chat_LDADD = \
2994         libsystemd-internal.la \
2995         libsystemd-shared.la
2996
2997 test_bus_cleanup_SOURCES = \
2998         src/libsystemd/sd-bus/test-bus-cleanup.c
2999
3000 test_bus_cleanup_CFLAGS = \
3001         $(AM_CFLAGS) \
3002         $(SECCOMP_CFLAGS)
3003
3004 test_bus_cleanup_LDADD = \
3005         libsystemd-internal.la \
3006         libsystemd-shared.la
3007
3008 test_bus_server_SOURCES = \
3009         src/libsystemd/sd-bus/test-bus-server.c
3010
3011 test_bus_server_CFLAGS = \
3012         $(AM_CFLAGS) \
3013         -pthread
3014
3015 test_bus_server_LDADD = \
3016         libsystemd-internal.la \
3017         libsystemd-shared.la
3018
3019 test_bus_objects_SOURCES = \
3020         src/libsystemd/sd-bus/test-bus-objects.c
3021
3022 test_bus_objects_CFLAGS = \
3023         $(AM_CFLAGS) \
3024         -pthread
3025
3026 test_bus_objects_LDADD = \
3027         libsystemd-dump.la \
3028         libsystemd-internal.la \
3029         libsystemd-shared.la
3030
3031 test_bus_error_SOURCES = \
3032         src/libsystemd/sd-bus/test-bus-error.c
3033
3034 test_bus_error_LDADD = \
3035         libsystemd-internal.la \
3036         libsystemd-shared.la
3037
3038 test_bus_gvariant_SOURCES = \
3039         src/libsystemd/sd-bus/test-bus-gvariant.c
3040
3041 test_bus_gvariant_LDADD = \
3042         libsystemd-dump.la \
3043         libsystemd-internal.la \
3044         libsystemd-shared.la \
3045         $(GLIB_LIBS)
3046
3047 test_bus_gvariant_CFLAGS = \
3048         $(AM_CFLAGS) \
3049         $(GLIB_CFLAGS)
3050
3051 test_bus_creds_SOURCES = \
3052         src/libsystemd/sd-bus/test-bus-creds.c
3053
3054 test_bus_creds_LDADD = \
3055         libsystemd-dump.la \
3056         libsystemd-internal.la \
3057         libsystemd-shared.la
3058
3059 test_bus_match_SOURCES = \
3060         src/libsystemd/sd-bus/test-bus-match.c
3061
3062 test_bus_match_LDADD = \
3063         libsystemd-internal.la \
3064         libsystemd-shared.la
3065
3066 test_bus_kernel_SOURCES = \
3067         src/libsystemd/sd-bus/test-bus-kernel.c
3068
3069 test_bus_kernel_LDADD = \
3070         libsystemd-dump.la \
3071         libsystemd-internal.la \
3072         libsystemd-shared.la
3073
3074 test_bus_kernel_bloom_SOURCES = \
3075         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3076
3077 test_bus_kernel_bloom_LDADD = \
3078         libsystemd-internal.la \
3079         libsystemd-shared.la
3080
3081 test_bus_kernel_benchmark_SOURCES = \
3082         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
3083
3084 test_bus_kernel_benchmark_LDADD = \
3085         libsystemd-internal.la \
3086         libsystemd-shared.la
3087
3088 test_bus_zero_copy_SOURCES = \
3089         src/libsystemd/sd-bus/test-bus-zero-copy.c
3090
3091 test_bus_zero_copy_LDADD = \
3092         libsystemd-dump.la \
3093         libsystemd-internal.la \
3094         libsystemd-shared.la
3095
3096 test_bus_introspect_SOURCES = \
3097         src/libsystemd/sd-bus/test-bus-introspect.c
3098
3099 test_bus_introspect_LDADD = \
3100         libsystemd-internal.la \
3101         libsystemd-shared.la
3102
3103 test_event_SOURCES = \
3104         src/libsystemd/sd-event/test-event.c
3105
3106 test_event_LDADD = \
3107         libsystemd-internal.la \
3108         libsystemd-shared.la
3109
3110 test_rtnl_SOURCES = \
3111         src/libsystemd/sd-rtnl/test-rtnl.c
3112
3113 test_rtnl_LDADD = \
3114         libsystemd-internal.la \
3115         libsystemd-shared.la
3116
3117 test_local_addresses_SOURCES = \
3118         src/libsystemd/sd-rtnl/test-local-addresses.c
3119
3120 test_local_addresses_LDADD = \
3121         libsystemd-internal.la \
3122         libsystemd-shared.la
3123
3124 test_resolve_SOURCES = \
3125         src/libsystemd/sd-resolve/test-resolve.c
3126
3127 test_resolve_LDADD = \
3128         libsystemd-resolve.la \
3129         libsystemd-internal.la \
3130         libsystemd-shared.la
3131
3132 test_resolve_CFLAGS = \
3133         $(AM_CFLAGS) \
3134         -pthread
3135
3136 busctl_SOURCES = \
3137         src/libsystemd/sd-bus/busctl.c \
3138         src/libsystemd/sd-bus/busctl-introspect.c \
3139         src/libsystemd/sd-bus/busctl-introspect.h
3140
3141 busctl_LDADD = \
3142         libsystemd-dump.la \
3143         libsystemd-internal.la \
3144         libsystemd-shared.la
3145
3146 # ------------------------------------------------------------------------------
3147 noinst_LTLIBRARIES += \
3148         libsystemd-network.la
3149
3150 libsystemd_network_la_CFLAGS = \
3151         $(AM_CFLAGS) \
3152         $(KMOD_CFLAGS)
3153
3154 libsystemd_network_la_SOURCES = \
3155         src/systemd/sd-dhcp-client.h \
3156         src/systemd/sd-dhcp-server.h \
3157         src/systemd/sd-dhcp-lease.h \
3158         src/systemd/sd-ipv4ll.h \
3159         src/systemd/sd-icmp6-nd.h \
3160         src/systemd/sd-dhcp6-client.h \
3161         src/systemd/sd-dhcp6-lease.h \
3162         src/systemd/sd-pppoe.h \
3163         src/systemd/sd-lldp.h \
3164         src/libsystemd-network/sd-dhcp-client.c \
3165         src/libsystemd-network/sd-dhcp-server.c \
3166         src/libsystemd-network/dhcp-network.c \
3167         src/libsystemd-network/dhcp-option.c \
3168         src/libsystemd-network/dhcp-packet.c \
3169         src/libsystemd-network/dhcp-internal.h \
3170         src/libsystemd-network/dhcp-server-internal.h \
3171         src/libsystemd-network/dhcp-protocol.h \
3172         src/libsystemd-network/dhcp-lease-internal.h \
3173         src/libsystemd-network/sd-dhcp-lease.c \
3174         src/libsystemd-network/sd-ipv4ll.c \
3175         src/libsystemd-network/ipv4ll-network.c \
3176         src/libsystemd-network/ipv4ll-packet.c \
3177         src/libsystemd-network/ipv4ll-internal.h \
3178         src/libsystemd-network/sd-pppoe.c \
3179         src/libsystemd-network/network-internal.c \
3180         src/libsystemd-network/network-internal.h \
3181         src/libsystemd-network/sd-icmp6-nd.c \
3182         src/libsystemd-network/sd-dhcp6-client.c \
3183         src/libsystemd-network/dhcp6-internal.h \
3184         src/libsystemd-network/dhcp6-protocol.h \
3185         src/libsystemd-network/dhcp6-network.c \
3186         src/libsystemd-network/dhcp6-option.c \
3187         src/libsystemd-network/dhcp6-lease-internal.h \
3188         src/libsystemd-network/sd-dhcp6-lease.c \
3189         src/libsystemd-network/lldp.h \
3190         src/libsystemd-network/lldp-tlv.h \
3191         src/libsystemd-network/lldp-tlv.c \
3192         src/libsystemd-network/lldp-network.h \
3193         src/libsystemd-network/lldp-network.c \
3194         src/libsystemd-network/lldp-port.h \
3195         src/libsystemd-network/lldp-port.c \
3196         src/libsystemd-network/lldp-internal.h \
3197         src/libsystemd-network/lldp-internal.c \
3198         src/libsystemd-network/lldp-util.h \
3199         src/libsystemd-network/sd-lldp.c
3200
3201 libsystemd_network_la_LIBADD = \
3202         libudev-internal.la \
3203         libsystemd-label.la \
3204         libsystemd-internal.la \
3205         libsystemd-shared.la \
3206         $(KMOD_LIBS)
3207
3208 test_dhcp_option_SOURCES = \
3209         src/libsystemd-network/dhcp-protocol.h \
3210         src/libsystemd-network/dhcp-internal.h \
3211         src/libsystemd-network/test-dhcp-option.c
3212
3213 test_dhcp_option_LDADD = \
3214         libsystemd-network.la \
3215         libsystemd-internal.la \
3216         libsystemd-shared.la
3217
3218 test_dhcp_client_SOURCES = \
3219         src/systemd/sd-dhcp-client.h \
3220         src/libsystemd-network/dhcp-protocol.h \
3221         src/libsystemd-network/dhcp-internal.h \
3222         src/libsystemd-network/test-dhcp-client.c
3223
3224 test_dhcp_client_LDADD = \
3225         libsystemd-network.la \
3226         libsystemd-label.la \
3227         libsystemd-internal.la \
3228         libsystemd-shared.la
3229
3230 test_dhcp_server_SOURCES = \
3231         src/libsystemd-network/test-dhcp-server.c
3232
3233 test_dhcp_server_LDADD = \
3234         libsystemd-network.la \
3235         libsystemd-internal.la \
3236         libsystemd-shared.la
3237
3238 test_ipv4ll_SOURCES = \
3239         src/systemd/sd-ipv4ll.h \
3240         src/libsystemd-network/ipv4ll-internal.h \
3241         src/libsystemd-network/test-ipv4ll.c
3242
3243 test_ipv4ll_LDADD = \
3244         libsystemd-network.la \
3245         libsystemd-label.la \
3246         libsystemd-internal.la \
3247         libsystemd-shared.la
3248
3249 test_pppoe_SOURCES = \
3250         src/systemd/sd-pppoe.h \
3251         src/libsystemd-network/test-pppoe.c
3252
3253 test_pppoe_LDADD = \
3254         libsystemd-network.la \
3255         libsystemd-shared.la
3256
3257 test_icmp6_rs_SOURCES = \
3258         src/systemd/sd-dhcp6-client.h \
3259         src/systemd/sd-icmp6-nd.h \
3260         src/libsystemd-network/dhcp6-internal.h \
3261         src/libsystemd-network/test-icmp6-rs.c
3262
3263 test_icmp6_rs_LDADD = \
3264         libsystemd-network.la \
3265         libsystemd-internal.la \
3266         libsystemd-shared.la
3267
3268 test_dhcp6_client_SOURCES = \
3269         src/systemd/sd-dhcp6-client.h \
3270         src/libsystemd-network/dhcp6-internal.h \
3271         src/libsystemd-network/test-dhcp6-client.c
3272
3273 test_dhcp6_client_LDADD = \
3274         libsystemd-network.la \
3275         libsystemd-internal.la \
3276         libsystemd-shared.la
3277
3278 test_lldp_SOURCES = \
3279        src/libsystemd-network/lldp.h \
3280        src/libsystemd-network/lldp-tlv.h \
3281        src/libsystemd-network/lldp-tlv.c \
3282        src/libsystemd-network/test-lldp.c
3283
3284 test_lldp_LDADD = \
3285         libsystemd-network.la \
3286         libsystemd-internal.la \
3287         libsystemd-shared.la
3288
3289 tests += \
3290         test-dhcp-option \
3291         test-dhcp-client \
3292         test-dhcp-server \
3293         test-ipv4ll \
3294         test-icmp6-rs \
3295         test-dhcp6-client \
3296         test-lldp
3297
3298 manual_tests += \
3299         test-pppoe
3300
3301 # ------------------------------------------------------------------------------
3302 if ENABLE_TERMINAL
3303 noinst_LTLIBRARIES += \
3304         libsystemd-terminal.la
3305
3306 rootlibexec_PROGRAMS += \
3307         systemd-consoled
3308
3309 noinst_PROGRAMS += \
3310         systemd-evcat \
3311         systemd-modeset \
3312         systemd-subterm
3313
3314 dist_pkgdata_DATA += \
3315         src/libsystemd-terminal/unifont-glyph-array.bin
3316
3317 nodist_userunit_DATA += \
3318         units/user/systemd-consoled.service
3319
3320 USER_DEFAULT_TARGET_WANTS += \
3321         systemd-consoled.service
3322
3323 tests += \
3324         test-term-page \
3325         test-term-parser \
3326         test-unifont
3327 endif
3328
3329 EXTRA_DIST += \
3330         units/user/systemd-consoled.service.in
3331
3332 libsystemd_terminal_la_CFLAGS = \
3333         $(AM_CFLAGS) \
3334         $(TERMINAL_CFLAGS)
3335
3336 libsystemd_terminal_la_SOURCES = \
3337         src/libsystemd-terminal/grdev.h \
3338         src/libsystemd-terminal/grdev-internal.h \
3339         src/libsystemd-terminal/grdev.c \
3340         src/libsystemd-terminal/grdev-drm.c \
3341         src/libsystemd-terminal/idev.h \
3342         src/libsystemd-terminal/idev-internal.h \
3343         src/libsystemd-terminal/idev.c \
3344         src/libsystemd-terminal/idev-evdev.c \
3345         src/libsystemd-terminal/idev-keyboard.c \
3346         src/libsystemd-terminal/sysview.h \
3347         src/libsystemd-terminal/sysview-internal.h \
3348         src/libsystemd-terminal/sysview.c \
3349         src/libsystemd-terminal/term.h \
3350         src/libsystemd-terminal/term-internal.h \
3351         src/libsystemd-terminal/term-charset.c \
3352         src/libsystemd-terminal/term-page.c \
3353         src/libsystemd-terminal/term-parser.c \
3354         src/libsystemd-terminal/term-screen.c \
3355         src/libsystemd-terminal/term-wcwidth.c \
3356         src/libsystemd-terminal/unifont.h \
3357         src/libsystemd-terminal/unifont-def.h \
3358         src/libsystemd-terminal/unifont.c
3359
3360 libsystemd_terminal_la_LIBADD = \
3361         libudev-internal.la \
3362         libsystemd-internal.la \
3363         libsystemd-shared.la \
3364         $(TERMINAL_LIBS)
3365
3366 systemd_consoled_CFLAGS = \
3367         $(AM_CFLAGS) \
3368         $(TERMINAL_CFLAGS)
3369
3370 systemd_consoled_SOURCES = \
3371         src/console/consoled.h \
3372         src/console/consoled.c \
3373         src/console/consoled-display.c \
3374         src/console/consoled-manager.c \
3375         src/console/consoled-session.c \
3376         src/console/consoled-terminal.c \
3377         src/console/consoled-workspace.c
3378
3379 systemd_consoled_LDADD = \
3380         libsystemd-terminal.la \
3381         libsystemd-internal.la \
3382         libsystemd-shared.la \
3383         $(TERMINAL_LIBS)
3384
3385 systemd_evcat_CFLAGS = \
3386         $(AM_CFLAGS) \
3387         $(TERMINAL_CFLAGS)
3388
3389 systemd_evcat_SOURCES = \
3390         src/libsystemd-terminal/evcat.c
3391
3392 systemd_evcat_LDADD = \
3393         libsystemd-terminal.la \
3394         libsystemd-internal.la \
3395         libsystemd-shared.la \
3396         $(TERMINAL_LIBS)
3397
3398 systemd_modeset_CFLAGS = \
3399         $(AM_CFLAGS) \
3400         $(TERMINAL_CFLAGS)
3401
3402 systemd_modeset_SOURCES = \
3403         src/libsystemd-terminal/modeset.c
3404
3405 systemd_modeset_LDADD = \
3406         libsystemd-terminal.la \
3407         libsystemd-internal.la \
3408         libsystemd-shared.la \
3409         $(TERMINAL_LIBS)
3410
3411 systemd_subterm_SOURCES = \
3412         src/libsystemd-terminal/subterm.c
3413
3414 systemd_subterm_LDADD = \
3415         libsystemd-terminal.la \
3416         libsystemd-internal.la \
3417         libsystemd-shared.la
3418
3419 test_term_page_SOURCES = \
3420         src/libsystemd-terminal/test-term-page.c
3421
3422 test_term_page_LDADD = \
3423         libsystemd-terminal.la \
3424         libsystemd-internal.la \
3425         libsystemd-shared.la
3426
3427 test_term_parser_SOURCES = \
3428         src/libsystemd-terminal/test-term-parser.c
3429
3430 test_term_parser_LDADD = \
3431         libsystemd-terminal.la \
3432         libsystemd-internal.la \
3433         libsystemd-shared.la
3434
3435 test_unifont_SOURCES = \
3436         src/libsystemd-terminal/test-unifont.c
3437
3438 test_unifont_LDADD = \
3439         libsystemd-terminal.la \
3440         libsystemd-internal.la \
3441         libsystemd-shared.la
3442
3443 .PHONY: update-unifont
3444 update-unifont: tools/compile-unifont.py
3445         $(AM_V_GEN)$(PYTHON) $< \
3446                 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3447                 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3448         @echo "unifont-glyph-array.bin has been regenerated"
3449
3450 # ------------------------------------------------------------------------------
3451 if ENABLE_GTK_DOC
3452 SUBDIRS += \
3453         docs/libudev
3454
3455 noinst_DATA += \
3456         docs/html/libudev \
3457         docs/html/gudev
3458 endif
3459
3460 include_HEADERS += \
3461         src/libudev/libudev.h
3462
3463 lib_LTLIBRARIES += \
3464         libudev.la
3465
3466 libudev_la_SOURCES =\
3467         src/libudev/libudev.sym \
3468         src/libudev/libudev-private.h \
3469         src/libudev/libudev.c \
3470         src/libudev/libudev-list.c \
3471         src/libudev/libudev-util.c \
3472         src/libudev/libudev-device.c \
3473         src/libudev/libudev-enumerate.c \
3474         src/libudev/libudev-monitor.c \
3475         src/libudev/libudev-queue.c \
3476         src/libudev/libudev-hwdb.c
3477
3478 libudev_la_CFLAGS = \
3479         $(AM_CFLAGS) \
3480         -fvisibility=hidden
3481
3482 libudev_la_LDFLAGS = \
3483         $(AM_LDFLAGS) \
3484         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3485         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3486
3487 libudev_la_LIBADD = \
3488         libsystemd-internal.la \
3489         libsystemd-shared.la
3490
3491 pkgconfiglib_DATA += \
3492         src/libudev/libudev.pc
3493
3494 EXTRA_DIST += \
3495         src/libudev/libudev.pc.in
3496
3497 CLEANFILES += \
3498         src/libudev/libudev.pc \
3499         docs/html/libudev \
3500         docs/html/gudev
3501
3502 docs/html/libudev:
3503         $(AM_V_at)$(MKDIR_P) $(dir $@)
3504         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3505
3506 docs/html/gudev:
3507         $(AM_V_at)$(MKDIR_P) $(dir $@)
3508         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3509
3510 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3511 libudev-install-hook:
3512         libname=libudev.so && $(move-to-rootlibdir)
3513
3514 libudev-uninstall-hook:
3515         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3516
3517 INSTALL_EXEC_HOOKS += libudev-install-hook
3518 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3519
3520 # ------------------------------------------------------------------------------
3521 noinst_LTLIBRARIES += \
3522         libudev-internal.la
3523
3524 libudev_internal_la_SOURCES =\
3525         $(libudev_la_SOURCES) \
3526         src/libudev/libudev-device-private.c
3527
3528 libudev_internal_la_CFLAGS = \
3529         $(AM_CFLAGS) \
3530         -fvisibility=default
3531
3532 # ------------------------------------------------------------------------------
3533 INSTALL_DIRS += \
3534         $(sysconfdir)/udev/rules.d
3535
3536 dist_network_DATA = \
3537         network/99-default.link \
3538         network/80-container-host0.network \
3539         network/80-container-ve.network
3540
3541 dist_udevrules_DATA += \
3542         rules/42-usb-hid-pm.rules \
3543         rules/50-udev-default.rules \
3544         rules/60-drm.rules \
3545         rules/60-keyboard.rules \
3546         rules/70-mouse.rules \
3547         rules/60-persistent-storage-tape.rules \
3548         rules/60-persistent-serial.rules \
3549         rules/60-persistent-input.rules \
3550         rules/60-persistent-alsa.rules \
3551         rules/60-persistent-storage.rules \
3552         rules/64-btrfs.rules \
3553         rules/75-net-description.rules \
3554         rules/75-tty-description.rules \
3555         rules/78-sound-card.rules \
3556         rules/80-net-setup-link.rules \
3557         rules/95-udev-late.rules
3558
3559 nodist_udevrules_DATA += \
3560         rules/99-systemd.rules
3561
3562 udevconfdir = $(sysconfdir)/udev
3563 dist_udevconf_DATA = \
3564         src/udev/udev.conf
3565
3566 sharepkgconfigdir = $(datadir)/pkgconfig
3567 sharepkgconfig_DATA = \
3568         src/udev/udev.pc
3569
3570 EXTRA_DIST += \
3571         rules/99-systemd.rules.in \
3572         src/udev/udev.pc.in
3573
3574 CLEANFILES += \
3575         rules/99-systemd.rules \
3576         src/udev/udev.pc
3577
3578 EXTRA_DIST += \
3579         units/systemd-udevd.service.in \
3580         units/systemd-udev-trigger.service.in \
3581         units/systemd-udev-settle.service.in
3582
3583 CLEANFILES += \
3584         units/systemd-udevd.service \
3585         units/systemd-udev-trigger.service \
3586         units/systemd-udev-settle.service
3587
3588 SOCKETS_TARGET_WANTS += \
3589         systemd-udevd-control.socket \
3590         systemd-udevd-kernel.socket
3591
3592 SYSINIT_TARGET_WANTS += \
3593         systemd-udevd.service \
3594         systemd-udev-trigger.service
3595
3596 rootbin_PROGRAMS += \
3597         udevadm
3598
3599 rootlibexec_PROGRAMS += \
3600         systemd-udevd
3601
3602 noinst_LTLIBRARIES += \
3603         libudev-core.la
3604
3605 src/udev/keyboard-keys.txt:
3606         $(AM_V_at)$(MKDIR_P) $(dir $@)
3607         $(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/' > $@
3608
3609 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3610         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3611
3612 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3613         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3614
3615 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3616         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3617
3618 libudev_core_la_SOURCES = \
3619         src/udev/udev.h \
3620         src/udev/udev-event.c \
3621         src/udev/udev-watch.c \
3622         src/udev/udev-node.c \
3623         src/udev/udev-rules.c \
3624         src/udev/udev-ctrl.c \
3625         src/udev/udev-builtin.c \
3626         src/udev/udev-builtin-btrfs.c \
3627         src/udev/udev-builtin-hwdb.c \
3628         src/udev/udev-builtin-input_id.c \
3629         src/udev/udev-builtin-keyboard.c \
3630         src/udev/udev-builtin-net_id.c \
3631         src/udev/udev-builtin-net_setup_link.c \
3632         src/udev/udev-builtin-path_id.c \
3633         src/udev/udev-builtin-usb_id.c \
3634         src/udev/net/link-config.h \
3635         src/udev/net/link-config.c \
3636         src/udev/net/ethtool-util.h \
3637         src/udev/net/ethtool-util.c
3638
3639 nodist_libudev_core_la_SOURCES = \
3640         src/udev/keyboard-keys-from-name.h \
3641         src/udev/keyboard-keys-to-name.h \
3642         src/udev/net/link-config-gperf.c
3643
3644 BUILT_SOURCES += \
3645         $(nodist_libudev_core_la_SOURCES)
3646
3647 CLEANFILES += \
3648         src/udev/keyboard-keys-from-name.gperf \
3649         src/udev/keyboard-keys.txt \
3650         src/udev/net/link-config-gperf.c
3651
3652 EXTRA_DIST += \
3653         src/udev/net/link-config-gperf.gperf
3654
3655 libudev_core_la_CFLAGS = \
3656         $(AM_CFLAGS) \
3657         $(BLKID_CFLAGS) \
3658         $(KMOD_CFLAGS)
3659
3660 libudev_core_la_LIBADD = \
3661         libudev-internal.la \
3662         libsystemd-label.la \
3663         libsystemd-internal.la \
3664         libsystemd-network.la \
3665         libsystemd-shared.la \
3666         $(BLKID_LIBS) \
3667         $(KMOD_LIBS)
3668
3669 if HAVE_KMOD
3670 libudev_core_la_SOURCES += \
3671         src/udev/udev-builtin-kmod.c
3672
3673 dist_udevrules_DATA += \
3674         rules/80-drivers.rules
3675 endif
3676
3677 if HAVE_BLKID
3678 libudev_core_la_SOURCES += \
3679         src/udev/udev-builtin-blkid.c
3680 endif
3681
3682 if HAVE_ACL
3683 libudev_core_la_SOURCES += \
3684         src/udev/udev-builtin-uaccess.c \
3685         src/login/logind-acl.c \
3686         src/libsystemd/sd-login/sd-login.c \
3687         src/systemd/sd-login.h
3688
3689 libudev_core_la_LIBADD += \
3690         libsystemd-acl.la
3691 endif
3692
3693 systemd_udevd_SOURCES = \
3694         src/udev/udevd.c
3695
3696 systemd_udevd_LDADD = \
3697         libudev-core.la
3698
3699 udevadm_SOURCES = \
3700         src/udev/udevadm.c \
3701         src/udev/udevadm-info.c \
3702         src/udev/udevadm-control.c \
3703         src/udev/udevadm-monitor.c \
3704         src/udev/udevadm-hwdb.c \
3705         src/udev/udevadm-settle.c \
3706         src/udev/udevadm-trigger.c \
3707         src/udev/udevadm-test.c \
3708         src/udev/udevadm-test-builtin.c \
3709         src/udev/udevadm-util.c \
3710         src/udev/udevadm-util.h
3711
3712 udevadm_LDADD = \
3713         libudev-core.la
3714
3715 # ------------------------------------------------------------------------------
3716 if ENABLE_HWDB
3717 INSTALL_DIRS += \
3718         $(sysconfdir)/udev/hwdb.d
3719
3720 systemd_hwdb_SOURCES = \
3721         src/libsystemd/sd-hwdb/hwdb-internal.h \
3722         src/hwdb/hwdb.c
3723
3724 systemd_hwdb_LDADD = \
3725         libsystemd-shared.la \
3726         libsystemd-internal.la \
3727         libudev-internal.la
3728
3729 rootbin_PROGRAMS += \
3730         systemd-hwdb
3731
3732 dist_udevhwdb_DATA = \
3733         hwdb/20-pci-vendor-model.hwdb \
3734         hwdb/20-pci-classes.hwdb \
3735         hwdb/20-usb-vendor-model.hwdb \
3736         hwdb/20-usb-classes.hwdb \
3737         hwdb/20-sdio-vendor-model.hwdb \
3738         hwdb/20-sdio-classes.hwdb \
3739         hwdb/20-bluetooth-vendor-product.hwdb \
3740         hwdb/20-acpi-vendor.hwdb \
3741         hwdb/20-OUI.hwdb \
3742         hwdb/20-net-ifname.hwdb \
3743         hwdb/60-keyboard.hwdb \
3744         hwdb/70-mouse.hwdb
3745
3746 EXTRA_DIST += \
3747         units/systemd-hwdb-update.service.in
3748
3749 CLEANFILES += \
3750         units/systemd-hwdb-update.service
3751
3752 SYSINIT_TARGET_WANTS += \
3753         systemd-hwdb-update.service
3754
3755 # Update hwdb on installation. Do not bother if installing
3756 # in DESTDIR, since this is likely for packaging purposes.
3757 hwdb-update-hook:
3758         -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
3759
3760 INSTALL_DATA_HOOKS += \
3761         hwdb-update-hook
3762
3763 hwdb-remove-hook:
3764         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3765 endif
3766
3767 # ------------------------------------------------------------------------------
3768 TESTS += \
3769         test/udev-test.pl \
3770         test/rules-test.sh
3771
3772 manual_tests += \
3773         test-libudev \
3774         test-udev
3775
3776 test_libudev_SOURCES = \
3777         src/test/test-libudev.c
3778
3779 test_libudev_LDADD = \
3780         libsystemd-label.la \
3781         libudev-internal.la \
3782         libsystemd-shared.la \
3783         libsystemd-internal.la
3784
3785 test_udev_SOURCES = \
3786         src/test/test-udev.c
3787
3788 test_udev_LDADD = \
3789         libudev-core.la  \
3790         $(BLKID_LIBS) \
3791         $(KMOD_LIBS) \
3792         $(SELINUX_LIBS)
3793
3794 if HAVE_ACL
3795 test_udev_LDADD += \
3796         libsystemd-acl.la
3797 endif
3798
3799 check_DATA += \
3800         test/sys
3801
3802 # packed sysfs test tree
3803 test/sys:
3804         $(AM_V_at)$(MKDIR_P) $(dir $@)
3805         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3806
3807 test-sys-distclean:
3808         -rm -rf test/sys
3809 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3810
3811 EXTRA_DIST += \
3812         test/sys.tar.xz \
3813         test/udev-test.pl \
3814         test/rules-test.sh \
3815         test/rule-syntax-check.py
3816
3817 # ------------------------------------------------------------------------------
3818 ata_id_SOURCES = \
3819         src/udev/ata_id/ata_id.c
3820
3821 ata_id_LDADD = \
3822         libudev-internal.la \
3823         libsystemd-shared.la
3824
3825 udevlibexec_PROGRAMS += \
3826         ata_id
3827
3828 # ------------------------------------------------------------------------------
3829 cdrom_id_SOURCES = \
3830         src/udev/cdrom_id/cdrom_id.c
3831
3832 cdrom_id_LDADD = \
3833         libudev-internal.la \
3834         libsystemd-shared.la
3835
3836 udevlibexec_PROGRAMS += \
3837         cdrom_id
3838
3839 dist_udevrules_DATA += \
3840         rules/60-cdrom_id.rules
3841
3842 # ------------------------------------------------------------------------------
3843 collect_SOURCES = \
3844         src/udev/collect/collect.c
3845
3846 collect_LDADD = \
3847         libudev-internal.la \
3848         libsystemd-shared.la
3849
3850 udevlibexec_PROGRAMS += \
3851         collect
3852
3853 # ------------------------------------------------------------------------------
3854 scsi_id_SOURCES =\
3855         src/udev/scsi_id/scsi_id.c \
3856         src/udev/scsi_id/scsi_serial.c \
3857         src/udev/scsi_id/scsi.h \
3858         src/udev/scsi_id/scsi_id.h
3859
3860 scsi_id_LDADD = \
3861         libudev-internal.la \
3862         libsystemd-shared.la
3863
3864 udevlibexec_PROGRAMS += \
3865         scsi_id
3866
3867 EXTRA_DIST += \
3868         src/udev/scsi_id/README
3869
3870 # ------------------------------------------------------------------------------
3871 v4l_id_SOURCES = \
3872         src/udev/v4l_id/v4l_id.c
3873
3874 v4l_id_LDADD = \
3875         libudev-internal.la \
3876         libsystemd-shared.la
3877
3878 udevlibexec_PROGRAMS += \
3879         v4l_id
3880
3881 dist_udevrules_DATA += \
3882         rules/60-persistent-v4l.rules
3883
3884 # ------------------------------------------------------------------------------
3885 accelerometer_SOURCES = \
3886         src/udev/accelerometer/accelerometer.c
3887
3888 accelerometer_LDADD = \
3889         libudev-internal.la \
3890         libsystemd-shared.la
3891
3892 udevlibexec_PROGRAMS += \
3893         accelerometer
3894
3895 dist_udevrules_DATA += \
3896         rules/61-accelerometer.rules
3897
3898 # ------------------------------------------------------------------------------
3899 if ENABLE_GUDEV
3900 if ENABLE_GTK_DOC
3901 SUBDIRS += \
3902         docs/gudev
3903 endif
3904
3905 libgudev_includedir = \
3906         $(includedir)/gudev-1.0/gudev
3907
3908 libgudev_include_HEADERS = \
3909         src/gudev/gudev.h \
3910         src/gudev/gudevenums.h \
3911         src/gudev/gudevenumtypes.h \
3912         src/gudev/gudevtypes.h \
3913         src/gudev/gudevclient.h \
3914         src/gudev/gudevdevice.h \
3915         src/gudev/gudevenumerator.h
3916
3917 lib_LTLIBRARIES += libgudev-1.0.la
3918
3919 pkgconfiglib_DATA += \
3920         src/gudev/gudev-1.0.pc
3921
3922 CLEANFILES += \
3923         src/gudev/gudev-1.0.pc
3924
3925 libgudev_1_0_la_SOURCES = \
3926         src/gudev/libgudev-1.0.sym \
3927         src/gudev/gudevenums.h \
3928         src/gudev/gudevenumtypes.h \
3929         src/gudev/gudevenumtypes.h\
3930         src/gudev/gudevtypes.h \
3931         src/gudev/gudevclient.h \
3932         src/gudev/gudevclient.c \
3933         src/gudev/gudevdevice.h \
3934         src/gudev/gudevdevice.c \
3935         src/gudev/gudevenumerator.h \
3936         src/gudev/gudevenumerator.c \
3937         src/gudev/gudevprivate.h
3938
3939 nodist_libgudev_1_0_la_SOURCES = \
3940         src/gudev/gudevmarshal.h \
3941         src/gudev/gudevmarshal.c \
3942         src/gudev/gudevenumtypes.h \
3943         src/gudev/gudevenumtypes.c
3944
3945 BUILT_SOURCES += \
3946         $(nodist_libgudev_1_0_la_SOURCES)
3947
3948 libgudev_1_0_la_CPPFLAGS = \
3949         $(AM_CPPFLAGS) \
3950         -I$(top_builddir)/src\
3951         -I$(top_srcdir)/src\
3952         -I$(top_builddir)/src/gudev \
3953         -I$(top_srcdir)/src/gudev \
3954         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3955         -D_GUDEV_COMPILATION \
3956         -DG_LOG_DOMAIN=\"GUdev\"
3957
3958 libgudev_1_0_la_CFLAGS = \
3959         $(AM_CFLAGS) \
3960         -fvisibility=default \
3961         $(GLIB_CFLAGS)
3962
3963 libgudev_1_0_la_LIBADD = \
3964         libudev.la \
3965         $(GLIB_LIBS)
3966
3967 libgudev_1_0_la_LDFLAGS = \
3968         $(AM_LDFLAGS) \
3969         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3970         -export-dynamic \
3971         -no-undefined \
3972         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3973
3974 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3975         $(AM_V_at)$(MKDIR_P) $(dir $@)
3976         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3977
3978 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3979         $(AM_V_at)$(MKDIR_P) $(dir $@)
3980         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3981         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3982
3983 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3984         $(AM_V_at)$(MKDIR_P) $(dir $@)
3985         $(AM_V_GEN)glib-mkenums --template $^ > $@
3986
3987 if HAVE_INTROSPECTION
3988 -include $(INTROSPECTION_MAKEFILE)
3989
3990 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3991
3992 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3993
3994 src_gudev_GUdev_1_0_gir_CFLAGS = \
3995         $(AM_CFLAGS) \
3996         $(INCLUDES) \
3997         -D_GUDEV_COMPILATION \
3998         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3999         -I$(top_srcdir)/src \
4000         -I$(top_builddir)/src \
4001         -I$(top_srcdir)/src/gudev \
4002         -I$(top_builddir)/src/gudev
4003
4004 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
4005
4006 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
4007         --pkg-export=gudev-1.0 \
4008         --warn-all
4009
4010 src_gudev_GUdev_1_0_gir_FILES = \
4011         src/gudev/gudev.h \
4012         src/gudev/gudevtypes.h \
4013         src/gudev/gudevenums.h \
4014         src/gudev/gudevenumtypes.h \
4015         src/gudev/gudevclient.h \
4016         src/gudev/gudevdevice.h \
4017         src/gudev/gudevenumerator.h \
4018         src/gudev/gudevclient.c \
4019         src/gudev/gudevdevice.c \
4020         src/gudev/gudevenumerator.c
4021
4022 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
4023 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
4024
4025 girdir = $(datadir)/gir-1.0
4026 gir_DATA = \
4027         src/gudev/GUdev-1.0.gir
4028
4029 typelibsdir = $(libdir)/girepository-1.0
4030 typelibs_DATA = \
4031         src/gudev/GUdev-1.0.typelib
4032
4033 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
4034 endif # HAVE_INTROSPECTION
4035 endif
4036
4037 EXTRA_DIST += \
4038         src/gudev/gudev-1.0.pc.in \
4039         src/gudev/gudevmarshal.list \
4040         src/gudev/gudevenumtypes.h.template \
4041         src/gudev/gudevenumtypes.c.template \
4042         src/gudev/gjs-example.js \
4043         src/gudev/seed-example-enum.js \
4044         src/gudev/seed-example.js
4045
4046 # ------------------------------------------------------------------------------
4047 mtd_probe_SOURCES =  \
4048         src/udev/mtd_probe/mtd_probe.c \
4049         src/udev/mtd_probe/mtd_probe.h \
4050         src/udev/mtd_probe/probe_smartmedia.c
4051
4052 dist_udevrules_DATA += \
4053         rules/75-probe_mtd.rules
4054
4055 udevlibexec_PROGRAMS += \
4056         mtd_probe
4057
4058 # ------------------------------------------------------------------------------
4059 test_id128_SOURCES = \
4060         src/test/test-id128.c
4061
4062 test_id128_LDADD = \
4063         libsystemd-internal.la \
4064         libsystemd-shared.la
4065
4066 tests += \
4067         test-id128
4068
4069 # ------------------------------------------------------------------------------
4070
4071 rootlibexec_PROGRAMS += \
4072         systemd-activate
4073
4074 systemd_activate_SOURCES = \
4075         src/activate/activate.c
4076
4077 systemd_activate_LDADD = \
4078         libsystemd-label.la \
4079         libsystemd-internal.la \
4080         libsystemd-shared.la
4081
4082 # ------------------------------------------------------------------------------
4083 systemd_journald_SOURCES = \
4084         src/journal/journald.c \
4085         src/journal/journald-server.h
4086
4087 systemd_journald_LDADD = \
4088         libsystemd-journal-core.la \
4089         libsystemd-internal.la \
4090         libsystemd-shared.la
4091
4092 systemd_cat_SOURCES = \
4093         src/journal/cat.c
4094
4095 systemd_cat_LDADD = \
4096         libsystemd-journal-core.la
4097
4098 if HAVE_MICROHTTPD
4099 rootlibexec_PROGRAMS += \
4100         systemd-journal-remote
4101
4102 systemd_journal_remote_SOURCES = \
4103         src/journal-remote/journal-remote-parse.h \
4104         src/journal-remote/journal-remote-parse.c \
4105         src/journal-remote/journal-remote-write.h \
4106         src/journal-remote/journal-remote-write.c \
4107         src/journal-remote/journal-remote.h \
4108         src/journal-remote/journal-remote.c
4109
4110 systemd_journal_remote_LDADD = \
4111         libsystemd-internal.la \
4112         libsystemd-journal-core.la
4113
4114 systemd_journal_remote_SOURCES += \
4115         src/journal-remote/microhttpd-util.h \
4116         src/journal-remote/microhttpd-util.c
4117
4118 systemd_journal_remote_CFLAGS = \
4119         $(AM_CFLAGS) \
4120         $(MICROHTTPD_CFLAGS)
4121
4122 systemd_journal_remote_LDADD += \
4123         $(MICROHTTPD_LIBS)
4124
4125 if ENABLE_SYSUSERS
4126 dist_sysusers_DATA += \
4127         sysusers.d/systemd-remote.conf
4128 endif
4129
4130 if ENABLE_TMPFILES
4131 dist_tmpfiles_DATA += \
4132         tmpfiles.d/systemd-remote.conf
4133 endif
4134
4135 if HAVE_GNUTLS
4136 systemd_journal_remote_LDADD += \
4137         $(GNUTLS_LIBS)
4138
4139 # systemd-journal-remote make sense mostly with full crypto stack
4140 dist_systemunit_DATA += \
4141         units/systemd-journal-remote.socket
4142
4143 nodist_systemunit_DATA += \
4144         units/systemd-journal-remote.service
4145
4146 EXTRA_DIST += \
4147         units/systemd-journal-remote.service.in
4148
4149 journal-remote-install-hook: journal-install-hook
4150         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4151         -chown 0:0 $(DESTDIR)/var/log/journal/remote
4152         -chmod 755 $(DESTDIR)/var/log/journal/remote
4153
4154 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4155
4156 endif
4157
4158 nodist_pkgsysconf_DATA += \
4159         src/journal-remote/journal-remote.conf
4160
4161 EXTRA_DIST += \
4162         src/journal-remote/journal-remote.conf.in
4163
4164 CLEANFILES += \
4165         src/journal-remote/journal-remote.conf
4166 endif
4167
4168 if HAVE_LIBCURL
4169 rootlibexec_PROGRAMS += \
4170         systemd-journal-upload
4171
4172 systemd_journal_upload_SOURCES = \
4173         src/journal-remote/journal-upload.h \
4174         src/journal-remote/journal-upload.c \
4175         src/journal-remote/journal-upload-journal.c
4176
4177 systemd_journal_upload_CFLAGS = \
4178         $(AM_CFLAGS) \
4179         $(LIBCURL_CFLAGS)
4180
4181 systemd_journal_upload_LDADD = \
4182         libsystemd-internal.la \
4183         libsystemd-journal-internal.la \
4184         libsystemd-shared.la \
4185         $(LIBCURL_LIBS)
4186
4187 nodist_systemunit_DATA += \
4188         units/systemd-journal-upload.service
4189
4190 EXTRA_DIST += \
4191         units/systemd-journal-upload.service.in
4192
4193 nodist_pkgsysconf_DATA += \
4194         src/journal-remote/journal-upload.conf
4195
4196 EXTRA_DIST += \
4197         src/journal-remote/journal-upload.conf.in
4198
4199 CLEANFILES += \
4200         src/journal-remote/journal-upload.conf
4201 endif
4202
4203 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4204 journalctl_CFLAGS = \
4205         $(AM_CFLAGS)
4206
4207 journalctl_SOURCES = \
4208         src/journal/journalctl.c
4209
4210 journalctl_LDADD = \
4211         libsystemd-journal-internal.la \
4212         libsystemd-internal.la \
4213         libsystemd-logs.la \
4214         libsystemd-shared.la
4215
4216 if HAVE_ACL
4217 journalctl_LDADD += \
4218         libsystemd-acl.la
4219 endif
4220
4221 if HAVE_QRENCODE
4222 journalctl_SOURCES += \
4223         src/journal/journal-qrcode.c \
4224         src/journal/journal-qrcode.h
4225
4226 journalctl_CFLAGS += \
4227         $(QRENCODE_CFLAGS)
4228
4229 journalctl_LDADD += \
4230         $(QRENCODE_LIBS)
4231 endif
4232
4233 test_journal_SOURCES = \
4234         src/journal/test-journal.c
4235
4236 test_journal_LDADD = \
4237         libsystemd-journal-core.la
4238
4239 test_journal_send_SOURCES = \
4240         src/journal/test-journal-send.c
4241
4242 test_journal_send_LDADD = \
4243         libsystemd-journal-core.la
4244
4245 test_journal_syslog_SOURCES = \
4246         src/journal/test-journal-syslog.c
4247
4248 test_journal_syslog_LDADD = \
4249         libsystemd-journal-core.la
4250
4251 test_journal_match_SOURCES = \
4252         src/journal/test-journal-match.c
4253
4254 test_journal_match_LDADD = \
4255         libsystemd-journal-core.la
4256
4257 test_journal_enum_SOURCES = \
4258         src/journal/test-journal-enum.c
4259
4260 test_journal_enum_LDADD = \
4261         libsystemd-journal-core.la
4262
4263 test_journal_stream_SOURCES = \
4264         src/journal/test-journal-stream.c
4265
4266 test_journal_stream_LDADD = \
4267         libsystemd-journal-core.la
4268
4269 test_journal_flush_SOURCES = \
4270         src/journal/test-journal-flush.c
4271
4272 test_journal_flush_LDADD = \
4273         libsystemd-journal-core.la
4274
4275 test_journal_init_SOURCES = \
4276         src/journal/test-journal-init.c
4277
4278 test_journal_init_LDADD = \
4279         libsystemd-journal-core.la
4280
4281 test_journal_verify_SOURCES = \
4282         src/journal/test-journal-verify.c
4283
4284 test_journal_verify_LDADD = \
4285         libsystemd-journal-core.la
4286
4287 test_journal_interleaving_SOURCES = \
4288         src/journal/test-journal-interleaving.c
4289
4290 test_journal_interleaving_LDADD = \
4291         libsystemd-journal-core.la
4292
4293 test_mmap_cache_SOURCES = \
4294         src/journal/test-mmap-cache.c
4295
4296 test_mmap_cache_LDADD = \
4297         libsystemd-journal-core.la
4298
4299 test_catalog_SOURCES = \
4300         src/journal/test-catalog.c
4301
4302 test_catalog_CPPFLAGS = \
4303         $(AM_CPPFLAGS) \
4304         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
4305
4306 test_catalog_LDADD = \
4307         libsystemd-journal-core.la
4308
4309 test_compress_SOURCES = \
4310         src/journal/test-compress.c
4311
4312 test_compress_LDADD = \
4313         libsystemd-journal-internal.la \
4314         libsystemd-shared.la
4315
4316 test_compress_benchmark_SOURCES = \
4317         src/journal/test-compress-benchmark.c
4318
4319 test_compress_benchmark_LDADD = \
4320         libsystemd-journal-internal.la \
4321         libsystemd-shared.la
4322
4323 libsystemd_journal_core_la_SOURCES = \
4324         src/journal/journald-kmsg.c \
4325         src/journal/journald-kmsg.h \
4326         src/journal/journald-syslog.c \
4327         src/journal/journald-syslog.h \
4328         src/journal/journald-stream.c \
4329         src/journal/journald-stream.h \
4330         src/journal/journald-server.c \
4331         src/journal/journald-server.h \
4332         src/journal/journald-console.c \
4333         src/journal/journald-console.h \
4334         src/journal/journald-wall.c \
4335         src/journal/journald-wall.h \
4336         src/journal/journald-native.c \
4337         src/journal/journald-native.h \
4338         src/journal/journald-audit.c \
4339         src/journal/journald-audit.h \
4340         src/journal/journald-rate-limit.c \
4341         src/journal/journald-rate-limit.h \
4342         src/journal/journal-internal.h
4343
4344 nodist_libsystemd_journal_core_la_SOURCES = \
4345         src/journal/journald-gperf.c
4346
4347 libsystemd_journal_core_la_LIBADD = \
4348         libsystemd-journal-internal.la \
4349         libudev-internal.la \
4350         libsystemd-label.la \
4351         libsystemd-internal.la \
4352         libsystemd-shared.la
4353
4354 if HAVE_ACL
4355 libsystemd_journal_core_la_LIBADD += \
4356         libsystemd-acl.la
4357 endif
4358
4359 noinst_LTLIBRARIES += \
4360         libsystemd-journal-core.la
4361
4362 journal-install-hook:
4363         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4364         -chown 0:0 $(DESTDIR)/var/log/journal
4365         -chmod 755 $(DESTDIR)/var/log/journal
4366         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4367         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4368
4369 journal-uninstall-hook:
4370         -rmdir $(DESTDIR)/var/log/journal/remote
4371         -rmdir $(DESTDIR)/var/log/journal/
4372
4373 INSTALL_EXEC_HOOKS += journal-install-hook
4374 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4375
4376 # ------------------------------------------------------------------------------
4377 # Update catalog on installation. Do not bother if installing
4378 # in DESTDIR, since this is likely for packaging purposes.
4379 catalog-update-hook:
4380         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4381
4382 INSTALL_DATA_HOOKS += \
4383         catalog-update-hook
4384
4385 catalog-remove-hook:
4386         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4387
4388 UNINSTALL_DATA_HOOKS += \
4389         catalog-remove-hook
4390
4391 manual_tests += \
4392         test-journal-enum
4393
4394 tests += \
4395         test-journal \
4396         test-journal-send \
4397         test-journal-syslog \
4398         test-journal-match \
4399         test-journal-stream \
4400         test-journal-init \
4401         test-journal-verify \
4402         test-journal-interleaving \
4403         test-journal-flush \
4404         test-mmap-cache \
4405         test-catalog
4406
4407 if HAVE_COMPRESSION
4408 tests += \
4409         test-compress \
4410         test-compress-benchmark
4411 endif
4412
4413 pkginclude_HEADERS += \
4414         src/systemd/sd-journal.h \
4415         src/systemd/sd-messages.h \
4416         src/systemd/_sd-common.h
4417
4418 libsystemd_journal_internal_la_SOURCES = \
4419         src/journal/sd-journal.c \
4420         src/systemd/sd-journal.h \
4421         src/systemd/_sd-common.h \
4422         src/journal/journal-file.c \
4423         src/journal/journal-file.h \
4424         src/journal/journal-vacuum.c \
4425         src/journal/journal-vacuum.h \
4426         src/journal/journal-verify.c \
4427         src/journal/journal-verify.h \
4428         src/journal/lookup3.c \
4429         src/journal/lookup3.h \
4430         src/journal/journal-send.c \
4431         src/journal/journal-def.h \
4432         src/journal/compress.h \
4433         src/journal/catalog.c \
4434         src/journal/catalog.h \
4435         src/journal/mmap-cache.c \
4436         src/journal/mmap-cache.h \
4437         src/journal/compress.c
4438
4439 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4440 libsystemd_journal_internal_la_CFLAGS = \
4441         $(AM_CFLAGS)
4442
4443 libsystemd_journal_internal_la_LIBADD = \
4444         libsystemd-label.la
4445
4446 if HAVE_XZ
4447 libsystemd_journal_internal_la_CFLAGS += \
4448         $(XZ_CFLAGS)
4449
4450 libsystemd_journal_internal_la_LIBADD += \
4451         $(XZ_LIBS)
4452 endif
4453
4454 if HAVE_LZ4
4455 libsystemd_journal_internal_la_LIBADD += \
4456         -llz4
4457 endif
4458
4459 if HAVE_GCRYPT
4460 libsystemd_journal_internal_la_SOURCES += \
4461         src/journal/journal-authenticate.c \
4462         src/journal/journal-authenticate.h \
4463         src/journal/fsprg.c \
4464         src/journal/fsprg.h
4465
4466 libsystemd_journal_internal_la_LIBADD += \
4467         $(GCRYPT_LIBS)
4468
4469 # fsprg.c is a drop-in file using void pointer arithmetic
4470 libsystemd_journal_internal_la_CFLAGS += \
4471         $(GCRYPT_CFLAGS) \
4472         -Wno-pointer-arith
4473 endif
4474
4475 noinst_LTLIBRARIES += \
4476         libsystemd-journal-internal.la
4477
4478 rootlibexec_PROGRAMS += \
4479         systemd-journald
4480
4481 rootbin_PROGRAMS += \
4482         journalctl
4483
4484 bin_PROGRAMS += \
4485         systemd-cat
4486
4487 dist_systemunit_DATA += \
4488         units/systemd-journald.socket \
4489         units/systemd-journald-dev-log.socket \
4490         units/systemd-journald-audit.socket
4491
4492 nodist_systemunit_DATA += \
4493         units/systemd-journald.service \
4494         units/systemd-journal-flush.service \
4495         units/systemd-journal-catalog-update.service
4496
4497 dist_pkgsysconf_DATA += \
4498         src/journal/journald.conf
4499
4500 dist_catalog_DATA = \
4501         catalog/systemd.fr.catalog \
4502         catalog/systemd.it.catalog \
4503         catalog/systemd.pl.catalog \
4504         catalog/systemd.pt_BR.catalog \
4505         catalog/systemd.ru.catalog \
4506         catalog/systemd.catalog
4507
4508 SOCKETS_TARGET_WANTS += \
4509         systemd-journald.socket \
4510         systemd-journald-dev-log.socket \
4511         systemd-journald-audit.socket
4512
4513 SYSINIT_TARGET_WANTS += \
4514         systemd-journald.service \
4515         systemd-journal-flush.service \
4516         systemd-journal-catalog-update.service
4517
4518 EXTRA_DIST += \
4519         units/systemd-journald.service.in \
4520         units/systemd-journal-flush.service.in \
4521         units/systemd-journal-catalog-update.service.in \
4522         src/journal/journald-gperf.gperf
4523
4524 CLEANFILES += \
4525         src/journal/journald-gperf.c
4526
4527 # ------------------------------------------------------------------------------
4528 if HAVE_MICROHTTPD
4529 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4530
4531 rootlibexec_PROGRAMS += \
4532         systemd-journal-gatewayd
4533
4534 systemd_journal_gatewayd_SOURCES = \
4535         src/journal-remote/journal-gatewayd.c \
4536         src/journal-remote/microhttpd-util.h \
4537         src/journal-remote/microhttpd-util.c
4538
4539 systemd_journal_gatewayd_LDADD = \
4540         libsystemd-logs.la \
4541         libsystemd-journal-internal.la \
4542         libsystemd-internal.la \
4543         libsystemd-shared.la \
4544         $(MICROHTTPD_LIBS)
4545
4546 if HAVE_GNUTLS
4547 systemd_journal_gatewayd_LDADD += \
4548         $(GNUTLS_LIBS)
4549 endif
4550
4551 systemd_journal_gatewayd_CFLAGS = \
4552         $(AM_CFLAGS) \
4553         $(MICROHTTPD_CFLAGS)
4554
4555 systemd_journal_gatewayd_CPPFLAGS = \
4556         $(AM_CPPFLAGS) \
4557         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4558
4559 dist_systemunit_DATA += \
4560         units/systemd-journal-gatewayd.socket
4561
4562 nodist_systemunit_DATA += \
4563         units/systemd-journal-gatewayd.service
4564
4565 dist_gatewayddocumentroot_DATA = \
4566         src/journal-remote/browse.html
4567
4568 endif
4569
4570 EXTRA_DIST += \
4571         units/systemd-journal-gatewayd.service.in
4572
4573 # ------------------------------------------------------------------------------
4574
4575 systemd_socket_proxyd_SOURCES = \
4576         src/socket-proxy/socket-proxyd.c
4577
4578 systemd_socket_proxyd_LDADD = \
4579         libsystemd-logs.la \
4580         libsystemd-internal.la \
4581         libsystemd-journal-internal.la \
4582         libsystemd-shared.la \
4583         libsystemd-resolve.la
4584
4585 # ------------------------------------------------------------------------------
4586 if ENABLE_COREDUMP
4587 systemd_coredump_SOURCES = \
4588         src/journal/coredump.c \
4589         src/journal/coredump-vacuum.c \
4590         src/journal/coredump-vacuum.h
4591
4592 systemd_coredump_LDADD = \
4593         libsystemd-journal-internal.la \
4594         libsystemd-label.la \
4595         libsystemd-internal.la \
4596         libsystemd-shared.la
4597
4598 if HAVE_ELFUTILS
4599 systemd_coredump_SOURCES += \
4600         src/journal/stacktrace.c \
4601         src/journal/stacktrace.h
4602
4603 systemd_coredump_LDADD += \
4604         $(ELFUTILS_LIBS)
4605 endif
4606
4607 rootlibexec_PROGRAMS += \
4608         systemd-coredump
4609
4610 dist_pkgsysconf_DATA += \
4611         src/journal/coredump.conf
4612
4613 if HAVE_ACL
4614 systemd_coredump_LDADD += \
4615         libsystemd-acl.la
4616 endif
4617
4618 coredumpctl_SOURCES = \
4619         src/journal/coredumpctl.c
4620
4621 coredumpctl_LDADD = \
4622         libsystemd-journal-internal.la \
4623         libsystemd-internal.la \
4624         libsystemd-shared.la
4625
4626 bin_PROGRAMS += \
4627         coredumpctl
4628
4629 manual_tests += \
4630         test-coredump-vacuum
4631
4632 test_coredump_vacuum_SOURCES = \
4633         src/journal/test-coredump-vacuum.c  \
4634         src/journal/coredump-vacuum.c \
4635         src/journal/coredump-vacuum.h
4636
4637 test_coredump_vacuum_LDADD = \
4638         libsystemd-internal.la \
4639         libsystemd-shared.la
4640
4641 dist_bashcompletion_DATA += \
4642         shell-completion/bash/coredumpctl
4643
4644 dist_zshcompletion_DATA += \
4645         shell-completion/zsh/_coredumpctl
4646
4647 sysctl_DATA = \
4648         sysctl.d/50-coredump.conf
4649
4650 CLEANFILES += \
4651         sysctl.d/50-coredump.conf
4652 endif
4653
4654 EXTRA_DIST += \
4655         sysctl.d/50-coredump.conf.in
4656
4657 # ------------------------------------------------------------------------------
4658 if ENABLE_BINFMT
4659 systemd_binfmt_SOURCES = \
4660         src/binfmt/binfmt.c
4661
4662 systemd_binfmt_LDADD = \
4663         libsystemd-shared.la
4664
4665 rootlibexec_PROGRAMS += \
4666         systemd-binfmt
4667
4668 dist_systemunit_DATA += \
4669         units/proc-sys-fs-binfmt_misc.automount \
4670         units/proc-sys-fs-binfmt_misc.mount
4671
4672 nodist_systemunit_DATA += \
4673         units/systemd-binfmt.service
4674
4675 INSTALL_DIRS += \
4676         $(prefix)/lib/binfmt.d \
4677         $(sysconfdir)/binfmt.d
4678
4679 SYSINIT_TARGET_WANTS += \
4680         systemd-binfmt.service \
4681         proc-sys-fs-binfmt_misc.automount
4682
4683 endif
4684
4685 EXTRA_DIST += \
4686         units/systemd-binfmt.service.in
4687
4688 # ------------------------------------------------------------------------------
4689 if ENABLE_VCONSOLE
4690 systemd_vconsole_setup_SOURCES = \
4691         src/vconsole/vconsole-setup.c
4692
4693 systemd_vconsole_setup_LDADD = \
4694         libsystemd-shared.la
4695
4696 rootlibexec_PROGRAMS += \
4697         systemd-vconsole-setup
4698
4699 nodist_systemunit_DATA += \
4700         units/systemd-vconsole-setup.service
4701
4702 nodist_udevrules_DATA += \
4703         src/vconsole/90-vconsole.rules
4704
4705 SYSINIT_TARGET_WANTS += \
4706         systemd-vconsole-setup.service
4707
4708 CLEANFILES += \
4709         src/vconsole/90-vconsole.rules
4710 endif
4711
4712 EXTRA_DIST += \
4713         src/vconsole/90-vconsole.rules.in \
4714         units/systemd-vconsole-setup.service.in
4715
4716 # ------------------------------------------------------------------------------
4717 if ENABLE_BOOTCHART
4718 systemd_bootchart_SOURCES = \
4719         src/bootchart/bootchart.c \
4720         src/bootchart/bootchart.h \
4721         src/bootchart/store.c \
4722         src/bootchart/store.h \
4723         src/bootchart/svg.c \
4724         src/bootchart/svg.h
4725
4726 systemd_bootchart_LDADD = \
4727         libsystemd-journal-internal.la \
4728         libsystemd-shared.la
4729
4730 rootlibexec_PROGRAMS += \
4731         systemd-bootchart
4732
4733 dist_pkgsysconf_DATA += \
4734         src/bootchart/bootchart.conf
4735
4736 nodist_systemunit_DATA += \
4737         units/systemd-bootchart.service
4738
4739 EXTRA_DIST += \
4740         units/systemd-bootchart.service.in
4741
4742 CLEANFILES += \
4743         units/systemd-bootchart.service
4744 endif
4745
4746 # ------------------------------------------------------------------------------
4747 if ENABLE_QUOTACHECK
4748 rootlibexec_PROGRAMS += \
4749         systemd-quotacheck
4750
4751 nodist_systemunit_DATA += \
4752         units/systemd-quotacheck.service
4753
4754 systemd_quotacheck_SOURCES = \
4755         src/quotacheck/quotacheck.c
4756
4757 systemd_quotacheck_LDADD = \
4758         libsystemd-shared.la
4759 endif
4760
4761 EXTRA_DIST += \
4762         units/systemd-quotacheck.service.in
4763
4764 nodist_systemunit_DATA += \
4765         units/quotaon.service
4766
4767 # ------------------------------------------------------------------------------
4768 if ENABLE_RANDOMSEED
4769 rootlibexec_PROGRAMS += \
4770         systemd-random-seed
4771
4772 nodist_systemunit_DATA += \
4773         units/systemd-random-seed.service
4774
4775 systemd_random_seed_SOURCES = \
4776         src/random-seed/random-seed.c
4777
4778 systemd_random_seed_LDADD = \
4779         libsystemd-label.la \
4780         libsystemd-shared.la
4781
4782 SYSINIT_TARGET_WANTS += \
4783         systemd-random-seed.service
4784
4785 endif
4786
4787 EXTRA_DIST += \
4788         units/systemd-random-seed.service.in
4789
4790 # ------------------------------------------------------------------------------
4791 if ENABLE_BACKLIGHT
4792 rootlibexec_PROGRAMS += \
4793         systemd-backlight
4794
4795 nodist_systemunit_DATA += \
4796         units/systemd-backlight@.service
4797
4798 systemd_backlight_SOURCES = \
4799         src/backlight/backlight.c
4800
4801 systemd_backlight_LDADD = \
4802         libsystemd-label.la \
4803         libudev-internal.la \
4804         libsystemd-shared.la
4805 endif
4806
4807 EXTRA_DIST += \
4808         units/systemd-backlight@.service.in
4809
4810 # ------------------------------------------------------------------------------
4811 if ENABLE_RFKILL
4812 rootlibexec_PROGRAMS += \
4813         systemd-rfkill
4814
4815 nodist_systemunit_DATA += \
4816         units/systemd-rfkill@.service
4817
4818 systemd_rfkill_SOURCES = \
4819         src/rfkill/rfkill.c
4820
4821 systemd_rfkill_LDADD = \
4822         libsystemd-label.la \
4823         libudev-internal.la \
4824         libsystemd-shared.la
4825 endif
4826
4827 EXTRA_DIST += \
4828         units/systemd-rfkill@.service.in
4829
4830 # ------------------------------------------------------------------------------
4831 if HAVE_LIBCRYPTSETUP
4832 rootlibexec_PROGRAMS += \
4833         systemd-cryptsetup
4834
4835 systemgenerator_PROGRAMS += \
4836         systemd-cryptsetup-generator
4837
4838 dist_systemunit_DATA += \
4839         units/cryptsetup.target \
4840         units/cryptsetup-pre.target
4841
4842 systemd_cryptsetup_SOURCES = \
4843         src/cryptsetup/cryptsetup.c
4844
4845 systemd_cryptsetup_CFLAGS = \
4846         $(AM_CFLAGS) \
4847         $(LIBCRYPTSETUP_CFLAGS)
4848
4849 systemd_cryptsetup_LDADD = \
4850         libsystemd-label.la \
4851         libudev-internal.la \
4852         libsystemd-shared.la \
4853         $(LIBCRYPTSETUP_LIBS)
4854
4855 systemd_cryptsetup_generator_SOURCES = \
4856         src/cryptsetup/cryptsetup-generator.c
4857
4858 systemd_cryptsetup_generator_LDADD = \
4859         libsystemd-label.la \
4860         libsystemd-shared.la
4861
4862 SYSINIT_TARGET_WANTS += \
4863         cryptsetup.target
4864
4865 endif
4866
4867 # ------------------------------------------------------------------------------
4868 if ENABLE_HOSTNAMED
4869 systemd_hostnamed_SOURCES = \
4870         src/hostname/hostnamed.c
4871
4872 systemd_hostnamed_LDADD = \
4873         libsystemd-label.la \
4874         libsystemd-internal.la \
4875         libsystemd-shared.la
4876
4877 rootlibexec_PROGRAMS += \
4878         systemd-hostnamed
4879
4880 nodist_systemunit_DATA += \
4881         units/systemd-hostnamed.service
4882
4883 dist_systemunit_DATA_busnames += \
4884         units/org.freedesktop.hostname1.busname
4885
4886 dist_dbuspolicy_DATA += \
4887         src/hostname/org.freedesktop.hostname1.conf
4888
4889 dist_dbussystemservice_DATA += \
4890         src/hostname/org.freedesktop.hostname1.service
4891
4892 polkitpolicy_files += \
4893         src/hostname/org.freedesktop.hostname1.policy
4894
4895 SYSTEM_UNIT_ALIASES += \
4896         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4897
4898 BUSNAMES_TARGET_WANTS += \
4899         org.freedesktop.hostname1.busname
4900
4901 hostnamectl_SOURCES = \
4902         src/hostname/hostnamectl.c
4903
4904 hostnamectl_LDADD = \
4905         libsystemd-internal.la \
4906         libsystemd-shared.la
4907
4908 bin_PROGRAMS += \
4909         hostnamectl
4910
4911 dist_bashcompletion_DATA += \
4912         shell-completion/bash/hostnamectl
4913
4914 dist_zshcompletion_DATA += \
4915         shell-completion/zsh/_hostnamectl
4916
4917 endif
4918
4919 polkitpolicy_in_files += \
4920         src/hostname/org.freedesktop.hostname1.policy.in
4921
4922 EXTRA_DIST += \
4923         units/systemd-hostnamed.service.in
4924
4925 # ------------------------------------------------------------------------------
4926 dist_systemunit_DATA_busnames += \
4927         units/org.freedesktop.systemd1.busname
4928
4929 BUSNAMES_TARGET_WANTS += \
4930         org.freedesktop.systemd1.busname
4931
4932 # ------------------------------------------------------------------------------
4933 if ENABLE_LOCALED
4934 systemd_localed_SOURCES = \
4935         src/locale/localed.c
4936
4937 systemd_localed_LDADD = \
4938         libsystemd-label.la \
4939         libsystemd-internal.la \
4940         libsystemd-shared.la \
4941         $(XKBCOMMON_LIBS)
4942
4943 systemd_localed_CFLAGS = \
4944         $(AM_CFLAGS) \
4945         $(XKBCOMMON_CFLAGS)
4946
4947 nodist_systemunit_DATA += \
4948         units/systemd-localed.service
4949
4950 dist_systemunit_DATA_busnames += \
4951         units/org.freedesktop.locale1.busname
4952
4953 rootlibexec_PROGRAMS += \
4954         systemd-localed
4955
4956 dist_dbuspolicy_DATA += \
4957         src/locale/org.freedesktop.locale1.conf
4958
4959 dist_dbussystemservice_DATA += \
4960         src/locale/org.freedesktop.locale1.service
4961
4962 polkitpolicy_files += \
4963         src/locale/org.freedesktop.locale1.policy
4964
4965 SYSTEM_UNIT_ALIASES += \
4966         systemd-localed.service dbus-org.freedesktop.locale1.service
4967
4968 BUSNAMES_TARGET_WANTS += \
4969         org.freedesktop.locale1.busname
4970
4971 dist_pkgdata_DATA += \
4972         src/locale/kbd-model-map
4973
4974 dist_noinst_SCRIPT = \
4975         src/locale/generate-kbd-model-map
4976
4977 localectl_SOURCES = \
4978         src/locale/localectl.c
4979
4980 localectl_LDADD = \
4981         libsystemd-internal.la \
4982         libsystemd-shared.la
4983
4984 bin_PROGRAMS += \
4985         localectl
4986
4987 dist_bashcompletion_DATA += \
4988         shell-completion/bash/localectl
4989
4990 dist_zshcompletion_DATA += \
4991         shell-completion/zsh/_localectl
4992
4993 endif
4994
4995 .PHONY: update-kbd-model-map
4996
4997 polkitpolicy_in_files += \
4998         src/locale/org.freedesktop.locale1.policy.in
4999
5000 EXTRA_DIST += \
5001         units/systemd-localed.service.in
5002
5003 # ------------------------------------------------------------------------------
5004 if ENABLE_TIMEDATED
5005 systemd_timedated_SOURCES = \
5006         src/timedate/timedated.c
5007
5008 systemd_timedated_LDADD = \
5009         libsystemd-label.la \
5010         libsystemd-internal.la \
5011         libsystemd-shared.la
5012
5013 rootlibexec_PROGRAMS += \
5014         systemd-timedated
5015
5016 dist_dbussystemservice_DATA += \
5017         src/timedate/org.freedesktop.timedate1.service
5018
5019 dist_dbuspolicy_DATA += \
5020         src/timedate/org.freedesktop.timedate1.conf
5021
5022 nodist_systemunit_DATA += \
5023         units/systemd-timedated.service
5024
5025 dist_systemunit_DATA_busnames += \
5026         units/org.freedesktop.timedate1.busname
5027
5028 polkitpolicy_files += \
5029         src/timedate/org.freedesktop.timedate1.policy
5030
5031 SYSTEM_UNIT_ALIASES += \
5032         systemd-timedated.service dbus-org.freedesktop.timedate1.service
5033
5034 BUSNAMES_TARGET_WANTS += \
5035         org.freedesktop.timedate1.busname
5036
5037 timedatectl_SOURCES = \
5038         src/timedate/timedatectl.c
5039
5040 timedatectl_LDADD = \
5041         libsystemd-internal.la \
5042         libsystemd-shared.la
5043
5044 bin_PROGRAMS += \
5045         timedatectl
5046
5047 dist_bashcompletion_DATA += \
5048         shell-completion/bash/timedatectl
5049
5050 dist_zshcompletion_DATA += \
5051         shell-completion/zsh/_timedatectl
5052 endif
5053
5054 polkitpolicy_in_files += \
5055         src/timedate/org.freedesktop.timedate1.policy.in
5056
5057 EXTRA_DIST += \
5058         units/systemd-timedated.service.in
5059
5060 # ------------------------------------------------------------------------------
5061 if ENABLE_TIMESYNCD
5062 systemd_timesyncd_SOURCES = \
5063         src/timesync/timesyncd.c \
5064         src/timesync/timesyncd-manager.c \
5065         src/timesync/timesyncd-manager.h \
5066         src/timesync/timesyncd-conf.c \
5067         src/timesync/timesyncd-conf.h \
5068         src/timesync/timesyncd-server.c \
5069         src/timesync/timesyncd-server.h
5070
5071 nodist_systemd_timesyncd_SOURCES = \
5072         src/timesync/timesyncd-gperf.c
5073
5074 EXTRA_DIST += \
5075         src/timesync/timesyncd-gperf.gperf
5076
5077 CLEANFILES += \
5078         src/timesync/timesyncd-gperf.c
5079
5080 systemd_timesyncd_LDADD = \
5081         libsystemd-resolve.la \
5082         libsystemd-network.la \
5083         libsystemd-label.la \
5084         libsystemd-internal.la \
5085         libsystemd-shared.la
5086
5087 rootlibexec_PROGRAMS += \
5088         systemd-timesyncd
5089
5090 nodist_systemunit_DATA += \
5091         units/systemd-timesyncd.service
5092
5093 GENERAL_ALIASES += \
5094         $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
5095
5096 EXTRA_DIST += \
5097         units/systemd-timesyncd.service.in
5098
5099 nodist_pkgsysconf_DATA += \
5100         src/timesync/timesyncd.conf
5101
5102 EXTRA_DIST += \
5103         src/timesync/timesyncd.conf.in
5104
5105 CLEANFILES += \
5106         src/timesync/timesyncd.conf
5107 endif
5108
5109 # ------------------------------------------------------------------------------
5110 if HAVE_MYHOSTNAME
5111 libnss_myhostname_la_SOURCES = \
5112         src/nss-myhostname/nss-myhostname.sym \
5113         src/nss-myhostname/nss-myhostname.c
5114
5115 libnss_myhostname_la_LDFLAGS = \
5116         $(AM_LDFLAGS) \
5117         -module \
5118         -export-dynamic \
5119         -avoid-version \
5120         -shared \
5121         -shrext .so.2 \
5122         -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
5123
5124 libnss_myhostname_la_LIBADD = \
5125         libsystemd-shared.la \
5126         libsystemd-internal.la
5127
5128 lib_LTLIBRARIES += \
5129         libnss_myhostname.la
5130 endif
5131
5132 # ------------------------------------------------------------------------------
5133 if ENABLE_MACHINED
5134 systemd_machined_SOURCES = \
5135         src/machine/machined.c \
5136         src/machine/machined.h
5137
5138 systemd_machined_LDADD = \
5139         libsystemd-machine-core.la
5140
5141 rootlibexec_PROGRAMS += \
5142         systemd-machined
5143
5144 libsystemd_machine_core_la_SOURCES = \
5145         src/machine/machine.c \
5146         src/machine/machine.h \
5147         src/machine/machined-dbus.c \
5148         src/machine/machine-dbus.c \
5149         src/machine/machine-dbus.h \
5150         src/machine/image-dbus.c \
5151         src/machine/image-dbus.h
5152
5153 libsystemd_machine_core_la_LIBADD = \
5154         libsystemd-label.la \
5155         libsystemd-internal.la \
5156         libudev-internal.la \
5157         libsystemd-shared.la
5158
5159 noinst_LTLIBRARIES += \
5160         libsystemd-machine-core.la
5161
5162 machinectl_SOURCES = \
5163         src/machine/machinectl.c
5164
5165 machinectl_LDADD = \
5166         libsystemd-internal.la \
5167         libsystemd-logs.la \
5168         libsystemd-journal-internal.la \
5169         libsystemd-shared.la
5170
5171 rootbin_PROGRAMS += \
5172         machinectl
5173
5174 dist_bashcompletion_DATA += \
5175         shell-completion/bash/machinectl
5176
5177 test_machine_tables_SOURCES = \
5178         src/machine/test-machine-tables.c
5179
5180 test_machine_tables_LDADD = \
5181         libsystemd-machine-core.la
5182
5183 tests += \
5184         test-machine-tables
5185
5186 nodist_systemunit_DATA += \
5187         units/systemd-machined.service
5188
5189 dist_systemunit_DATA += \
5190         units/machine.slice
5191
5192 dist_systemunit_DATA_busnames += \
5193         units/org.freedesktop.machine1.busname
5194
5195 dist_dbussystemservice_DATA += \
5196         src/machine/org.freedesktop.machine1.service
5197
5198 dist_dbuspolicy_DATA += \
5199         src/machine/org.freedesktop.machine1.conf
5200
5201 polkitpolicy_files += \
5202         src/machine/org.freedesktop.machine1.policy
5203
5204 polkitpolicy_in_files += \
5205         src/machine/org.freedesktop.machine1.policy.in
5206
5207 dist_zshcompletion_DATA += \
5208         shell-completion/zsh/_machinectl \
5209         shell-completion/zsh/_sd_machines
5210
5211 SYSTEM_UNIT_ALIASES += \
5212         systemd-machined.service dbus-org.freedesktop.machine1.service
5213
5214 BUSNAMES_TARGET_WANTS += \
5215         org.freedesktop.machine1.busname
5216
5217 EXTRA_DIST += \
5218         units/systemd-machined.service.in
5219
5220 libnss_mymachines_la_SOURCES = \
5221         src/nss-mymachines/nss-mymachines.sym \
5222         src/nss-mymachines/nss-mymachines.c
5223
5224 libnss_mymachines_la_LDFLAGS = \
5225         $(AM_LDFLAGS) \
5226         -module \
5227         -export-dynamic \
5228         -avoid-version \
5229         -shared \
5230         -shrext .so.2 \
5231         -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
5232
5233 libnss_mymachines_la_LIBADD = \
5234         libsystemd-shared.la \
5235         libsystemd-internal.la
5236
5237 lib_LTLIBRARIES += \
5238         libnss_mymachines.la
5239
5240 if HAVE_LIBCURL
5241
5242 bin_PROGRAMS += \
5243         systemd-import
5244
5245 systemd_import_SOURCES = \
5246         src/import/import.c \
5247         src/import/import-raw.c \
5248         src/import/import-raw.h \
5249         src/import/import-tar.c \
5250         src/import/import-tar.h \
5251         src/import/import-dkr.c \
5252         src/import/import-dkr.h \
5253         src/import/import-job.c \
5254         src/import/import-job.h \
5255         src/import/import-util.c \
5256         src/import/import-util.h \
5257         src/import/curl-util.c \
5258         src/import/curl-util.h \
5259         src/import/aufs-util.c \
5260         src/import/aufs-util.h \
5261         src/import/qcow2-util.c \
5262         src/import/qcow2-util.h
5263
5264 systemd_import_CFLAGS = \
5265         $(AM_CFLAGS) \
5266         $(LIBCURL_CFLAGS) \
5267         $(XZ_CFLAGS) \
5268         $(ZLIB_CFLAGS)
5269
5270 systemd_import_LDADD = \
5271         libsystemd-internal.la \
5272         libsystemd-label.la \
5273         libsystemd-shared.la \
5274         $(LIBCURL_LIBS) \
5275         $(XZ_LIBS) \
5276         $(ZLIB_LIBS)
5277
5278 endif
5279
5280 if HAVE_ZLIB
5281 manual_tests += \
5282         test-qcow2
5283
5284 test_qcow2_SOURCES = \
5285         src/import/test-qcow2.c \
5286         src/import/qcow2-util.c \
5287         src/import/qcow2-util.h
5288
5289 test_qcow2_CFLAGS = \
5290         $(AM_CFLAGS) \
5291         $(ZLIB_CFLAGS)
5292
5293 test_qcow2_LDADD = \
5294         libsystemd-internal.la \
5295         libsystemd-label.la \
5296         libsystemd-shared.la \
5297         $(ZLIB_LIBS)
5298 endif
5299
5300 endif
5301
5302 # ------------------------------------------------------------------------------
5303 if ENABLE_RESOLVED
5304 systemd_resolved_SOURCES = \
5305         src/resolve/resolved.c \
5306         src/resolve/resolved-manager.c \
5307         src/resolve/resolved-manager.h \
5308         src/resolve/resolved-conf.c \
5309         src/resolve/resolved-conf.h \
5310         src/resolve/resolved-bus.c \
5311         src/resolve/resolved-bus.h \
5312         src/resolve/resolved-link.h \
5313         src/resolve/resolved-link.c \
5314         src/resolve/resolved-def.h \
5315         src/resolve/resolved-dns-domain.h \
5316         src/resolve/resolved-dns-domain.c \
5317         src/resolve/resolved-dns-rr.h \
5318         src/resolve/resolved-dns-rr.c \
5319         src/resolve/resolved-dns-question.h \
5320         src/resolve/resolved-dns-question.c \
5321         src/resolve/resolved-dns-answer.h \
5322         src/resolve/resolved-dns-answer.c \
5323         src/resolve/resolved-dns-packet.h \
5324         src/resolve/resolved-dns-packet.c \
5325         src/resolve/resolved-dns-query.h \
5326         src/resolve/resolved-dns-query.c \
5327         src/resolve/resolved-dns-transaction.h \
5328         src/resolve/resolved-dns-transaction.c \
5329         src/resolve/resolved-dns-scope.h \
5330         src/resolve/resolved-dns-scope.c \
5331         src/resolve/resolved-dns-server.h \
5332         src/resolve/resolved-dns-server.c \
5333         src/resolve/resolved-dns-cache.h \
5334         src/resolve/resolved-dns-cache.c \
5335         src/resolve/resolved-dns-zone.h \
5336         src/resolve/resolved-dns-zone.c \
5337         src/resolve/resolved-dns-stream.h \
5338         src/resolve/resolved-dns-stream.c \
5339         src/resolve/dns-type.c \
5340         src/resolve/dns-type.h \
5341         src/resolve/dns_type-from-name.h \
5342         src/resolve/dns_type-to-name.h
5343
5344 nodist_systemd_resolved_SOURCES = \
5345         src/resolve/resolved-gperf.c
5346
5347 EXTRA_DIST += \
5348         src/resolve/resolved-gperf.gperf \
5349         src/resolve/dns_type-from-name.gperf
5350
5351 CLEANFILES += \
5352         src/resolve/resolved-gperf.c
5353
5354 systemd_resolved_LDADD = \
5355         libsystemd-network.la \
5356         libsystemd-label.la \
5357         libsystemd-internal.la \
5358         libsystemd-shared.la \
5359         $(LIBIDN_LIBS)
5360
5361 rootlibexec_PROGRAMS += \
5362         systemd-resolved
5363
5364 nodist_systemunit_DATA += \
5365         units/systemd-resolved.service
5366
5367 dist_systemunit_DATA_busnames += \
5368         units/org.freedesktop.resolve1.busname
5369
5370 dist_dbuspolicy_DATA += \
5371         src/resolve/org.freedesktop.resolve1.conf
5372
5373 dist_dbussystemservice_DATA += \
5374         src/resolve/org.freedesktop.resolve1.service
5375
5376 EXTRA_DIST += \
5377         units/systemd-resolved.service.in
5378
5379 SYSTEM_UNIT_ALIASES += \
5380         systemd-resolved.service dbus-org.freedesktop.resolve1.service
5381
5382 BUSNAMES_TARGET_WANTS += \
5383         org.freedesktop.resolve1.busname
5384
5385 GENERAL_ALIASES += \
5386         $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
5387
5388 nodist_pkgsysconf_DATA += \
5389         src/resolve/resolved.conf
5390
5391 EXTRA_DIST += \
5392         src/resolve/resolved.conf.in
5393
5394 CLEANFILES += \
5395         src/resolve/resolved.conf
5396
5397 tests += \
5398         test-dns-domain
5399
5400 test_dns_domain_SOURCES = \
5401         src/resolve/resolved-dns-domain.h \
5402         src/resolve/resolved-dns-domain.c \
5403         src/resolve/test-dns-domain.c
5404
5405 test_dns_domain_LDADD = \
5406         libsystemd-network.la \
5407         libsystemd-label.la \
5408         libsystemd-internal.la \
5409         libsystemd-shared.la \
5410         $(LIBIDN_LIBS)
5411
5412 libnss_resolve_la_SOURCES = \
5413         src/nss-resolve/nss-resolve.sym \
5414         src/nss-resolve/nss-resolve.c
5415
5416 libnss_resolve_la_LDFLAGS = \
5417         $(AM_LDFLAGS) \
5418         -module \
5419         -export-dynamic \
5420         -avoid-version \
5421         -shared \
5422         -shrext .so.2 \
5423         -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5424
5425 libnss_resolve_la_LIBADD = \
5426         libsystemd-internal.la \
5427         libsystemd-shared.la
5428
5429 lib_LTLIBRARIES += \
5430         libnss_resolve.la
5431
5432 systemd_resolve_host_SOURCES = \
5433         src/resolve-host/resolve-host.c \
5434         src/resolve/resolved-dns-packet.c \
5435         src/resolve/resolved-dns-packet.h \
5436         src/resolve/resolved-dns-rr.c \
5437         src/resolve/resolved-dns-rr.h \
5438         src/resolve/resolved-dns-answer.c \
5439         src/resolve/resolved-dns-answer.h \
5440         src/resolve/resolved-dns-question.c \
5441         src/resolve/resolved-dns-question.h \
5442         src/resolve/resolved-dns-domain.c \
5443         src/resolve/resolved-dns-domain.h \
5444         src/resolve/dns-type.c \
5445         src/resolve/dns-type.h \
5446         src/resolve/dns_type-from-name.h \
5447         src/resolve/dns_type-to-name.h
5448
5449 systemd_resolve_host_LDADD = \
5450         libsystemd-internal.la \
5451         libsystemd-shared.la \
5452         $(LIBIDN_LIBS)
5453
5454 rootlibexec_PROGRAMS += \
5455         systemd-resolve-host
5456
5457 endif
5458
5459 # ------------------------------------------------------------------------------
5460 if ENABLE_NETWORKD
5461 rootlibexec_PROGRAMS += \
5462         systemd-networkd
5463
5464 systemd_networkd_SOURCES = \
5465         src/network/networkd.c
5466
5467 systemd_networkd_LDADD = \
5468         libsystemd-networkd-core.la
5469
5470 if HAVE_LIBIPTC
5471 systemd_networkd_LDADD += \
5472         libsystemd-fw.la
5473 endif
5474
5475 noinst_LTLIBRARIES += \
5476         libsystemd-networkd-core.la
5477
5478 libsystemd_networkd_core_la_CFLAGS = \
5479         $(AM_CFLAGS)
5480
5481 libsystemd_networkd_core_la_SOURCES = \
5482         src/libsystemd-network/network-internal.h \
5483         src/network/networkd.h \
5484         src/network/networkd-link.h \
5485         src/network/networkd-netdev.h \
5486         src/network/networkd-netdev-tunnel.h \
5487         src/network/networkd-netdev-veth.h \
5488         src/network/networkd-netdev-vxlan.h \
5489         src/network/networkd-netdev-vlan.h \
5490         src/network/networkd-netdev-macvlan.h \
5491         src/network/networkd-netdev-ipvlan.h \
5492         src/network/networkd-netdev-dummy.h \
5493         src/network/networkd-netdev-tuntap.h \
5494         src/network/networkd-netdev-bond.h \
5495         src/network/networkd-netdev-bridge.h \
5496         src/network/networkd-netdev.c \
5497         src/network/networkd-netdev-tunnel.c \
5498         src/network/networkd-netdev-veth.c \
5499         src/network/networkd-netdev-vxlan.c \
5500         src/network/networkd-netdev-vlan.c \
5501         src/network/networkd-netdev-macvlan.c \
5502         src/network/networkd-netdev-ipvlan.c \
5503         src/network/networkd-netdev-dummy.c \
5504         src/network/networkd-netdev-tuntap.c \
5505         src/network/networkd-netdev-bond.c \
5506         src/network/networkd-netdev-bridge.c \
5507         src/network/networkd-link.c \
5508         src/network/networkd-ipv4ll.c \
5509         src/network/networkd-dhcp4.c \
5510         src/network/networkd-dhcp6.c \
5511         src/network/networkd-network.c \
5512         src/network/networkd-address.c \
5513         src/network/networkd-route.c \
5514         src/network/networkd-manager.c \
5515         src/network/networkd-fdb.c \
5516         src/network/networkd-address-pool.c
5517
5518 nodist_libsystemd_networkd_core_la_SOURCES = \
5519         src/network/networkd-network-gperf.c \
5520         src/network/networkd-netdev-gperf.c
5521
5522 libsystemd_networkd_core_la_LIBADD = \
5523         libudev-internal.la \
5524         libsystemd-internal.la \
5525         libsystemd-network.la \
5526         libsystemd-label.la \
5527         libsystemd-shared.la
5528
5529 rootlibexec_PROGRAMS += \
5530         systemd-networkd-wait-online
5531
5532 systemd_networkd_wait_online_CFLAGS = \
5533         $(AM_CFLAGS)
5534
5535 systemd_networkd_wait_online_SOURCES = \
5536         src/libsystemd-network/network-internal.h \
5537         src/network/networkd-wait-online.h \
5538         src/network/networkd-wait-online-link.h \
5539         src/network/networkd-wait-online.c \
5540         src/network/networkd-wait-online-manager.c \
5541         src/network/networkd-wait-online-link.c
5542
5543 systemd_networkd_wait_online_LDADD = \
5544         libsystemd-network.la \
5545         libudev-internal.la \
5546         libsystemd-internal.la \
5547         libsystemd-shared.la
5548
5549 rootbin_PROGRAMS += \
5550         networkctl
5551
5552 networkctl_SOURCES = \
5553         src/network/networkctl.c
5554
5555 networkctl_LDADD = \
5556         libsystemd-internal.la \
5557         libudev-internal.la \
5558         libsystemd-shared.la \
5559         libsystemd-network.la
5560
5561 test_network_SOURCES = \
5562         src/network/test-network.c
5563
5564 test_network_LDADD = \
5565         libsystemd-networkd-core.la
5566
5567 if HAVE_LIBIPTC
5568 test_network_LDADD += \
5569         libsystemd-fw.la
5570 endif
5571
5572 test_network_tables_SOURCES = \
5573         src/network/test-network-tables.c \
5574         src/shared/test-tables.h
5575
5576 test_network_tables_LDADD = \
5577         libsystemd-networkd-core.la \
5578         libudev-core.la
5579
5580 if HAVE_LIBIPTC
5581 test_network_tables_LDADD += \
5582         libsystemd-fw.la
5583 endif
5584
5585 tests += \
5586         test-network \
5587         test-network-tables
5588
5589 nodist_systemunit_DATA += \
5590         units/systemd-networkd.service \
5591         units/systemd-networkd-wait-online.service
5592
5593 GENERAL_ALIASES += \
5594         $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
5595         $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
5596
5597 EXTRA_DIST += \
5598         src/network/networkd-network-gperf.gperf \
5599         src/network/networkd-netdev-gperf.gperf \
5600         units/systemd-networkd.service.in \
5601         units/systemd-networkd-wait-online.service.in
5602
5603 CLEANFILES += \
5604         src/network/networkd-network-gperf.c \
5605         src/network/networkd-netdev-gperf.c
5606 endif
5607
5608 # ------------------------------------------------------------------------------
5609 if ENABLE_LOGIND
5610 systemd_logind_SOURCES = \
5611         src/login/logind.c \
5612         src/login/logind.h
5613
5614 nodist_systemd_logind_SOURCES = \
5615         src/login/logind-gperf.c
5616
5617 systemd_logind_LDADD = \
5618         libsystemd-logind-core.la
5619
5620 libsystemd_logind_core_la_SOURCES = \
5621         src/login/logind-core.c \
5622         src/login/logind-device.c \
5623         src/login/logind-device.h \
5624         src/login/logind-button.c \
5625         src/login/logind-button.h \
5626         src/login/logind-action.c \
5627         src/login/logind-action.h \
5628         src/login/logind-seat.c \
5629         src/login/logind-seat.h \
5630         src/login/logind-session.c \
5631         src/login/logind-session.h \
5632         src/login/logind-session-device.c \
5633         src/login/logind-session-device.h \
5634         src/login/logind-user.c \
5635         src/login/logind-user.h \
5636         src/login/logind-inhibit.c \
5637         src/login/logind-inhibit.h \
5638         src/login/logind-dbus.c \
5639         src/login/logind-session-dbus.c \
5640         src/login/logind-seat-dbus.c \
5641         src/login/logind-user-dbus.c \
5642         src/login/logind-acl.h
5643
5644 libsystemd_logind_core_la_LIBADD = \
5645         libsystemd-label.la \
5646         libsystemd-internal.la \
5647         libudev-internal.la \
5648         libsystemd-shared.la
5649
5650 if HAVE_ACL
5651 libsystemd_logind_core_la_SOURCES += \
5652         src/login/logind-acl.c
5653
5654 libsystemd_logind_core_la_LIBADD += \
5655         libsystemd-acl.la
5656 endif
5657
5658 noinst_LTLIBRARIES += \
5659         libsystemd-logind-core.la
5660
5661 systemd_user_sessions_SOURCES = \
5662         src/login/user-sessions.c
5663
5664 systemd_user_sessions_LDADD = \
5665         libsystemd-shared.la
5666
5667 rootlibexec_PROGRAMS += \
5668         systemd-logind \
5669         systemd-user-sessions
5670
5671 loginctl_SOURCES = \
5672         src/login/loginctl.c \
5673         src/login/sysfs-show.h \
5674         src/login/sysfs-show.c
5675
5676 loginctl_LDADD = \
5677         libsystemd-internal.la \
5678         libsystemd-logs.la \
5679         libsystemd-journal-internal.la \
5680         libudev-internal.la \
5681         libsystemd-shared.la
5682
5683 rootbin_PROGRAMS += \
5684         loginctl
5685
5686 dist_bashcompletion_DATA += \
5687         shell-completion/bash/loginctl
5688
5689 dist_zshcompletion_DATA += \
5690         shell-completion/zsh/_loginctl \
5691         shell-completion/zsh/_systemd-inhibit
5692
5693 systemd_inhibit_SOURCES = \
5694         src/login/inhibit.c
5695
5696 systemd_inhibit_LDADD = \
5697         libsystemd-internal.la \
5698         libsystemd-shared.la
5699
5700 rootbin_PROGRAMS += \
5701         systemd-inhibit
5702
5703 test_login_SOURCES = \
5704         src/libsystemd/sd-login/test-login.c
5705
5706 test_login_LDADD = \
5707         libsystemd-internal.la \
5708         libsystemd-shared.la
5709
5710 test_login_shared_SOURCES = \
5711         src/login/test-login-shared.c
5712
5713 test_login_shared_LDADD = \
5714         libsystemd-internal.la \
5715         libsystemd-shared.la
5716
5717 test_inhibit_SOURCES = \
5718         src/login/test-inhibit.c
5719
5720 test_inhibit_LDADD = \
5721         libsystemd-internal.la \
5722         libsystemd-shared.la
5723
5724 test_login_tables_SOURCES = \
5725         src/login/test-login-tables.c
5726
5727 test_login_tables_LDADD = \
5728         libsystemd-logind-core.la
5729
5730 manual_tests += \
5731         test-login \
5732         test-inhibit
5733
5734 tests += \
5735         test-login-tables \
5736         test-login-shared
5737
5738 if HAVE_PAM
5739 pam_systemd_la_SOURCES = \
5740         src/login/pam_systemd.sym \
5741         src/login/pam_systemd.c
5742
5743 pam_systemd_la_CFLAGS = \
5744         $(AM_CFLAGS) \
5745         $(PAM_CFLAGS) \
5746         -fvisibility=hidden
5747
5748 pam_systemd_la_LDFLAGS = \
5749         $(AM_LDFLAGS) \
5750         -module \
5751         -export-dynamic \
5752         -avoid-version \
5753         -shared \
5754         -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
5755
5756 pam_systemd_la_LIBADD = \
5757         libsystemd-internal.la \
5758         libsystemd-shared.la \
5759         $(PAM_LIBS)
5760
5761 pamlib_LTLIBRARIES = \
5762         pam_systemd.la
5763
5764 dist_pamconf_DATA = \
5765         src/login/systemd-user
5766 endif
5767
5768 nodist_systemunit_DATA += \
5769         units/systemd-logind.service \
5770         units/systemd-user-sessions.service
5771
5772 dist_systemunit_DATA += \
5773         units/user.slice
5774
5775 dist_systemunit_DATA_busnames += \
5776         units/org.freedesktop.login1.busname
5777
5778 dist_dbussystemservice_DATA += \
5779         src/login/org.freedesktop.login1.service
5780
5781 dist_dbuspolicy_DATA += \
5782         src/login/org.freedesktop.login1.conf
5783
5784 dist_pkgsysconf_DATA += \
5785         src/login/logind.conf
5786
5787 polkitpolicy_files += \
5788         src/login/org.freedesktop.login1.policy
5789
5790 INSTALL_DIRS += \
5791         $(systemdstatedir)
5792
5793 MULTI_USER_TARGET_WANTS += \
5794         systemd-logind.service \
5795         systemd-user-sessions.service
5796
5797 SYSTEM_UNIT_ALIASES += \
5798         systemd-logind.service dbus-org.freedesktop.login1.service
5799
5800 BUSNAMES_TARGET_WANTS += \
5801         org.freedesktop.login1.busname
5802
5803 dist_udevrules_DATA += \
5804         src/login/70-uaccess.rules \
5805         src/login/70-power-switch.rules
5806
5807 nodist_udevrules_DATA += \
5808         src/login/71-seat.rules \
5809         src/login/73-seat-late.rules
5810
5811 CLEANFILES += \
5812         src/login/logind-gperf.c \
5813         src/login/71-seat.rules \
5814         src/login/73-seat-late.rules
5815 endif
5816
5817 polkitpolicy_in_files += \
5818         src/login/org.freedesktop.login1.policy.in
5819
5820 EXTRA_DIST += \
5821         src/login/logind-gperf.gperf \
5822         src/login/71-seat.rules.in \
5823         src/login/73-seat-late.rules.in \
5824         units/systemd-logind.service.in \
5825         units/systemd-user-sessions.service.in
5826
5827 # ------------------------------------------------------------------------------
5828 if HAVE_PYTHON_DEVEL
5829 pkgpyexec_LTLIBRARIES = \
5830         _journal.la \
5831         id128.la \
5832         _daemon.la \
5833         _reader.la \
5834         login.la
5835
5836 _journal_la_SOURCES = \
5837         src/python-systemd/_journal.c
5838
5839 _journal_la_CFLAGS = \
5840         $(AM_CFLAGS) \
5841         -fvisibility=default \
5842         $(PYTHON_DEVEL_CFLAGS)
5843
5844 _journal_la_LDFLAGS = \
5845         $(AM_LDFLAGS) \
5846         -shared \
5847         -module \
5848         -avoid-version
5849
5850 _journal_la_LIBADD = \
5851         $(PYTHON_DEVEL_LIBS) \
5852         libsystemd.la
5853
5854 id128_la_SOURCES = \
5855         src/python-systemd/id128.c \
5856         src/python-systemd/pyutil.c \
5857         src/python-systemd/pyutil.h
5858
5859 nodist_id128_la_SOURCES = \
5860         src/python-systemd/id128-constants.h
5861
5862 id128_la_CFLAGS = \
5863         $(AM_CFLAGS) \
5864         -fvisibility=default \
5865         $(PYTHON_DEVEL_CFLAGS) \
5866         -I$(top_builddir)/src/python-systemd
5867
5868 id128_la_LDFLAGS = \
5869         $(AM_LDFLAGS) \
5870         -shared \
5871         -module \
5872         -avoid-version
5873
5874 id128_la_LIBADD = \
5875         $(PYTHON_DEVEL_LIBS) \
5876         libsystemd-shared.la \
5877         libsystemd.la
5878
5879 _daemon_la_SOURCES = \
5880         src/python-systemd/_daemon.c \
5881         src/python-systemd/pyutil.c \
5882         src/python-systemd/pyutil.h
5883
5884 _daemon_la_CFLAGS = \
5885         $(AM_CFLAGS) \
5886         -fvisibility=default \
5887         $(PYTHON_DEVEL_CFLAGS) \
5888         -I$(top_builddir)/src/python-systemd
5889
5890 _daemon_la_LDFLAGS = \
5891         $(AM_LDFLAGS) \
5892         -shared \
5893         -module \
5894         -avoid-version
5895
5896 _daemon_la_LIBADD = \
5897         $(PYTHON_DEVEL_LIBS) \
5898         libsystemd-shared.la \
5899         libsystemd.la
5900
5901 _reader_la_SOURCES = \
5902         src/python-systemd/_reader.c \
5903         src/python-systemd/pyutil.c \
5904         src/python-systemd/pyutil.h
5905
5906 _reader_la_CFLAGS = \
5907         $(AM_CFLAGS) \
5908         -fvisibility=default \
5909         $(PYTHON_DEVEL_CFLAGS)
5910
5911 _reader_la_LDFLAGS = \
5912         $(AM_LDFLAGS) \
5913         -shared \
5914         -module \
5915         -avoid-version
5916
5917 _reader_la_LIBADD = \
5918         $(PYTHON_DEVEL_LIBS) \
5919         libsystemd-shared.la \
5920         libsystemd.la
5921
5922 login_la_SOURCES = \
5923         src/python-systemd/login.c \
5924         src/python-systemd/pyutil.c \
5925         src/python-systemd/pyutil.h
5926
5927 login_la_CFLAGS = \
5928         $(AM_CFLAGS) \
5929         -fvisibility=default \
5930         $(PYTHON_DEVEL_CFLAGS)
5931
5932 login_la_LDFLAGS = \
5933         $(AM_LDFLAGS) \
5934         -shared \
5935         -module \
5936         -avoid-version
5937
5938 login_la_LIBADD = \
5939         $(PYTHON_DEVEL_LIBS) \
5940         libsystemd-shared.la \
5941         libsystemd.la
5942
5943 dist_pkgpyexec_PYTHON = \
5944         src/python-systemd/journal.py \
5945         src/python-systemd/daemon.py \
5946         src/python-systemd/__init__.py
5947
5948 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
5949         $(AM_V_at)$(MKDIR_P) $(dir $@)
5950         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
5951
5952 BUILT_SOURCES += \
5953         src/python-systemd/id128-constants.h
5954
5955 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
5956 sphinx-%:
5957         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
5958         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
5959         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
5960
5961 python-shell:
5962         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
5963         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
5964
5965 destdir-sphinx: all
5966         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
5967                 $(MAKE) DESTDIR="$$dir" install && \
5968                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
5969                 rm -rf "$$dir"
5970
5971 endif
5972
5973 CLEAN_LOCAL_HOOKS += clean-sphinx
5974
5975 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
5976
5977 clean-sphinx:
5978         -rm -rf docs/html/python-systemd/
5979
5980 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
5981 clean-python:
5982         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
5983         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
5984
5985 # ------------------------------------------------------------------------------
5986 if ENABLE_COMPAT_LIBS
5987 EXTRA_DIST += \
5988         src/compat-libs/linkwarning.h
5989
5990 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
5991         $(AM_V_at)$(MKDIR_P) $(dir $@)
5992         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
5993
5994 BUILT_SOURCES += \
5995         libsystemd-journal.c \
5996         libsystemd-login.c \
5997         libsystemd-id128.c \
5998         libsystemd-daemon.c
5999
6000 libsystemd_journal_la_SOURCES = \
6001         libsystemd-journal.c \
6002         src/compat-libs/libsystemd-journal.sym
6003
6004 libsystemd_journal_la_CPPFLAGS = \
6005         $(AM_CFLAGS) \
6006         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
6007
6008 libsystemd_journal_la_LDFLAGS = \
6009         $(AM_LDFLAGS) \
6010         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
6011         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
6012
6013 libsystemd_journal_la_LIBADD = \
6014         libsystemd-journal-internal.la \
6015         libsystemd-internal.la \
6016         libsystemd-shared.la
6017
6018 libsystemd_login_la_SOURCES = \
6019         libsystemd-login.c \
6020         src/compat-libs/libsystemd-login.sym
6021
6022 libsystemd_login_la_CPPFLAGS = \
6023         $(AM_CFLAGS) \
6024         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
6025
6026 libsystemd_login_la_LDFLAGS = \
6027         $(AM_LDFLAGS) \
6028         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
6029         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
6030
6031 libsystemd_login_la_LIBADD = \
6032         libsystemd-internal.la \
6033         libsystemd-shared.la
6034
6035 libsystemd_id128_la_SOURCES = \
6036         libsystemd-id128.c \
6037         src/compat-libs/libsystemd-id128.sym
6038
6039 libsystemd_id128_la_CPPFLAGS = \
6040         $(AM_CFLAGS) \
6041         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
6042
6043 libsystemd_id128_la_LDFLAGS = \
6044         $(AM_LDFLAGS) \
6045         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
6046         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
6047
6048 libsystemd_id128_la_LIBADD = \
6049         libsystemd-internal.la \
6050         libsystemd-shared.la
6051
6052 libsystemd_daemon_la_SOURCES = \
6053         libsystemd-daemon.c \
6054         src/compat-libs/libsystemd-daemon.sym
6055
6056 libsystemd_daemon_la_CPPFLAGS = \
6057         $(AM_CFLAGS) \
6058         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
6059
6060 libsystemd_daemon_la_LDFLAGS = \
6061         $(AM_LDFLAGS) \
6062         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
6063         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
6064
6065 libsystemd_daemon_la_LIBADD = \
6066         libsystemd-internal.la \
6067         libsystemd-shared.la
6068
6069 lib_LTLIBRARIES += \
6070         libsystemd-journal.la \
6071         libsystemd-login.la \
6072         libsystemd-id128.la \
6073         libsystemd-daemon.la
6074
6075 pkgconfiglib_DATA += \
6076         src/compat-libs/libsystemd-journal.pc \
6077         src/compat-libs/libsystemd-login.pc \
6078         src/compat-libs/libsystemd-id128.pc \
6079         src/compat-libs/libsystemd-daemon.pc
6080
6081 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
6082 compat-lib-install-hook:
6083         libname=libsystemd-login.so && $(move-to-rootlibdir)
6084         libname=libsystemd-journal.so && $(move-to-rootlibdir)
6085         libname=libsystemd-id128.so && $(move-to-rootlibdir)
6086         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
6087
6088 compat-lib-uninstall-hook:
6089         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
6090         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
6091         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
6092         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
6093
6094 INSTALL_EXEC_HOOKS += compat-lib-install-hook
6095 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
6096 endif
6097
6098 EXTRA_DIST += \
6099         src/compat-libs/libsystemd-journal.pc.in \
6100         src/compat-libs/libsystemd-login.pc.in \
6101         src/compat-libs/libsystemd-id128.pc.in \
6102         src/compat-libs/libsystemd-daemon.pc.in
6103
6104 # ------------------------------------------------------------------------------
6105 substitutions = \
6106        '|rootlibexecdir=$(rootlibexecdir)|' \
6107        '|rootbindir=$(rootbindir)|' \
6108        '|bindir=$(bindir)|' \
6109        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
6110        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
6111        '|pkgsysconfdir=$(pkgsysconfdir)|' \
6112        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
6113        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
6114        '|pkgdatadir=$(pkgdatadir)|' \
6115        '|systemunitdir=$(systemunitdir)|' \
6116        '|userunitdir=$(userunitdir)|' \
6117        '|systempresetdir=$(systempresetdir)|' \
6118        '|userpresetdir=$(userpresetdir)|' \
6119        '|udevhwdbdir=$(udevhwdbdir)|' \
6120        '|udevrulesdir=$(udevrulesdir)|' \
6121        '|catalogdir=$(catalogdir)|' \
6122        '|tmpfilesdir=$(tmpfilesdir)|' \
6123        '|sysusersdir=$(sysusersdir)|' \
6124        '|sysctldir=$(sysctldir)|' \
6125        '|systemgeneratordir=$(systemgeneratordir)|' \
6126        '|usergeneratordir=$(usergeneratordir)|' \
6127        '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
6128        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
6129        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
6130        '|PACKAGE_URL=$(PACKAGE_URL)|' \
6131        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
6132        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
6133        '|prefix=$(prefix)|' \
6134        '|exec_prefix=$(exec_prefix)|' \
6135        '|libdir=$(libdir)|' \
6136        '|includedir=$(includedir)|' \
6137        '|VERSION=$(VERSION)|' \
6138        '|rootprefix=$(rootprefix)|' \
6139        '|udevlibexecdir=$(udevlibexecdir)|' \
6140        '|SUSHELL=$(SUSHELL)|' \
6141        '|DEBUGTTY=$(DEBUGTTY)|' \
6142        '|KILL=$(KILL)|' \
6143        '|KMOD=$(KMOD)|' \
6144        '|MKDIR_P=$(MKDIR_P)|' \
6145        '|QUOTAON=$(QUOTAON)|' \
6146        '|QUOTACHECK=$(QUOTACHECK)|' \
6147        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
6148        '|VARLOGDIR=$(varlogdir)|' \
6149        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
6150        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
6151        '|PYTHON=$(PYTHON)|' \
6152        '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
6153        '|NTP_SERVERS=$(NTP_SERVERS)|' \
6154        '|DNS_SERVERS=$(DNS_SERVERS)|' \
6155        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
6156        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
6157        '|TTY_GID=$(TTY_GID)|' \
6158        '|systemsleepdir=$(systemsleepdir)|' \
6159        '|systemshutdowndir=$(systemshutdowndir)|' \
6160        '|binfmtdir=$(binfmtdir)|' \
6161        '|modulesloaddir=$(modulesloaddir)|'
6162
6163 SED_PROCESS = \
6164         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
6165         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
6166                 < $< > $@
6167
6168 units/%: units/%.in
6169         $(SED_PROCESS)
6170
6171 man/%: man/%.in
6172         $(SED_PROCESS)
6173
6174 sysctl.d/%: sysctl.d/%.in
6175         $(SED_PROCESS)
6176
6177 %.pc: %.pc.in
6178         $(SED_PROCESS)
6179
6180 %.conf: %.conf.in
6181         $(SED_PROCESS)
6182
6183 src/core/macros.%: src/core/macros.%.in
6184         $(SED_PROCESS)
6185
6186 src/%.policy.in: src/%.policy.in.in
6187         $(SED_PROCESS)
6188
6189 shell-completion/%: shell-completion/%.in
6190         $(SED_PROCESS)
6191
6192 %.rules: %.rules.in
6193         $(SED_PROCESS)
6194
6195 %.conf: %.conf.in
6196         $(SED_PROCESS)
6197
6198 %.sh: %.sh.in
6199         $(SED_PROCESS)
6200         $(AM_V_GEN)chmod +x $@
6201
6202 src/%.c: src/%.gperf
6203         $(AM_V_at)$(MKDIR_P) $(dir $@)
6204         $(AM_V_GPERF)$(GPERF) < $< > $@
6205
6206 src/%: src/%.m4
6207         $(AM_V_at)$(MKDIR_P) $(dir $@)
6208         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6209
6210 sysusers.d/%: sysusers.d/%.m4
6211         $(AM_V_at)$(MKDIR_P) $(dir $@)
6212         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6213
6214 tmpfiles.d/%: tmpfiles.d/%.m4
6215         $(AM_V_at)$(MKDIR_P) $(dir $@)
6216         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6217
6218
6219 units/%: units/%.m4
6220         $(AM_V_at)$(MKDIR_P) $(dir $@)
6221         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
6222
6223 units/user/%: units/user/%.m4
6224         $(AM_V_at)$(MKDIR_P) $(dir $@)
6225         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
6226
6227 if ENABLE_POLKIT
6228 nodist_polkitpolicy_DATA = \
6229         $(polkitpolicy_files) \
6230         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
6231 endif
6232
6233 EXTRA_DIST += \
6234         $(polkitpolicy_in_files) \
6235         $(polkitpolicy_in_in_files)
6236
6237 CLEANFILES += \
6238         $(nodist_systemunit_DATA) \
6239         $(nodist_userunit_DATA) \
6240         $(pkgconfiglib_DATA) \
6241         $(nodist_polkitpolicy_DATA)
6242
6243 # ------------------------------------------------------------------------------
6244 if ENABLE_MANPAGES
6245 man/custom-entities.ent: configure.ac
6246         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
6247         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
6248          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
6249          > $@ # '
6250
6251 DISTCLEANFILES += \
6252         man/custom-entities.ent
6253
6254 XSLTPROC_FLAGS = \
6255         --nonet \
6256         --xinclude \
6257         --stringparam man.output.quietly 1 \
6258         --stringparam funcsynopsis.style ansi \
6259         --stringparam man.authors.section.enabled 0 \
6260         --stringparam man.copyright.section.enabled 0 \
6261         --stringparam systemd.version $(VERSION) \
6262         --path '$(builddir)/man:$(srcdir)/man'
6263
6264 XSLTPROC_PROCESS_MAN = \
6265         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
6266
6267 XSLTPROC_PROCESS_HTML = \
6268         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
6269
6270 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
6271         $(XSLTPROC_PROCESS_MAN)
6272
6273 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
6274         $(XSLTPROC_PROCESS_MAN)
6275
6276 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
6277         $(XSLTPROC_PROCESS_MAN)
6278
6279 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
6280         $(XSLTPROC_PROCESS_MAN)
6281
6282 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
6283         $(XSLTPROC_PROCESS_MAN)
6284
6285 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
6286         $(XSLTPROC_PROCESS_HTML)
6287
6288 define html-alias
6289         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
6290 endef
6291
6292 endif
6293
6294 EXTRA_DIST += \
6295         man/custom-html.xsl \
6296         man/custom-man.xsl
6297
6298 # ------------------------------------------------------------------------------
6299 if HAVE_SYSV_COMPAT
6300 sysvinit_DATA = \
6301         docs/sysvinit/README
6302
6303 varlog_DATA = \
6304         docs/var-log/README
6305
6306 docs/sysvinit/README: docs/sysvinit/README.in
6307         $(SED_PROCESS)
6308
6309 docs/var-log/README: docs/var-log/README.in
6310         $(SED_PROCESS)
6311
6312 CLEANFILES += \
6313         docs/sysvinit/README \
6314         docs/var-log/README
6315 endif
6316
6317 EXTRA_DIST += \
6318         docs/sysvinit/README.in \
6319         docs/var-log/README.in
6320
6321 SOCKETS_TARGET_WANTS += \
6322         systemd-initctl.socket \
6323         systemd-shutdownd.socket
6324
6325 if HAVE_UTMP
6326 if HAVE_SYSV_COMPAT
6327 RUNLEVEL1_TARGET_WANTS += \
6328         systemd-update-utmp-runlevel.service
6329 RUNLEVEL2_TARGET_WANTS += \
6330         systemd-update-utmp-runlevel.service
6331 RUNLEVEL3_TARGET_WANTS += \
6332         systemd-update-utmp-runlevel.service
6333 RUNLEVEL4_TARGET_WANTS += \
6334         systemd-update-utmp-runlevel.service
6335 RUNLEVEL5_TARGET_WANTS += \
6336         systemd-update-utmp-runlevel.service
6337 endif
6338
6339 SYSINIT_TARGET_WANTS += \
6340         systemd-update-utmp.service
6341 endif
6342
6343 SYSINIT_TARGET_WANTS += \
6344         systemd-update-done.service
6345
6346 LOCAL_FS_TARGET_WANTS += \
6347         systemd-remount-fs.service \
6348         tmp.mount
6349
6350 MULTI_USER_TARGET_WANTS += \
6351         getty.target \
6352         systemd-ask-password-wall.path
6353
6354 SYSINIT_TARGET_WANTS += \
6355         dev-hugepages.mount \
6356         dev-mqueue.mount \
6357         sys-kernel-config.mount \
6358         sys-kernel-debug.mount \
6359         sys-fs-fuse-connections.mount \
6360         systemd-sysctl.service \
6361         systemd-ask-password-console.path
6362
6363 if HAVE_SYSV_COMPAT
6364 SYSTEM_UNIT_ALIASES += \
6365         poweroff.target runlevel0.target \
6366         rescue.target runlevel1.target \
6367         multi-user.target runlevel2.target \
6368         multi-user.target runlevel3.target \
6369         multi-user.target runlevel4.target \
6370         graphical.target runlevel5.target \
6371         reboot.target runlevel6.target
6372 endif
6373
6374 SYSTEM_UNIT_ALIASES += \
6375         graphical.target default.target \
6376         reboot.target ctrl-alt-del.target \
6377         getty@.service autovt@.service
6378
6379 USER_UNIT_ALIASES += \
6380         $(systemunitdir)/shutdown.target shutdown.target \
6381         $(systemunitdir)/sockets.target sockets.target \
6382         $(systemunitdir)/timers.target timers.target \
6383         $(systemunitdir)/paths.target paths.target \
6384         $(systemunitdir)/bluetooth.target bluetooth.target \
6385         $(systemunitdir)/printer.target printer.target \
6386         $(systemunitdir)/sound.target sound.target \
6387         $(systemunitdir)/smartcard.target smartcard.target
6388
6389 if ENABLE_KDBUS
6390 USER_UNIT_ALIASES += \
6391         $(systemunitdir)/busnames.target busnames.target
6392 endif
6393
6394 GENERAL_ALIASES += \
6395         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
6396         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
6397         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
6398         $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
6399
6400 if HAVE_SYSV_COMPAT
6401 INSTALL_DIRS += \
6402         $(systemunitdir)/runlevel1.target.wants \
6403         $(systemunitdir)/runlevel2.target.wants \
6404         $(systemunitdir)/runlevel3.target.wants \
6405         $(systemunitdir)/runlevel4.target.wants \
6406         $(systemunitdir)/runlevel5.target.wants
6407 endif
6408
6409 INSTALL_DIRS += \
6410         $(prefix)/lib/modules-load.d \
6411         $(sysconfdir)/modules-load.d \
6412         $(prefix)/lib/systemd/network \
6413         $(sysconfdir)/systemd/network \
6414         $(prefix)/lib/sysctl.d \
6415         $(sysconfdir)/sysctl.d \
6416         $(prefix)/lib/kernel/install.d \
6417         $(sysconfdir)/kernel/install.d \
6418         $(systemshutdowndir) \
6419         $(systemsleepdir) \
6420         $(systemgeneratordir) \
6421         $(usergeneratordir) \
6422         \
6423         $(userunitdir) \
6424         $(pkgsysconfdir)/system \
6425         $(pkgsysconfdir)/system/multi-user.target.wants \
6426         $(pkgsysconfdir)/system/getty.target.wants \
6427         $(pkgsysconfdir)/user \
6428         $(dbussessionservicedir) \
6429         $(sysconfdir)/xdg/systemd
6430
6431 install-exec-hook: $(INSTALL_EXEC_HOOKS)
6432
6433 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
6434
6435 install-data-hook: $(INSTALL_DATA_HOOKS)
6436
6437 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6438
6439 clean-local: $(CLEAN_LOCAL_HOOKS)
6440         rm -rf $(abs_srcdir)/install-tree
6441         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
6442               $(abs_srcdir)/hwdb/iab.txt
6443
6444 DISTCHECK_CONFIGURE_FLAGS = \
6445         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6446         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6447         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
6448         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
6449         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
6450         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
6451         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
6452         --with-rootprefix=$$dc_install_base \
6453         --disable-split-usr \
6454         --enable-kdbus \
6455         --enable-compat-libs
6456
6457 if HAVE_SYSV_COMPAT
6458 DISTCHECK_CONFIGURE_FLAGS += \
6459         --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
6460         --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
6461 else
6462 DISTCHECK_CONFIGURE_FLAGS += \
6463         --with-sysvinit-path= \
6464         --with-sysvrcnd-path=
6465 endif
6466
6467 if HAVE_PYTHON
6468 DISTCHECK_CONFIGURE_FLAGS += \
6469         --with-python
6470 endif
6471
6472 if ENABLE_GTK_DOC
6473 DISTCHECK_CONFIGURE_FLAGS += \
6474         --enable-gtk-doc
6475 endif
6476
6477 #
6478 # Require python when making dist
6479 #
6480 .PHONY: dist-check-python
6481 dist-check-python:
6482 if !HAVE_PYTHON
6483         @echo "*** python and python-lxml module must be installed and enabled in order to make dist"
6484         @false
6485 endif
6486
6487 dist-check-compat-libs:
6488 if !ENABLE_COMPAT_LIBS
6489         @echo "*** compat-libs must be enabled in order to make dist"
6490         @false
6491 endif
6492
6493 dist: dist-check-python dist-check-compat-libs
6494
6495 # check "broken" platforms limited toolchains for link breakage before we release
6496 .PHONY: linkcheck
6497 linkcheck:
6498         $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
6499
6500 .PHONY: hwdb-update
6501 hwdb-update:
6502         ( cd $(top_srcdir)/hwdb && \
6503         wget -N http://www.linux-usb.org/usb.ids \
6504                 http://pci-ids.ucw.cz/v2.2/pci.ids \
6505                 http://standards.ieee.org/develop/regauth/oui/oui.txt \
6506                 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
6507         ./ids-update.pl )
6508
6509 .PHONY: kdbus-update
6510 kdbus-update:
6511         ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
6512         wget -N https://d-bus.googlecode.com/git/kdbus.h )
6513
6514 .PHONY: git-tag
6515 git-tag:
6516         git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
6517
6518 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6519 .PHONY: upload
6520 upload: all check dist
6521         scp systemd-$(VERSION).tar.xz $(www_target)
6522
6523 .PHONY: doc-sync
6524 doc-sync: all destdir-sphinx
6525         gtkdoc-rebase --html-dir=docs/libudev/html --online
6526         rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
6527         gtkdoc-rebase --html-dir=docs/gudev/html --online
6528         rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
6529         rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6530         rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
6531
6532 .PHONY: gardel
6533 gardel: upload
6534         scp man/*.html gardel:public/systemd-man/
6535
6536 .PHONY: lennart-fedora
6537 lennart-fedora:
6538         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
6539
6540 .PHONY: install-tree
6541 install-tree: all
6542         rm -rf $(abs_srcdir)/install-tree
6543         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6544         tree $(abs_srcdir)/install-tree
6545
6546 # Let's run all tests of the test suite, but under valgrind. Let's
6547 # exclude the one perl script we have in there
6548 .PHONY: valgrind-tests
6549 valgrind-tests: $(TESTS)
6550         $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
6551                 if file $$f | grep -q shell; then \
6552                 echo -e "$${x}Skipping non-binary $$f"; else \
6553                 echo -e "$${x}Running $$f"; \
6554                 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6555                 x="\n\n"; \
6556         done
6557
6558 exported-%: %
6559         $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6560
6561 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6562         $(AM_V_GEN)cat $^ > $@
6563
6564 .PHONY: check-api-docs
6565 check-api-docs: exported man
6566         $(AM_V_GEN)for symbol in `cat exported` ; do \
6567                 if test -f $(builddir)/man/$$symbol.html ; then \
6568                         echo "  Symbol $$symbol() is documented." ; \
6569                 else \
6570                         echo "‣ Symbol $$symbol() lacks documentation." ; \
6571                 fi ; \
6572         done
6573
6574 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6575 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6576
6577 undefined defined: $(ALL_OBJECTS)
6578         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6579                 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6580         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6581
6582 CLEANFILES += \
6583         defined \
6584         undefined
6585
6586 .PHONY: check-api-unused
6587 check-api-unused: defined undefined exported
6588         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6589
6590 .PHONY: check-includes
6591 check-includes: $(top_srcdir)/tools/check-includes.pl
6592         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6593                 | xargs $(top_srcdir)/tools/check-includes.pl
6594
6595 EXTRA_DIST += \
6596         $(top_srcdir)/tools/check-includes.pl
6597
6598 # Stupid test that everything purported to be exported really is
6599 define generate-sym-test
6600         $(AM_V_at)$(MKDIR_P) $(dir $@)
6601         $(AM_V_at)printf '#include <stdio.h>\n' > $@
6602         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6603         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6604         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6605         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6606         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6607         $(AM_V_at)printf 'return 0; }\n' >> $@
6608 endef
6609
6610 test-libsystemd-sym.c: \
6611                 $(top_builddir)/src/libsystemd/libsystemd.sym \
6612                 src/systemd/sd-journal.h \
6613                 src/systemd/sd-daemon.h \
6614                 src/systemd/sd-login.h \
6615                 src/systemd/sd-bus.h \
6616                 src/systemd/sd-utf8.h \
6617                 src/systemd/sd-resolve.h \
6618                 src/systemd/sd-path.h
6619         $(generate-sym-test)
6620
6621 test-libudev-sym.c: \
6622                 src/libudev/libudev.sym \
6623                 src/udev/udev.h
6624         $(generate-sym-test)
6625
6626 test_libsystemd_sym_SOURCES = \
6627         test-libsystemd-sym.c
6628 test_libsystemd_sym_LDADD = \
6629         libsystemd.la
6630
6631 test_libudev_sym_SOURCES = \
6632         test-libudev-sym.c
6633 test_libudev_sym_CFLAGS = \
6634         $(AM_CFLAGS) \
6635         -Wno-deprecated-declarations
6636 test_libudev_sym_LDADD = \
6637         libudev.la
6638
6639 BUILT_SOURCES += \
6640         $(test_libsystemd_sym_SOURCES) \
6641         $(test_libudev_sym_SOURCES)
6642
6643 tests += \
6644         test-libsystemd-sym \
6645         test-libudev-sym
6646
6647 .PHONY: cppcheck
6648 cppcheck:
6649         cppcheck --enable=all -q $(top_srcdir)
6650
6651 # Used to extract compile flags for YCM.
6652 print-%:
6653         @echo $($*)
6654
6655 git-contrib:
6656         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u
6657
6658 EXTRA_DIST += \
6659         tools/gdb-sd_dump_hashmaps.py