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