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