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