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