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