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