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