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