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