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