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