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