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