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