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