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