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