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