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