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