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