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