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