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