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