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