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