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