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