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