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