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