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