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