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