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