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