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