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