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