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