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