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