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