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