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