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