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