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