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