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