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