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