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