chiark / gitweb /
logind: introduce session "positions"
[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_CURRENT=0
63 LIBSYSTEMD_REVISION=0
64 LIBSYSTEMD_AGE=0
65
66 # Dirs of external packages
67 dbuspolicydir=@dbuspolicydir@
68 dbussessionservicedir=@dbussessionservicedir@
69 dbussystemservicedir=@dbussystemservicedir@
70 pamlibdir=@pamlibdir@
71 pamconfdir=@pamconfdir@
72 pkgconfigdatadir=$(datadir)/pkgconfig
73 pkgconfiglibdir=$(libdir)/pkgconfig
74 polkitpolicydir=$(datadir)/polkit-1/actions
75 bashcompletiondir=@bashcompletiondir@
76 zshcompletiondir=@zshcompletiondir@
77 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
78 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
79 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
80 varlogdir=$(localstatedir)/log
81 systemdstatedir=$(localstatedir)/lib/systemd
82 catalogstatedir=$(systemdstatedir)/catalog
83
84 # Our own, non-special dirs
85 pkgsysconfdir=$(sysconfdir)/systemd
86 userunitdir=$(prefix)/lib/systemd/user
87 userpresetdir=$(prefix)/lib/systemd/user-preset
88 tmpfilesdir=$(prefix)/lib/tmpfiles.d
89 sysctldir=$(prefix)/lib/sysctl.d
90 networkdir=$(prefix)/lib/systemd/network
91 pkgincludedir=$(includedir)/systemd
92 systemgeneratordir=$(rootlibexecdir)/system-generators
93 usergeneratordir=$(prefix)/lib/systemd/user-generators
94 systemshutdowndir=$(rootlibexecdir)/system-shutdown
95 systemsleepdir=$(rootlibexecdir)/system-sleep
96 systemunitdir=$(rootprefix)/lib/systemd/system
97 systempresetdir=$(rootprefix)/lib/systemd/system-preset
98 udevlibexecdir=$(rootprefix)/lib/udev
99 udevhomedir=$(udevlibexecdir)
100 udevrulesdir=$(udevlibexecdir)/rules.d
101 udevhwdbdir=$(udevlibexecdir)/hwdb.d
102 catalogdir=$(prefix)/lib/systemd/catalog
103 kernelinstalldir = $(prefix)/lib/kernel/install.d
104
105 # And these are the special ones for /
106 rootprefix=@rootprefix@
107 rootbindir=$(rootprefix)/bin
108 rootlibexecdir=$(rootprefix)/lib/systemd
109
110 CLEANFILES = $(BUILT_SOURCES)
111 DISTCLEANFILES =
112 EXTRA_DIST =
113 BUILT_SOURCES =
114 INSTALL_EXEC_HOOKS =
115 UNINSTALL_EXEC_HOOKS =
116 INSTALL_DATA_HOOKS =
117 UNINSTALL_DATA_HOOKS =
118 DISTCLEAN_LOCAL_HOOKS =
119 CLEAN_LOCAL_HOOKS =
120 pkginclude_HEADERS =
121 noinst_LTLIBRARIES =
122 lib_LTLIBRARIES =
123 include_HEADERS =
124 noinst_DATA =
125 pkgconfiglib_DATA =
126 polkitpolicy_in_in_files =
127 polkitpolicy_in_files =
128 polkitpolicy_files =
129 dist_udevrules_DATA =
130 nodist_udevrules_DATA =
131 dist_pkgsysconf_DATA =
132 dist_pkgdata_DATA =
133 dist_dbuspolicy_DATA =
134 dist_dbussystemservice_DATA =
135 check_PROGRAMS =
136 check_DATA =
137 tests=
138 manual_tests =
139 if ENABLE_TESTS
140 noinst_PROGRAMS = $(manual_tests) $(tests)
141 TESTS = $(tests)
142 else
143 noinst_PROGRAMS =
144 TESTS =
145 endif
146 udevlibexec_PROGRAMS =
147
148 AM_CPPFLAGS = \
149         -include $(top_builddir)/config.h \
150         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
151         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
152         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
153         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
154         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
155         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
156         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
157         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
158         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
159         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
160         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
161         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
162         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
163         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
164         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
165         -DROOTPREFIX=\"$(rootprefix)\" \
166         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
167         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
168         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
169         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
170         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
171         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
172         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
173         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
174         -DX_SERVER=\"$(bindir)/X\" \
175         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
176         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
177         -DQUOTACHECK=\"$(QUOTACHECK)\" \
178         -DKEXEC=\"$(KEXEC)\" \
179         -I $(top_srcdir)/src \
180         -I $(top_builddir)/src/shared \
181         -I $(top_srcdir)/src/shared \
182         -I $(top_srcdir)/src/network \
183         -I $(top_srcdir)/src/login \
184         -I $(top_srcdir)/src/journal \
185         -I $(top_srcdir)/src/systemd \
186         -I $(top_builddir)/src/core \
187         -I $(top_srcdir)/src/core \
188         -I $(top_srcdir)/src/libudev \
189         -I $(top_srcdir)/src/udev \
190         -I $(top_srcdir)/src/udev/net \
191         -I $(top_builddir)/src/udev \
192         -I $(top_srcdir)/src/libsystemd \
193         $(OUR_CPPFLAGS)
194
195 AM_CFLAGS = $(OUR_CFLAGS)
196 AM_LDFLAGS = $(OUR_LDFLAGS)
197
198 # ------------------------------------------------------------------------------
199 define move-to-rootlibdir
200         if test "$(libdir)" != "$(rootlibdir)"; then \
201                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
202                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
203                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
204                 $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
205                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
206         fi
207 endef
208
209 INSTALL_DIRS =
210
211 RUNLEVEL1_TARGET_WANTS =
212 RUNLEVEL2_TARGET_WANTS =
213 RUNLEVEL3_TARGET_WANTS =
214 RUNLEVEL4_TARGET_WANTS =
215 RUNLEVEL5_TARGET_WANTS =
216 SHUTDOWN_TARGET_WANTS =
217 LOCAL_FS_TARGET_WANTS =
218 MULTI_USER_TARGET_WANTS =
219 SYSINIT_TARGET_WANTS =
220 SOCKETS_TARGET_WANTS =
221 BUSNAMES_TARGET_WANTS =
222 TIMERS_TARGET_WANTS =
223 USER_SOCKETS_TARGET_WANTS =
224 USER_BUSNAMES_TARGET_WANTS =
225
226 SYSTEM_UNIT_ALIASES =
227 USER_UNIT_ALIASES =
228
229 GENERAL_ALIASES =
230
231 install-target-wants-hook:
232         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
233         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
234         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
235         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
236         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
237         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
238         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
239         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
240         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
241         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
242         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
243         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
244         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
245         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
246         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
247
248 define add-wants
249         [ -z "$$what" ] || ( \
250           dir=$(DESTDIR)$$dir/$$wants.wants && \
251           $(MKDIR_P) -m 0755 $$dir && \
252           cd $$dir && \
253           rm -f $$what && \
254           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
255 endef
256
257 install-directories-hook:
258         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
259
260 install-aliases-hook:
261         set -- $(SYSTEM_UNIT_ALIASES) && \
262                 dir=$(systemunitdir) && $(install-aliases)
263         set -- $(USER_UNIT_ALIASES) && \
264                 dir=$(userunitdir) && $(install-aliases)
265         set -- $(GENERAL_ALIASES) && \
266                 dir= && $(install-aliases)
267
268 define install-aliases
269         while [ -n "$$1" ]; do \
270                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
271                 rm -f $(DESTDIR)$$dir/$$2 && \
272                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
273                 shift 2 || exit $$?; \
274         done
275 endef
276
277 INSTALL_EXEC_HOOKS += \
278         install-target-wants-hook \
279         install-directories-hook \
280         install-aliases-hook
281
282 # ------------------------------------------------------------------------------
283 AM_V_M4 = $(AM_V_M4_$(V))
284 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
285 AM_V_M4_0 = @echo "  M4      " $@;
286
287 AM_V_XSLT = $(AM_V_XSLT_$(V))
288 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
289 AM_V_XSLT_0 = @echo "  XSLT    " $@;
290
291 AM_V_GPERF = $(AM_V_GPERF_$(V))
292 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
293 AM_V_GPERF_0 = @echo "  GPERF   " $@;
294
295 AM_V_LN = $(AM_V_LN_$(V))
296 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
297 AM_V_LN_0 = @echo "  LN      " $@;
298
299 # ------------------------------------------------------------------------------
300 rootbin_PROGRAMS = \
301         systemctl \
302         systemd-notify \
303         systemd-ask-password \
304         systemd-tty-ask-password-agent \
305         systemd-machine-id-setup
306
307 bin_PROGRAMS = \
308         systemd-cgls \
309         systemd-cgtop \
310         systemd-nspawn \
311         systemd-detect-virt \
312         systemd-delta \
313         systemd-analyze \
314         systemd-run
315
316 dist_bin_SCRIPTS = \
317         src/kernel-install/kernel-install
318
319 dist_kernelinstall_SCRIPTS = \
320         src/kernel-install/50-depmod.install \
321         src/kernel-install/90-loaderentry.install
322
323 rootlibexec_PROGRAMS = \
324         systemd \
325         systemd-cgroups-agent \
326         systemd-initctl \
327         systemd-update-utmp \
328         systemd-shutdownd \
329         systemd-shutdown \
330         systemd-remount-fs \
331         systemd-reply-password \
332         systemd-fsck \
333         systemd-ac-power \
334         systemd-sysctl \
335         systemd-sleep \
336         systemd-bus-proxyd \
337         systemd-socket-proxyd
338
339 systemgenerator_PROGRAMS = \
340         systemd-getty-generator \
341         systemd-fstab-generator \
342         systemd-system-update-generator
343
344 dist_bashcompletion_DATA = \
345         shell-completion/bash/journalctl \
346         shell-completion/bash/systemctl \
347         shell-completion/bash/systemd-analyze \
348         shell-completion/bash/systemd-run \
349         shell-completion/bash/udevadm \
350         shell-completion/bash/kernel-install
351
352 dist_zshcompletion_DATA = \
353         shell-completion/zsh/_systemctl \
354         shell-completion/zsh/_journalctl \
355         shell-completion/zsh/_udevadm \
356         shell-completion/zsh/_kernel-install \
357         shell-completion/zsh/_systemd-nspawn \
358         shell-completion/zsh/_systemd-analyze \
359         shell-completion/zsh/_systemd-run \
360         shell-completion/zsh/_sd_hosts_or_user_at_host \
361         shell-completion/zsh/_systemd-delta \
362         shell-completion/zsh/_systemd
363
364 dist_sysctl_DATA = \
365         sysctl.d/50-default.conf
366
367 dist_systemunit_DATA = \
368         units/graphical.target \
369         units/multi-user.target \
370         units/emergency.service \
371         units/emergency.target \
372         units/sysinit.target \
373         units/basic.target \
374         units/getty.target \
375         units/halt.target \
376         units/kexec.target \
377         units/local-fs.target \
378         units/local-fs-pre.target \
379         units/initrd.target \
380         units/initrd-fs.target \
381         units/initrd-root-fs.target \
382         units/remote-fs.target \
383         units/remote-fs-pre.target \
384         units/network.target \
385         units/network-online.target \
386         units/nss-lookup.target \
387         units/nss-user-lookup.target \
388         units/hibernate.target \
389         units/hybrid-sleep.target \
390         units/poweroff.target \
391         units/reboot.target \
392         units/rescue.target \
393         units/rpcbind.target \
394         units/time-sync.target \
395         units/shutdown.target \
396         units/final.target \
397         units/umount.target \
398         units/sigpwr.target \
399         units/sleep.target \
400         units/sockets.target \
401         units/busnames.target \
402         units/timers.target \
403         units/paths.target \
404         units/suspend.target \
405         units/swap.target \
406         units/slices.target \
407         units/system.slice \
408         units/x-.slice \
409         units/systemd-initctl.socket \
410         units/systemd-shutdownd.socket \
411         units/syslog.socket \
412         units/dev-hugepages.mount \
413         units/dev-mqueue.mount \
414         units/sys-kernel-config.mount \
415         units/sys-kernel-debug.mount \
416         units/sys-fs-fuse-connections.mount \
417         units/tmp.mount \
418         units/printer.target \
419         units/sound.target \
420         units/bluetooth.target \
421         units/smartcard.target \
422         units/systemd-ask-password-wall.path \
423         units/systemd-ask-password-console.path \
424         units/systemd-udevd-control.socket \
425         units/systemd-udevd-kernel.socket \
426         units/system-update.target \
427         units/initrd-switch-root.target
428
429 nodist_systemunit_DATA = \
430         units/getty@.service \
431         units/serial-getty@.service \
432         units/console-shell.service \
433         units/console-getty.service \
434         units/container-getty@.service \
435         units/systemd-initctl.service \
436         units/systemd-shutdownd.service \
437         units/systemd-remount-fs.service \
438         units/systemd-update-utmp.service \
439         units/systemd-update-utmp-runlevel.service \
440         units/systemd-ask-password-wall.service \
441         units/systemd-ask-password-console.service \
442         units/systemd-sysctl.service \
443         units/emergency.service \
444         units/rescue.service \
445         units/user@.service \
446         units/systemd-hibernate.service \
447         units/systemd-hybrid-sleep.service \
448         units/systemd-suspend.service \
449         units/systemd-halt.service \
450         units/systemd-poweroff.service \
451         units/systemd-reboot.service \
452         units/systemd-kexec.service \
453         units/systemd-fsck@.service \
454         units/systemd-fsck-root.service \
455         units/systemd-udevd.service \
456         units/systemd-udev-trigger.service \
457         units/systemd-udev-settle.service \
458         units/debug-shell.service \
459         units/initrd-parse-etc.service \
460         units/initrd-cleanup.service \
461         units/initrd-udevadm-cleanup-db.service \
462         units/initrd-switch-root.service \
463         units/systemd-nspawn@.service
464
465 dist_userunit_DATA = \
466         units/user/basic.target \
467         units/user/default.target \
468         units/user/exit.target
469
470 nodist_userunit_DATA = \
471         units/user/systemd-exit.service
472
473 EXTRA_DIST += \
474         units/getty@.service.m4 \
475         units/serial-getty@.service.m4 \
476         units/console-shell.service.m4.in \
477         units/console-getty.service.m4.in \
478         units/container-getty@.service.m4.in \
479         units/rescue.service.m4.in \
480         units/systemd-initctl.service.in \
481         units/systemd-shutdownd.service.in \
482         units/systemd-remount-fs.service.in \
483         units/systemd-update-utmp.service.in \
484         units/systemd-update-utmp-runlevel.service.in \
485         units/systemd-ask-password-wall.service.in \
486         units/systemd-ask-password-console.service.in \
487         units/systemd-sysctl.service.in \
488         units/emergency.service.in \
489         units/systemd-halt.service.in \
490         units/systemd-poweroff.service.in \
491         units/systemd-reboot.service.in \
492         units/systemd-kexec.service.in \
493         units/user/systemd-exit.service.in \
494         units/systemd-fsck@.service.in \
495         units/systemd-fsck-root.service.in \
496         units/user@.service.in \
497         units/systemd-udevd.service \
498         units/systemd-udev-trigger.service \
499         units/systemd-udev-settle.service \
500         units/debug-shell.service.in \
501         units/systemd-hibernate.service.in \
502         units/systemd-hybrid-sleep.service.in \
503         units/systemd-suspend.service.in \
504         units/quotaon.service.in \
505         units/initrd-parse-etc.service.in \
506         units/initrd-cleanup.service.in \
507         units/initrd-udevadm-cleanup-db.service.in \
508         units/initrd-switch-root.service.in \
509         units/systemd-nspawn@.service.in
510
511 CLEANFILES += \
512         units/console-shell.service.m4 \
513         units/console-getty.service.m4 \
514         units/container-getty@.service.m4 \
515         units/rescue.service.m4 \
516         units/user@.service.m4
517
518 if HAVE_SYSV_COMPAT
519 nodist_systemunit_DATA += \
520         units/rc-local.service \
521         units/halt-local.service
522
523 systemgenerator_PROGRAMS += \
524         systemd-rc-local-generator
525 endif
526
527 EXTRA_DIST += \
528         units/rc-local.service.in \
529         units/halt-local.service.in
530
531 # automake is broken and can't handle files with a dash in front
532 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
533 units-install-hook:
534         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
535
536 units-uninstall-hook:
537         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
538
539 INSTALL_DATA_HOOKS += units-install-hook
540 UNINSTALL_DATA_HOOKS += units-uninstall-hook
541
542 dist_doc_DATA = \
543         README \
544         NEWS \
545         LICENSE.LGPL2.1 \
546         LICENSE.GPL2 \
547         LICENSE.MIT \
548         DISTRO_PORTING
549
550 @INTLTOOL_POLICY_RULE@
551
552 # ------------------------------------------------------------------------------
553
554 MANPAGES =
555 MANPAGES_ALIAS =
556
557 include Makefile-man.am
558
559 .PHONY: man
560 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
561
562 XML_FILES = \
563         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
564 HTML_FILES = \
565         ${XML_FILES:.xml=.html}
566 HTML_ALIAS = \
567         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
568
569 if ENABLE_MANPAGES
570 man_MANS = \
571         $(MANPAGES) \
572         $(MANPAGES_ALIAS)
573
574 noinst_DATA += \
575         $(HTML_FILES) \
576         $(HTML_ALIAS)
577
578 CLEANFILES += \
579         $(man_MANS) \
580         $(HTML_FILES) \
581         $(HTML_ALIAS)
582
583 docs/html/man:
584         $(AM_V_at)$(MKDIR_P) $(dir $@)
585         $(AM_V_LN)$(LN_S) -f ../../man $@
586
587 noinst_DATA += \
588         docs/html/man
589
590 CLEANFILES += \
591         docs/html/man
592
593 if HAVE_PYTHON
594 man/index.html: man/systemd.index.html
595         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
596
597 noinst_DATA += \
598         man/index.html
599
600 CLEANFILES += \
601         man/index.html
602
603 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
604 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
605 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
606
607 update-man-list: make-man-rules.py $(XML_GLOB)
608         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
609         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
610         @echo "Makefile-man.am has been regenerated"
611
612 man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
613         $(AM_V_at)$(MKDIR_P) $(dir $@)
614         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
615
616 man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
617         $(AM_V_at)$(MKDIR_P) $(dir $@)
618         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
619
620 EXTRA_DIST += \
621         man/systemd.index.xml \
622         man/index.html \
623         man/systemd.directives.xml
624
625 CLEANFILES += \
626         man/systemd.index.xml \
627         man/systemd.directives.xml
628
629 endif
630
631 endif
632
633 EXTRA_DIST += \
634         $(XML_FILES) \
635         $(HTML_FILES) \
636         $(HTML_ALIAS) \
637         $(man_MANS) \
638         make-man-index.py \
639         make-directive-index.py \
640         xml_helper.py
641
642 # ------------------------------------------------------------------------------
643 noinst_LTLIBRARIES += \
644         libsystemd-shared.la
645
646 libsystemd_shared_la_SOURCES = \
647         src/shared/linux/auto_dev-ioctl.h \
648         src/shared/linux/fanotify.h \
649         src/shared/linux/seccomp.h \
650         src/shared/linux/seccomp-bpf.h \
651         src/shared/ioprio.h \
652         src/shared/missing.h \
653         src/shared/initreq.h \
654         src/shared/securebits.h \
655         src/shared/special.h \
656         src/shared/list.h \
657         src/shared/macro.h \
658         src/shared/def.h \
659         src/shared/sparse-endian.h \
660         src/shared/refcnt.h \
661         src/shared/udev-util.h \
662         src/shared/bus-errors.h \
663         src/shared/device-nodes.c \
664         src/shared/device-nodes.h \
665         src/shared/util.c \
666         src/shared/util.h \
667         src/shared/virt.c \
668         src/shared/virt.h \
669         src/shared/efivars.c \
670         src/shared/efivars.h \
671         src/shared/path-util.c \
672         src/shared/path-util.h \
673         src/shared/time-util.c \
674         src/shared/time-util.h \
675         src/shared/hashmap.c \
676         src/shared/hashmap.h \
677         src/shared/siphash24.c \
678         src/shared/siphash24.h \
679         src/shared/set.c \
680         src/shared/set.h \
681         src/shared/fdset.c \
682         src/shared/fdset.h \
683         src/shared/prioq.c \
684         src/shared/prioq.h \
685         src/shared/sleep-config.c \
686         src/shared/sleep-config.h \
687         src/shared/strv.c \
688         src/shared/strv.h \
689         src/shared/env-util.c \
690         src/shared/env-util.h \
691         src/shared/strbuf.c \
692         src/shared/strbuf.h \
693         src/shared/strxcpyx.c \
694         src/shared/strxcpyx.h \
695         src/shared/conf-parser.c \
696         src/shared/conf-parser.h \
697         src/shared/log.c \
698         src/shared/log.h \
699         src/shared/ratelimit.h \
700         src/shared/ratelimit.c \
701         src/shared/exit-status.c \
702         src/shared/exit-status.h \
703         src/shared/utf8.c \
704         src/shared/utf8.h \
705         src/shared/gunicode.c \
706         src/shared/gunicode.h \
707         src/shared/pager.c \
708         src/shared/pager.h \
709         src/shared/socket-util.c \
710         src/shared/socket-util.h \
711         src/shared/conf-files.c \
712         src/shared/conf-files.h \
713         src/shared/cgroup-util.c \
714         src/shared/cgroup-util.h \
715         src/shared/cgroup-show.c \
716         src/shared/cgroup-show.h \
717         src/shared/unit-name.c \
718         src/shared/unit-name.h \
719         src/shared/utmp-wtmp.c \
720         src/shared/utmp-wtmp.h \
721         src/shared/watchdog.c \
722         src/shared/watchdog.h \
723         src/shared/spawn-ask-password-agent.c \
724         src/shared/spawn-ask-password-agent.h \
725         src/shared/replace-var.c \
726         src/shared/replace-var.h \
727         src/shared/spawn-polkit-agent.c \
728         src/shared/spawn-polkit-agent.h \
729         src/shared/hwclock.c \
730         src/shared/hwclock.h \
731         src/shared/time-dst.c \
732         src/shared/time-dst.h \
733         src/shared/calendarspec.c \
734         src/shared/calendarspec.h \
735         src/shared/fileio.c \
736         src/shared/fileio.h \
737         src/shared/output-mode.h \
738         src/shared/MurmurHash2.c \
739         src/shared/MurmurHash2.h \
740         src/shared/acpi-fpdt.h \
741         src/shared/acpi-fpdt.c \
742         src/shared/boot-timestamps.h \
743         src/shared/boot-timestamps.c \
744         src/shared/mkdir.c \
745         src/shared/mkdir.h \
746         src/shared/smack-util.c \
747         src/shared/smack-util.h \
748         src/shared/apparmor-util.c \
749         src/shared/apparmor-util.h \
750         src/shared/ima-util.c \
751         src/shared/ima-util.h \
752         src/shared/ptyfwd.c \
753         src/shared/ptyfwd.h \
754         src/shared/net-util.c \
755         src/shared/net-util.h \
756         src/shared/errno-list.c \
757         src/shared/errno-list.h \
758         src/shared/syscall-list.c \
759         src/shared/syscall-list.h \
760         src/shared/audit.c \
761         src/shared/audit.h \
762         src/shared/xml.c \
763         src/shared/xml.h
764
765 nodist_libsystemd_shared_la_SOURCES = \
766         src/shared/errno-from-name.h \
767         src/shared/errno-to-name.h \
768         src/shared/syscall-from-name.h \
769         src/shared/syscall-to-name.h
770
771 # ------------------------------------------------------------------------------
772 noinst_LTLIBRARIES += \
773         libsystemd-units.la
774
775 libsystemd_units_la_SOURCES = \
776         src/shared/install.c \
777         src/shared/install.h \
778         src/shared/install-printf.c \
779         src/shared/install-printf.h \
780         src/shared/path-lookup.c \
781         src/shared/path-lookup.h \
782         src/shared/specifier.c \
783         src/shared/specifier.h
784
785 # ------------------------------------------------------------------------------
786 noinst_LTLIBRARIES += \
787         libsystemd-label.la
788
789 libsystemd_label_la_SOURCES = \
790         src/shared/socket-label.c \
791         src/shared/label.c \
792         src/shared/label.h \
793         src/shared/selinux-util.c \
794         src/shared/selinux-util.h \
795         src/shared/mkdir-label.c \
796         src/shared/ask-password-api.c \
797         src/shared/ask-password-api.h \
798         src/shared/fileio-label.c \
799         src/shared/fileio-label.h \
800         src/shared/dev-setup.c \
801         src/shared/dev-setup.h
802
803 libsystemd_label_la_CFLAGS = \
804         $(AM_CFLAGS) \
805         $(SELINUX_CFLAGS)
806
807 libsystemd_label_la_LIBADD = \
808         $(SELINUX_LIBS)
809
810 # ------------------------------------------------------------------------------
811 noinst_LTLIBRARIES += \
812         libsystemd-logs.la
813
814 libsystemd_logs_la_SOURCES = \
815         src/shared/logs-show.c \
816         src/shared/logs-show.h
817
818 # ------------------------------------------------------------------------------
819 noinst_LTLIBRARIES += \
820         libsystemd-capability.la
821
822 libsystemd_capability_la_SOURCES = \
823         src/shared/capability.c \
824         src/shared/capability.h
825
826 libsystemd_capability_la_CFLAGS = \
827         $(AM_CFLAGS) \
828         $(CAP_CFLAGS)
829
830 libsystemd_capability_la_LIBADD = \
831         $(CAP_LIBS)
832
833 # ------------------------------------------------------------------------------
834 if HAVE_ACL
835 noinst_LTLIBRARIES += \
836         libsystemd-acl.la
837
838 libsystemd_acl_la_SOURCES = \
839         src/shared/acl-util.c \
840         src/shared/acl-util.h
841
842 libsystemd_acl_la_CFLAGS = \
843         $(AM_CFLAGS) \
844         $(ACL_CFLAGS)
845
846 libsystemd_acl_la_LIBADD = \
847         $(ACL_LIBS)
848 endif
849
850 # ------------------------------------------------------------------------------
851 noinst_LTLIBRARIES += \
852         libsystemd-core.la
853
854 libsystemd_core_la_SOURCES = \
855         src/core/unit.c \
856         src/core/unit.h \
857         src/core/unit-printf.c \
858         src/core/unit-printf.h \
859         src/core/job.c \
860         src/core/job.h \
861         src/core/manager.c \
862         src/core/manager.h \
863         src/core/transaction.c \
864         src/core/transaction.h \
865         src/core/load-fragment.c \
866         src/core/load-fragment.h \
867         src/core/service.c \
868         src/core/service.h \
869         src/core/socket.c \
870         src/core/socket.h \
871         src/core/busname.c \
872         src/core/busname.h \
873         src/core/target.c \
874         src/core/target.h \
875         src/core/snapshot.c \
876         src/core/snapshot.h \
877         src/core/device.c \
878         src/core/device.h \
879         src/core/mount.c \
880         src/core/mount.h \
881         src/core/automount.c \
882         src/core/automount.h \
883         src/core/swap.c \
884         src/core/swap.h \
885         src/core/timer.c \
886         src/core/timer.h \
887         src/core/path.c \
888         src/core/path.h \
889         src/core/slice.c \
890         src/core/slice.h \
891         src/core/scope.c \
892         src/core/scope.h \
893         src/core/load-dropin.c \
894         src/core/load-dropin.h \
895         src/core/execute.c \
896         src/core/execute.h \
897         src/core/kill.c \
898         src/core/kill.h \
899         src/core/dbus.c \
900         src/core/dbus.h \
901         src/core/dbus-manager.c \
902         src/core/dbus-manager.h \
903         src/core/dbus-unit.c \
904         src/core/dbus-unit.h \
905         src/core/dbus-job.c \
906         src/core/dbus-job.h \
907         src/core/dbus-service.c \
908         src/core/dbus-service.h \
909         src/core/dbus-socket.c \
910         src/core/dbus-socket.h \
911         src/core/dbus-busname.c \
912         src/core/dbus-busname.h \
913         src/core/dbus-target.c \
914         src/core/dbus-target.h \
915         src/core/dbus-snapshot.c \
916         src/core/dbus-snapshot.h \
917         src/core/dbus-device.c \
918         src/core/dbus-device.h \
919         src/core/dbus-mount.c \
920         src/core/dbus-mount.h \
921         src/core/dbus-automount.c \
922         src/core/dbus-automount.h \
923         src/core/dbus-swap.c \
924         src/core/dbus-swap.h \
925         src/core/dbus-timer.c \
926         src/core/dbus-timer.h \
927         src/core/dbus-path.c \
928         src/core/dbus-path.h \
929         src/core/dbus-slice.c \
930         src/core/dbus-slice.h \
931         src/core/dbus-scope.c \
932         src/core/dbus-scope.h \
933         src/core/dbus-execute.c \
934         src/core/dbus-execute.h \
935         src/core/dbus-kill.c \
936         src/core/dbus-kill.h \
937         src/core/dbus-cgroup.c \
938         src/core/dbus-cgroup.h \
939         src/core/dbus-client-track.c \
940         src/core/dbus-client-track.h \
941         src/core/cgroup.c \
942         src/core/cgroup.h \
943         src/core/selinux-access.c \
944         src/core/selinux-access.h \
945         src/core/selinux-setup.c \
946         src/core/selinux-setup.h \
947         src/core/smack-setup.c \
948         src/core/smack-setup.h \
949         src/core/ima-setup.c \
950         src/core/ima-setup.h \
951         src/core/locale-setup.h \
952         src/core/locale-setup.c \
953         src/core/hostname-setup.c \
954         src/core/hostname-setup.h \
955         src/core/machine-id-setup.c \
956         src/core/machine-id-setup.h \
957         src/core/mount-setup.c \
958         src/core/mount-setup.h \
959         src/core/loopback-setup.h \
960         src/core/loopback-setup.c \
961         src/core/condition.c \
962         src/core/condition.h \
963         src/core/namespace.c \
964         src/core/namespace.h \
965         src/core/tcpwrap.c \
966         src/core/tcpwrap.h \
967         src/core/build.h \
968         src/core/sysfs-show.h \
969         src/core/switch-root.h \
970         src/core/switch-root.c \
971         src/core/killall.h \
972         src/core/killall.c \
973         src/core/audit-fd.c \
974         src/core/audit-fd.h \
975         src/core/async.c \
976         src/core/async.h
977
978 if HAVE_KMOD
979 libsystemd_core_la_SOURCES += \
980         src/core/kmod-setup.c \
981         src/core/kmod-setup.h
982 endif
983
984 nodist_libsystemd_core_la_SOURCES = \
985         src/core/load-fragment-gperf.c \
986         src/core/load-fragment-gperf-nulstr.c
987
988 libsystemd_core_la_CFLAGS = \
989         $(AM_CFLAGS) \
990         $(LIBWRAP_CFLAGS) \
991         $(PAM_CFLAGS) \
992         $(AUDIT_CFLAGS) \
993         $(KMOD_CFLAGS) \
994         -pthread
995
996 libsystemd_core_la_LIBADD = \
997         libsystemd-capability.la \
998         libsystemd-units.la \
999         libsystemd-label.la \
1000         libsystemd-id128-internal.la \
1001         libsystemd-daemon-internal.la \
1002         libudev-internal.la \
1003         libsystemd-shared.la \
1004         libsystemd-internal.la \
1005         $(LIBWRAP_LIBS) \
1006         $(PAM_LIBS) \
1007         $(AUDIT_LIBS) \
1008         $(CAP_LIBS) \
1009         $(KMOD_LIBS)
1010
1011 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1012         $(AM_V_at)$(MKDIR_P) $(dir $@)
1013         $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
1014
1015 EXTRA_DIST += \
1016         src/core/load-fragment-gperf.gperf.m4
1017
1018 CLEANFILES += \
1019         src/core/load-fragment-gperf.gperf \
1020         src/core/load-fragment-gperf.c \
1021         src/core/load-fragment-gperf-nulstr.c \
1022         src/shared/syscall-list.txt \
1023         src/shared/syscall-from-name.gperf \
1024         src/shared/errno-list.txt \
1025         src/shared/errno-from-name.gperf
1026
1027 BUILT_SOURCES += \
1028         src/shared/syscall-from-name.h \
1029         src/shared/syscall-to-name.h \
1030         src/shared/errno-from-name.h \
1031         src/shared/errno-to-name.h
1032
1033 src/shared/syscall-list.txt:
1034         $(AM_V_at)$(MKDIR_P) $(dir $@)
1035         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
1036
1037 src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt
1038         $(AM_V_at)$(MKDIR_P) $(dir $@)
1039         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
1040
1041 src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf
1042         $(AM_V_at)$(MKDIR_P) $(dir $@)
1043         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
1044
1045 src/shared/syscall-to-name.h: src/shared/syscall-list.txt
1046         $(AM_V_at)$(MKDIR_P) $(dir $@)
1047         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1048
1049 src/shared/errno-list.txt:
1050         $(AM_V_at)$(MKDIR_P) $(dir $@)
1051         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
1052
1053 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1054         $(AM_V_at)$(MKDIR_P) $(dir $@)
1055         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1056
1057 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1058         $(AM_V_at)$(MKDIR_P) $(dir $@)
1059         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1060
1061 src/shared/errno-to-name.h: src/shared/errno-list.txt
1062         $(AM_V_at)$(MKDIR_P) $(dir $@)
1063         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1064
1065 # ------------------------------------------------------------------------------
1066 systemd_SOURCES = \
1067         src/core/main.c
1068
1069 systemd_LDADD = \
1070         libsystemd-core.la \
1071         $(RT_LIBS)
1072
1073 dist_pkgsysconf_DATA += \
1074         src/core/system.conf \
1075         src/core/user.conf
1076
1077 dist_dbuspolicy_DATA += \
1078         src/core/org.freedesktop.systemd1.conf
1079
1080 dist_dbussystemservice_DATA += \
1081         src/core/org.freedesktop.systemd1.service
1082
1083 polkitpolicy_in_in_files += \
1084         src/core/org.freedesktop.systemd1.policy.in.in
1085
1086 pkgconfigdata_DATA = \
1087         src/core/systemd.pc
1088
1089 nodist_rpmmacros_DATA = \
1090         src/core/macros.systemd
1091
1092 EXTRA_DIST += \
1093         src/core/systemd.pc.in \
1094         src/core/macros.systemd.in
1095
1096 CLEANFILES += \
1097         src/core/macros.systemd \
1098         src/core/org.freedesktop.systemd1.policy.in
1099
1100 # ------------------------------------------------------------------------------
1101 manual_tests += \
1102         test-engine \
1103         test-ns \
1104         test-loopback \
1105         test-hostname \
1106         test-daemon \
1107         test-cgroup \
1108         test-install \
1109         test-watchdog \
1110         test-log
1111
1112 tests += \
1113         test-job-type \
1114         test-env-replace \
1115         test-strbuf \
1116         test-strv \
1117         test-path-util \
1118         test-strxcpyx \
1119         test-unit-name \
1120         test-unit-file \
1121         test-utf8 \
1122         test-ellipsize \
1123         test-util \
1124         test-namespace \
1125         test-date \
1126         test-sleep \
1127         test-replace-var \
1128         test-sched-prio \
1129         test-calendarspec \
1130         test-strip-tab-ansi \
1131         test-cgroup-util \
1132         test-cgroup-mask \
1133         test-prioq \
1134         test-fileio \
1135         test-time \
1136         test-hashmap \
1137         test-list \
1138         test-tables \
1139         test-device-nodes \
1140         test-xml
1141
1142 EXTRA_DIST += \
1143         test/sched_idle_bad.service \
1144         test/sched_idle_ok.service \
1145         test/sched_rr_bad.service \
1146         test/sched_rr_ok.service \
1147         test/sched_rr_change.service \
1148         test/son.service \
1149         test/daughter.service \
1150         test/parent.slice
1151
1152 EXTRA_DIST += \
1153         src/test/test-helper.h
1154
1155 test_device_nodes_SOURCES = \
1156         src/test/test-device-nodes.c
1157
1158 test_device_nodes_LDADD = \
1159         libsystemd-shared.la
1160
1161 test_engine_SOURCES = \
1162         src/test/test-engine.c
1163
1164 test_engine_LDADD = \
1165         libsystemd-core.la \
1166         $(RT_LIBS)
1167
1168 test_job_type_SOURCES = \
1169         src/test/test-job-type.c
1170
1171 test_job_type_LDADD = \
1172         libsystemd-core.la \
1173         $(RT_LIBS)
1174
1175 test_ns_SOURCES = \
1176         src/test/test-ns.c
1177
1178 test_ns_LDADD = \
1179         libsystemd-core.la
1180
1181 test_loopback_SOURCES = \
1182         src/test/test-loopback.c
1183
1184 test_loopback_LDADD = \
1185         libsystemd-core.la
1186
1187 test_hostname_SOURCES = \
1188         src/test/test-hostname.c
1189
1190 test_hostname_LDADD = \
1191         libsystemd-core.la
1192
1193 if ENABLE_EFI
1194 manual_tests += \
1195         test-boot-timestamp
1196
1197 test_boot_timestamp_SOURCES = \
1198         src/test/test-boot-timestamps.c
1199
1200 test_boot_timestamp_LDADD = \
1201         libsystemd-shared.la
1202 endif
1203
1204 test_unit_name_SOURCES = \
1205         src/test/test-unit-name.c
1206
1207 test_unit_name_LDADD = \
1208         libsystemd-core.la \
1209         $(RT_LIBS)
1210
1211 test_unit_file_SOURCES = \
1212         src/test/test-unit-file.c
1213
1214 test_unit_file_LDADD = \
1215         libsystemd-core.la \
1216         $(RT_LIBS)
1217
1218 test_utf8_SOURCES = \
1219         src/test/test-utf8.c
1220
1221 test_utf8_LDADD = \
1222         libsystemd-shared.la
1223
1224 test_util_SOURCES = \
1225         src/test/test-util.c
1226
1227 test_util_LDADD = \
1228         libsystemd-core.la
1229
1230 test_namespace_SOURCES = \
1231         src/test/test-namespace.c
1232
1233 test_namespace_LDADD = \
1234         libsystemd-core.la
1235
1236 test_hashmap_SOURCES = \
1237         src/test/test-hashmap.c
1238
1239 test_hashmap_LDADD = \
1240         libsystemd-core.la
1241
1242 test_xml_SOURCES = \
1243         src/test/test-xml.c
1244
1245 test_xml_LDADD = \
1246         libsystemd-shared.la
1247
1248 test_list_SOURCES = \
1249         src/test/test-list.c
1250
1251 test_list_LDADD = \
1252         libsystemd-core.la
1253
1254 test_tables_SOURCES = \
1255         src/test/test-tables.c \
1256         src/shared/test-tables.h
1257
1258 test_tables_LDADD = \
1259         libsystemd-logs.la \
1260         libsystemd-journal-internal.la \
1261         libsystemd-core.la \
1262         $(RT_LIBS)
1263
1264 test_prioq_SOURCES = \
1265         src/test/test-prioq.c
1266
1267 test_prioq_LDADD = \
1268         libsystemd-core.la
1269
1270 test_fileio_SOURCES = \
1271         src/test/test-fileio.c
1272
1273 test_fileio_LDADD = \
1274         libsystemd-core.la
1275
1276 test_time_SOURCES = \
1277         src/test/test-time.c
1278
1279 test_time_LDADD = \
1280         libsystemd-core.la
1281
1282 test_log_SOURCES = \
1283         src/test/test-log.c
1284
1285 test_log_LDADD = \
1286         libsystemd-core.la
1287
1288 test_ellipsize_SOURCES = \
1289         src/test/test-ellipsize.c
1290
1291 test_ellipsize_LDADD = \
1292         libsystemd-core.la
1293
1294 test_date_SOURCES = \
1295         src/test/test-date.c
1296
1297 test_date_LDADD = \
1298         libsystemd-core.la
1299
1300 test_sleep_SOURCES = \
1301         src/test/test-sleep.c
1302
1303 test_sleep_LDADD = \
1304         libsystemd-core.la
1305
1306 test_replace_var_SOURCES = \
1307         src/test/test-replace-var.c
1308
1309 test_replace_var_LDADD = \
1310         libsystemd-shared.la
1311
1312 test_calendarspec_SOURCES = \
1313         src/test/test-calendarspec.c
1314
1315 test_calendarspec_LDADD = \
1316         libsystemd-shared.la
1317
1318 test_strip_tab_ansi_SOURCES = \
1319         src/test/test-strip-tab-ansi.c
1320
1321 test_strip_tab_ansi_LDADD = \
1322         libsystemd-shared.la
1323
1324 test_daemon_SOURCES = \
1325         src/test/test-daemon.c
1326
1327 test_daemon_LDADD = \
1328         libsystemd-daemon-internal.la \
1329         libsystemd-shared.la
1330
1331 test_cgroup_SOURCES = \
1332         src/test/test-cgroup.c
1333
1334 test_cgroup_LDADD = \
1335         libsystemd-label.la \
1336         libsystemd-shared.la
1337
1338 test_cgroup_mask_SOURCES = \
1339         src/test/test-cgroup-mask.c
1340
1341 test_cgroup_mask_CPPFLAGS = \
1342         $(AM_CPPFLAGS) \
1343         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1344
1345 test_cgroup_mask_LDADD = \
1346         libsystemd-core.la \
1347         $(RT_LIBS)
1348
1349 test_cgroup_util_SOURCES = \
1350         src/test/test-cgroup-util.c
1351
1352 test_cgroup_util_LDADD = \
1353         libsystemd-label.la \
1354         libsystemd-daemon-internal.la \
1355         libsystemd-shared.la
1356
1357 test_env_replace_SOURCES = \
1358         src/test/test-env-replace.c
1359
1360 test_env_replace_LDADD = \
1361         libsystemd-shared.la
1362
1363 test_strbuf_SOURCES = \
1364         src/test/test-strbuf.c
1365
1366 test_strbuf_LDADD = \
1367         libsystemd-shared.la
1368
1369 test_strv_SOURCES = \
1370         src/test/test-strv.c
1371
1372 test_strv_LDADD = \
1373         libsystemd-units.la \
1374         libsystemd-id128-internal.la \
1375         libsystemd-shared.la
1376
1377 test_path_util_SOURCES = \
1378         src/test/test-path-util.c
1379
1380 test_path_util_LDADD = \
1381         libsystemd-shared.la
1382
1383 test_strxcpyx_SOURCES = \
1384         src/test/test-strxcpyx.c
1385
1386 test_strxcpyx_LDADD = \
1387         libsystemd-shared.la
1388
1389 test_install_SOURCES = \
1390         src/test/test-install.c
1391
1392 test_install_LDADD = \
1393         libsystemd-units.la \
1394         libsystemd-label.la \
1395         libsystemd-id128-internal.la \
1396         libsystemd-shared.la
1397
1398 test_watchdog_SOURCES = \
1399         src/test/test-watchdog.c
1400
1401 test_watchdog_LDADD = \
1402         libsystemd-shared.la
1403
1404 test_sched_prio_SOURCES = \
1405         src/test/test-sched-prio.c
1406
1407 test_sched_prio_CPPFLAGS = \
1408         $(AM_CPPFLAGS) \
1409         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1410
1411 test_sched_prio_LDADD = \
1412         libsystemd-core.la \
1413         $(RT_LIBS)
1414
1415 # ------------------------------------------------------------------------------
1416 ## .PHONY so it always rebuilds it
1417 .PHONY: coverage lcov-run lcov-report
1418
1419 # run lcov from scratch, always
1420 coverage:
1421         $(MAKE) lcov-run
1422         $(MAKE) lcov-report
1423
1424 coverage_dir = coverage
1425 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1426
1427 if ENABLE_COVERAGE
1428 # reset run coverage tests
1429 lcov-run:
1430         @rm -rf $(coverage_dir)
1431         lcov $(coverage_opts) --zerocounters
1432         -$(MAKE) check
1433
1434 # generate report based on current coverage data
1435 lcov-report:
1436         $(MKDIR_P) $(coverage_dir)
1437         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1438                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1439         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1440         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1441
1442 # lcov doesn't work properly with vpath builds, make sure that bad
1443 # output is not uploaded by mistake.
1444 coverage-sync: coverage
1445         test "$(builddir)" = "$(srcdir)"
1446         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1447
1448 else
1449 lcov-run lcov-report:
1450         echo "Need to reconfigure with --enable-coverage"
1451 endif
1452
1453 # ------------------------------------------------------------------------------
1454 systemd_analyze_SOURCES = \
1455         src/analyze/analyze.c
1456
1457 systemd_analyze_LDADD = \
1458         libsystemd-internal.la \
1459         libsystemd-id128-internal.la \
1460         libsystemd-daemon-internal.la \
1461         libsystemd-shared.la
1462
1463 # ------------------------------------------------------------------------------
1464 systemd_initctl_SOURCES = \
1465         src/initctl/initctl.c
1466
1467 systemd_initctl_LDADD = \
1468         libsystemd-internal.la \
1469         libsystemd-id128-internal.la \
1470         libsystemd-daemon-internal.la \
1471         libsystemd-shared.la
1472
1473 # ------------------------------------------------------------------------------
1474 systemd_update_utmp_SOURCES = \
1475         src/update-utmp/update-utmp.c
1476
1477 systemd_update_utmp_CFLAGS = \
1478         $(AM_CFLAGS) \
1479         $(AUDIT_CFLAGS)
1480
1481 systemd_update_utmp_LDADD = \
1482         libsystemd-internal.la \
1483         libsystemd-id128-internal.la \
1484         libsystemd-daemon-internal.la \
1485         libsystemd-shared.la \
1486         $(AUDIT_LIBS)
1487
1488 # ------------------------------------------------------------------------------
1489 systemd_shutdownd_SOURCES = \
1490         src/shutdownd/shutdownd.c
1491
1492 systemd_shutdownd_LDADD = \
1493         libsystemd-label.la \
1494         libsystemd-daemon-internal.la \
1495         libsystemd-shared.la
1496
1497 dist_doc_DATA += \
1498         src/systemd/sd-shutdown.h
1499
1500 # ------------------------------------------------------------------------------
1501 systemd_shutdown_SOURCES = \
1502         src/core/umount.c \
1503         src/core/umount.h \
1504         src/core/shutdown.c \
1505         src/core/mount-setup.c \
1506         src/core/mount-setup.h \
1507         src/core/killall.h \
1508         src/core/killall.c
1509
1510 systemd_shutdown_LDADD = \
1511         libsystemd-label.la \
1512         libudev-internal.la \
1513         libsystemd-shared.la
1514
1515 # ------------------------------------------------------------------------------
1516 if HAVE_KMOD
1517 systemd_modules_load_SOURCES = \
1518         src/modules-load/modules-load.c
1519
1520 systemd_modules_load_CFLAGS = \
1521         $(AM_CFLAGS) \
1522         $(KMOD_CFLAGS)
1523
1524 systemd_modules_load_LDADD = \
1525         libsystemd-shared.la \
1526         $(KMOD_LIBS)
1527
1528 rootlibexec_PROGRAMS += \
1529         systemd-modules-load
1530
1531 nodist_systemunit_DATA += \
1532         units/systemd-modules-load.service
1533
1534 SYSINIT_TARGET_WANTS += \
1535         systemd-modules-load.service
1536
1537 if ENABLE_TMPFILES
1538 nodist_systemunit_DATA += \
1539         units/kmod-static-nodes.service
1540
1541 SYSINIT_TARGET_WANTS += \
1542         kmod-static-nodes.service
1543 endif
1544 endif
1545
1546 EXTRA_DIST += \
1547         units/systemd-modules-load.service.in \
1548         units/kmod-static-nodes.service.in
1549
1550 # ------------------------------------------------------------------------------
1551 if ENABLE_TMPFILES
1552 systemd_tmpfiles_SOURCES = \
1553         src/tmpfiles/tmpfiles.c
1554
1555 systemd_tmpfiles_LDADD = \
1556         libsystemd-units.la \
1557         libsystemd-label.la \
1558         libsystemd-capability.la \
1559         libsystemd-id128-internal.la \
1560         libsystemd-shared.la
1561
1562 rootbin_PROGRAMS += \
1563         systemd-tmpfiles
1564
1565 dist_systemunit_DATA += \
1566         units/systemd-tmpfiles-clean.timer
1567
1568 nodist_systemunit_DATA += \
1569         units/systemd-tmpfiles-setup-dev.service \
1570         units/systemd-tmpfiles-setup.service \
1571         units/systemd-tmpfiles-clean.service
1572
1573 dist_tmpfiles_DATA = \
1574         tmpfiles.d/systemd.conf \
1575         tmpfiles.d/systemd-nologin.conf \
1576         tmpfiles.d/tmp.conf \
1577         tmpfiles.d/x11.conf
1578
1579 if HAVE_SYSV_COMPAT
1580 dist_tmpfiles_DATA += \
1581         tmpfiles.d/legacy.conf
1582 endif
1583
1584 SYSINIT_TARGET_WANTS += \
1585         systemd-tmpfiles-setup-dev.service \
1586         systemd-tmpfiles-setup.service
1587
1588 dist_zshcompletion_DATA += \
1589         shell-completion/zsh/_systemd-tmpfiles
1590
1591 TIMERS_TARGET_WANTS += \
1592         systemd-tmpfiles-clean.timer
1593
1594 INSTALL_DIRS += \
1595         $(tmpfilesdir) \
1596         $(sysconfdir)/tmpfiles.d
1597 endif
1598
1599 EXTRA_DIST += \
1600         units/systemd-tmpfiles-setup-dev.service.in \
1601         units/systemd-tmpfiles-setup.service.in \
1602         units/systemd-tmpfiles-clean.service.in
1603
1604 # ------------------------------------------------------------------------------
1605 systemd_machine_id_setup_SOURCES = \
1606         src/machine-id-setup/machine-id-setup-main.c \
1607         src/core/machine-id-setup.c \
1608         src/core/machine-id-setup.h
1609
1610 systemd_machine_id_setup_LDADD = \
1611         libsystemd-label.la \
1612         libsystemd-id128-internal.la \
1613         libsystemd-shared.la
1614
1615 # ------------------------------------------------------------------------------
1616 systemd_sysctl_SOURCES = \
1617         src/sysctl/sysctl.c
1618
1619 systemd_sysctl_LDADD = \
1620         libsystemd-shared.la
1621
1622 # ------------------------------------------------------------------------------
1623 systemd_sleep_SOURCES = \
1624         src/sleep/sleep.c
1625
1626 systemd_sleep_LDADD = \
1627         libsystemd-shared.la
1628
1629 # ------------------------------------------------------------------------------
1630 systemd_fsck_SOURCES = \
1631         src/fsck/fsck.c
1632
1633 systemd_fsck_LDADD = \
1634         libsystemd-internal.la \
1635         libsystemd-id128-internal.la \
1636         libsystemd-daemon-internal.la \
1637         libudev-internal.la \
1638         libsystemd-shared.la
1639
1640 # ------------------------------------------------------------------------------
1641 systemd_ac_power_SOURCES = \
1642         src/ac-power/ac-power.c
1643
1644 systemd_ac_power_LDADD = \
1645         libudev-internal.la \
1646         libsystemd-shared.la
1647
1648 # ------------------------------------------------------------------------------
1649 systemd_detect_virt_SOURCES = \
1650         src/detect-virt/detect-virt.c
1651
1652 systemd_detect_virt_LDADD = \
1653         libsystemd-shared.la
1654
1655 systemd-detect-virt-install-hook:
1656         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1657
1658 INSTALL_EXEC_HOOKS += \
1659         systemd-detect-virt-install-hook
1660
1661 # ------------------------------------------------------------------------------
1662 systemd_delta_SOURCES = \
1663         src/delta/delta.c
1664
1665 systemd_delta_LDADD = \
1666         libsystemd-shared.la
1667
1668 # ------------------------------------------------------------------------------
1669 systemd_getty_generator_SOURCES = \
1670         src/getty-generator/getty-generator.c
1671
1672 systemd_getty_generator_LDADD = \
1673         libsystemd-label.la \
1674         libsystemd-shared.la
1675
1676 # ------------------------------------------------------------------------------
1677 systemd_fstab_generator_SOURCES = \
1678         src/fstab-generator/fstab-generator.c \
1679         src/core/mount-setup.c
1680
1681 systemd_fstab_generator_LDADD = \
1682         libsystemd-label.la \
1683         libsystemd-shared.la
1684
1685 # ------------------------------------------------------------------------------
1686 systemd_system_update_generator_SOURCES = \
1687         src/system-update-generator/system-update-generator.c
1688
1689 systemd_system_update_generator_LDADD = \
1690         libsystemd-label.la \
1691         libsystemd-shared.la
1692
1693 if ENABLE_EFI
1694 # ------------------------------------------------------------------------------
1695 systemgenerator_PROGRAMS +=  \
1696         systemd-efi-boot-generator
1697
1698 systemd_efi_boot_generator_SOURCES = \
1699         src/efi-boot-generator/efi-boot-generator.c
1700
1701 systemd_efi_boot_generator_LDADD = \
1702         libsystemd-label.la \
1703         libsystemd-shared.la
1704
1705 # ------------------------------------------------------------------------------
1706 bootctl_SOURCES = \
1707         src/boot/boot.h \
1708         src/boot/boot-loader.h \
1709         src/boot/bootctl.c \
1710         src/boot/boot-loader.c \
1711         src/boot/boot-efi.c
1712
1713 bootctl_LDADD = \
1714         libsystemd-shared.la \
1715         libsystemd-id128-internal.la \
1716         libsystemd-daemon-internal.la
1717
1718 bin_PROGRAMS += \
1719         bootctl
1720
1721 dist_zshcompletion_DATA += \
1722         shell-completion/zsh/_bootctl
1723
1724 endif
1725
1726 # ------------------------------------------------------------------------------
1727 if HAVE_BLKID
1728 systemgenerator_PROGRAMS +=  \
1729         systemd-gpt-auto-generator
1730
1731 systemd_gpt_auto_generator_SOURCES = \
1732         src/gpt-auto-generator/gpt-auto-generator.c
1733
1734 systemd_gpt_auto_generator_LDADD = \
1735         libsystemd-label.la \
1736         libsystemd-id128-internal.la \
1737         libudev-internal.la \
1738         libsystemd-shared.la \
1739         $(BLKID_LIBS)
1740
1741 systemd_gpt_auto_generator_CFLAGS = \
1742         $(AM_CFLAGS) \
1743         $(BLKID_CFLAGS)
1744 endif
1745
1746 # ------------------------------------------------------------------------------
1747 if ENABLE_KDBUS
1748 systemgenerator_PROGRAMS +=  \
1749         systemd-dbus1-generator
1750
1751 systemd_dbus1_generator_SOURCES = \
1752         src/dbus1-generator/dbus1-generator.c
1753
1754 systemd_dbus1_generator_LDADD = \
1755         libsystemd-label.la \
1756         libsystemd-shared.la \
1757         libsystemd-internal.la
1758
1759 dbus1-generator-install-hook:
1760         $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1761
1762 dbus1-generator-uninstall-hook:
1763         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1764
1765 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
1766 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
1767 endif
1768
1769 # ------------------------------------------------------------------------------
1770 systemd_rc_local_generator_SOURCES = \
1771         src/rc-local-generator/rc-local-generator.c
1772
1773 systemd_rc_local_generator_LDADD = \
1774         libsystemd-label.la \
1775         libsystemd-shared.la
1776
1777 # ------------------------------------------------------------------------------
1778 systemd_remount_fs_SOURCES = \
1779         src/remount-fs/remount-fs.c \
1780         src/core/mount-setup.c \
1781         src/core/mount-setup.h
1782
1783 systemd_remount_fs_LDADD = \
1784         libsystemd-label.la \
1785         libsystemd-shared.la
1786
1787 # ------------------------------------------------------------------------------
1788 systemd_cgroups_agent_SOURCES = \
1789         src/cgroups-agent/cgroups-agent.c
1790
1791 systemd_cgroups_agent_LDADD = \
1792         libsystemd-internal.la \
1793         libsystemd-id128-internal.la \
1794         libsystemd-daemon-internal.la \
1795         libsystemd-shared.la
1796
1797 # ------------------------------------------------------------------------------
1798 systemctl_SOURCES = \
1799         src/systemctl/systemctl.c
1800
1801 systemctl_LDADD = \
1802         libsystemd-units.la \
1803         libsystemd-label.la \
1804         libsystemd-internal.la \
1805         libsystemd-logs.la
1806
1807 if ENABLE_LOGIND
1808 systemctl_LDADD += \
1809         libsystemd-login-internal.la
1810 endif
1811
1812 systemctl_LDADD += \
1813         libsystemd-journal-internal.la \
1814         libsystemd-id128-internal.la \
1815         libsystemd-daemon-internal.la \
1816         libsystemd-shared.la
1817
1818 # ------------------------------------------------------------------------------
1819 systemd_notify_SOURCES = \
1820         src/notify/notify.c \
1821         src/readahead/sd-readahead.c
1822
1823 systemd_notify_LDADD = \
1824         libsystemd-daemon-internal.la \
1825         libsystemd-shared.la
1826
1827 # ------------------------------------------------------------------------------
1828 systemd_ask_password_SOURCES = \
1829         src/ask-password/ask-password.c
1830
1831 systemd_ask_password_LDADD = \
1832         libsystemd-label.la \
1833         libsystemd-shared.la
1834
1835 # ------------------------------------------------------------------------------
1836 systemd_reply_password_SOURCES = \
1837         src/reply-password/reply-password.c
1838
1839 systemd_reply_password_LDADD = \
1840         libsystemd-shared.la
1841
1842 # ------------------------------------------------------------------------------
1843 systemd_cgls_SOURCES = \
1844         src/cgls/cgls.c
1845
1846 systemd_cgls_LDADD = \
1847         libsystemd-shared.la
1848
1849 # ------------------------------------------------------------------------------
1850 systemd_cgtop_SOURCES = \
1851         src/cgtop/cgtop.c
1852
1853 systemd_cgtop_LDADD = \
1854         libsystemd-shared.la
1855
1856 # ------------------------------------------------------------------------------
1857 systemd_nspawn_SOURCES = \
1858         src/nspawn/nspawn.c \
1859         src/core/mount-setup.c \
1860         src/core/mount-setup.h \
1861         src/core/loopback-setup.c \
1862         src/core/loopback-setup.h
1863
1864 systemd_nspawn_LDADD = \
1865         libsystemd-label.la \
1866         libsystemd-capability.la \
1867         libsystemd-internal.la \
1868         libsystemd-id128-internal.la \
1869         libsystemd-daemon-internal.la \
1870         libsystemd-shared.la
1871
1872 # ------------------------------------------------------------------------------
1873 systemd_run_SOURCES = \
1874         src/run/run.c
1875
1876 systemd_run_LDADD = \
1877         libsystemd-label.la \
1878         libsystemd-capability.la \
1879         libsystemd-internal.la \
1880         libsystemd-daemon-internal.la \
1881         libsystemd-id128-internal.la \
1882         libsystemd-shared.la
1883
1884 # ------------------------------------------------------------------------------
1885 systemd_bus_proxyd_SOURCES = \
1886         src/bus-proxyd/bus-proxyd.c
1887
1888 systemd_bus_proxyd_LDADD = \
1889         libsystemd-internal.la \
1890         libsystemd-daemon-internal.la \
1891         libsystemd-id128-internal.la \
1892         libsystemd-shared.la
1893
1894 bus-proxyd-install-hook:
1895         $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
1896
1897 bus-proxyd-uninstall-hook:
1898         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
1899
1900 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
1901 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
1902
1903 if ENABLE_KDBUS
1904 nodist_systemunit_DATA += \
1905         units/systemd-bus-proxyd@.service
1906
1907 dist_systemunit_DATA += \
1908         units/systemd-bus-proxyd.socket
1909
1910 dist_userunit_DATA += \
1911         units/user/systemd-bus-proxyd.socket \
1912         units/user/systemd-bus-proxyd@.service
1913 endif
1914
1915 EXTRA_DIST += \
1916         units/systemd-bus-proxyd@.service.in
1917
1918 # ------------------------------------------------------------------------------
1919 systemd_tty_ask_password_agent_SOURCES = \
1920         src/tty-ask-password-agent/tty-ask-password-agent.c
1921
1922 systemd_tty_ask_password_agent_LDADD = \
1923         libsystemd-label.la \
1924         libsystemd-shared.la
1925
1926 # ------------------------------------------------------------------------------
1927 libsystemd_daemon_la_SOURCES = \
1928         src/libsystemd-daemon/libsystemd-daemon.sym \
1929         src/libsystemd-daemon/sd-daemon.c
1930
1931 libsystemd_daemon_internal_la_SOURCES = \
1932         $(libsystemd_daemon_la_SOURCES)
1933
1934 libsystemd_daemon_internal_la_CPPFLAGS = \
1935         $(AM_CPPFLAGS) \
1936         -DSD_DAEMON_DISABLE_MQ
1937
1938 libsystemd_daemon_la_CFLAGS = \
1939         $(AM_CFLAGS) \
1940         -fvisibility=hidden \
1941         -DSD_EXPORT_SYMBOLS
1942
1943 libsystemd_daemon_la_LDFLAGS = \
1944         $(AM_LDFLAGS) \
1945         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
1946         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
1947
1948 libsystemd_daemon_la_LIBADD =  \
1949         $(RT_LIBS)
1950
1951 pkginclude_HEADERS += \
1952         src/systemd/sd-daemon.h
1953
1954 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
1955 libsystemd-daemon-install-hook:
1956         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
1957
1958 libsystemd-daemon-uninstall-hook:
1959         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
1960
1961 INSTALL_EXEC_HOOKS += libsystemd-daemon-install-hook
1962 UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
1963
1964 lib_LTLIBRARIES += \
1965         libsystemd-daemon.la
1966
1967 noinst_LTLIBRARIES += \
1968         libsystemd-daemon-internal.la
1969
1970 pkgconfiglib_DATA += \
1971         src/libsystemd-daemon/libsystemd-daemon.pc
1972
1973 EXTRA_DIST += \
1974         src/libsystemd-daemon/libsystemd-daemon.pc.in
1975
1976 # ------------------------------------------------------------------------------
1977 libsystemd_la_SOURCES = \
1978         src/libsystemd/libsystemd.sym \
1979         src/systemd/sd-bus.h \
1980         src/systemd/sd-bus-protocol.h \
1981         src/systemd/sd-bus-vtable.h \
1982         src/systemd/sd-memfd.h \
1983         src/systemd/sd-utf8.h \
1984         src/systemd/sd-event.h \
1985         src/systemd/sd-dhcp-client.h \
1986         src/systemd/sd-rtnl.h \
1987         src/systemd/sd-resolve.h \
1988         src/libsystemd/sd-bus.c \
1989         src/libsystemd/bus-control.c \
1990         src/libsystemd/bus-control.h \
1991         src/libsystemd/bus-error.c \
1992         src/libsystemd/bus-error.h \
1993         src/libsystemd/bus-internal.c \
1994         src/libsystemd/bus-internal.h \
1995         src/libsystemd/bus-socket.c \
1996         src/libsystemd/bus-socket.h \
1997         src/libsystemd/bus-kernel.c \
1998         src/libsystemd/bus-kernel.h \
1999         src/libsystemd/bus-container.c \
2000         src/libsystemd/bus-container.h \
2001         src/libsystemd/bus-message.c \
2002         src/libsystemd/bus-message.h \
2003         src/libsystemd/bus-creds.c \
2004         src/libsystemd/bus-creds.h \
2005         src/libsystemd/bus-signature.c \
2006         src/libsystemd/bus-signature.h \
2007         src/libsystemd/bus-type.c \
2008         src/libsystemd/bus-type.h \
2009         src/libsystemd/bus-match.c \
2010         src/libsystemd/bus-match.h \
2011         src/libsystemd/bus-bloom.c \
2012         src/libsystemd/bus-bloom.h \
2013         src/libsystemd/bus-introspect.c \
2014         src/libsystemd/bus-introspect.h \
2015         src/libsystemd/bus-objects.c \
2016         src/libsystemd/bus-objects.h \
2017         src/libsystemd/bus-gvariant.c \
2018         src/libsystemd/bus-gvariant.h \
2019         src/libsystemd/bus-convenience.c \
2020         src/libsystemd/kdbus.h \
2021         src/libsystemd/sd-memfd.c \
2022         src/libsystemd/bus-util.c \
2023         src/libsystemd/bus-util.h \
2024         src/libsystemd/sd-utf8.c \
2025         src/libsystemd/sd-event.c \
2026         src/libsystemd/event-util.h \
2027         src/libsystemd/bus-protocol.h \
2028         src/libsystemd/sd-dhcp-client.c \
2029         src/libsystemd/dhcp-network.c \
2030         src/libsystemd/dhcp-option.c \
2031         src/libsystemd/dhcp-internal.h \
2032         src/libsystemd/dhcp-protocol.h \
2033         src/libsystemd/sd-rtnl.c \
2034         src/libsystemd/rtnl-internal.h \
2035         src/libsystemd/rtnl-message.c \
2036         src/libsystemd/rtnl-util.h \
2037         src/libsystemd/rtnl-util.c \
2038         src/libsystemd/sd-resolve.c \
2039         src/libsystemd/resolve-util.h
2040
2041 nodist_libsystemd_la_SOURCES = \
2042         src/libsystemd/bus-error-mapping.c
2043
2044 libsystemd_la_LIBADD = \
2045         libsystemd-id128-internal.la \
2046         libsystemd-daemon-internal.la \
2047         libsystemd-shared.la
2048
2049 libsystemd_la_CFLAGS = \
2050         $(AM_CFLAGS) \
2051         -pthread \
2052         -lresolv
2053
2054 libsystemd_la_LDFLAGS = \
2055         $(AM_LDFLAGS) \
2056         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2057         -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
2058
2059 pkgconfiglib_DATA += \
2060         src/libsystemd/libsystemd.pc
2061
2062 EXTRA_DIST += \
2063         src/libsystemd/bus-error-mapping.gperf \
2064         src/libsystemd/libsystemd.pc.in \
2065         src/libsystemd/DIFFERENCES \
2066         src/libsystemd/GVARIANT-SERIALIZATION
2067
2068 CLEANFILES += \
2069         src/libsystemd/bus-error-mapping.c
2070
2071 lib_LTLIBRARIES += \
2072         libsystemd.la
2073
2074 libsystemd_internal_la_SOURCES = \
2075         $(libsystemd_la_SOURCES)
2076
2077 nodist_libsystemd_internal_la_SOURCES = \
2078         $(nodist_libsystemd_la_SOURCES)
2079
2080 libsystemd_internal_la_CFLAGS = \
2081         $(libsystemd_la_CFLAGS)
2082
2083 noinst_LTLIBRARIES += \
2084         libsystemd-internal.la
2085
2086 libsystemd_dump_la_SOURCES = \
2087         src/libsystemd/bus-dump.c \
2088         src/libsystemd/bus-dump.h
2089
2090 libsystemd_dump_la_CFLAGS = \
2091         $(AM_CFLAGS) \
2092         $(CAP_CFLAGS)
2093
2094 noinst_LTLIBRARIES += \
2095         libsystemd-dump.la
2096
2097 tests += \
2098         test-bus-marshal \
2099         test-bus-signature \
2100         test-bus-chat \
2101         test-bus-cleanup \
2102         test-bus-server \
2103         test-bus-match \
2104         test-bus-kernel \
2105         test-bus-kernel-bloom \
2106         test-bus-kernel-benchmark \
2107         test-bus-memfd \
2108         test-bus-zero-copy \
2109         test-bus-introspect \
2110         test-bus-objects \
2111         test-bus-error \
2112         test-bus-creds \
2113         test-bus-gvariant \
2114         test-event \
2115         test-dhcp-option \
2116         test-dhcp-client \
2117         test-rtnl \
2118         test-resolve
2119
2120 bin_PROGRAMS += \
2121         busctl
2122
2123 test_bus_marshal_SOURCES = \
2124         src/libsystemd/test-bus-marshal.c
2125
2126 test_bus_marshal_LDADD = \
2127         libsystemd-internal.la \
2128         libsystemd-id128-internal.la \
2129         libsystemd-daemon-internal.la \
2130         libsystemd-shared.la \
2131         libsystemd-dump.la \
2132         libsystemd-capability.la \
2133         $(GLIB_LIBS) \
2134         $(DBUS_LIBS) \
2135         $(CAP_LIBS)
2136
2137 test_bus_marshal_CFLAGS = \
2138         $(AM_CFLAGS) \
2139         $(GLIB_CFLAGS) \
2140         $(DBUS_CFLAGS) \
2141         $(CAP_CFLAGS)
2142
2143 test_bus_signature_SOURCES = \
2144         src/libsystemd/test-bus-signature.c
2145
2146 test_bus_signature_LDADD = \
2147         libsystemd-shared.la \
2148         libsystemd-internal.la
2149
2150 test_bus_chat_SOURCES = \
2151         src/libsystemd/test-bus-chat.c
2152
2153 test_bus_chat_CFLAGS = \
2154         $(AM_CFLAGS) \
2155         -pthread
2156
2157 test_bus_chat_LDADD = \
2158         libsystemd-internal.la \
2159         libsystemd-id128-internal.la \
2160         libsystemd-daemon-internal.la \
2161         libsystemd-shared.la
2162
2163 test_bus_cleanup_SOURCES = \
2164         src/libsystemd/test-bus-cleanup.c
2165
2166 test_bus_cleanup_LDADD = \
2167         libsystemd-internal.la \
2168         libsystemd-id128-internal.la \
2169         libsystemd-daemon-internal.la \
2170         libsystemd-shared.la
2171
2172 test_bus_server_SOURCES = \
2173         src/libsystemd/test-bus-server.c
2174
2175 test_bus_server_CFLAGS = \
2176         $(AM_CFLAGS) \
2177         -pthread
2178
2179 test_bus_server_LDADD = \
2180         libsystemd-internal.la \
2181         libsystemd-id128-internal.la \
2182         libsystemd-daemon-internal.la \
2183         libsystemd-shared.la
2184
2185 test_bus_objects_SOURCES = \
2186         src/libsystemd/test-bus-objects.c
2187
2188 test_bus_objects_CFLAGS = \
2189         $(AM_CFLAGS) \
2190         $(CAP_CFLAGS) \
2191         -pthread
2192
2193 test_bus_objects_LDADD = \
2194         libsystemd-internal.la \
2195         libsystemd-id128-internal.la \
2196         libsystemd-daemon-internal.la \
2197         libsystemd-shared.la \
2198         libsystemd-dump.la \
2199         libsystemd-capability.la \
2200         $(CAP_LIBS)
2201
2202 test_bus_error_SOURCES = \
2203         src/libsystemd/test-bus-error.c
2204
2205 test_bus_error_LDADD = \
2206         libsystemd-internal.la \
2207         libsystemd-id128-internal.la \
2208         libsystemd-daemon-internal.la \
2209         libsystemd-shared.la
2210
2211 test_bus_gvariant_SOURCES = \
2212         src/libsystemd/test-bus-gvariant.c
2213
2214 test_bus_gvariant_LDADD = \
2215         libsystemd-internal.la \
2216         libsystemd-id128-internal.la \
2217         libsystemd-daemon-internal.la \
2218         libsystemd-shared.la \
2219         libsystemd-dump.la \
2220         libsystemd-capability.la \
2221         $(GLIB_LIBS) \
2222         $(CAP_LIBS)
2223
2224 test_bus_gvariant_CFLAGS = \
2225         $(AM_CFLAGS) \
2226         $(GLIB_CFLAGS)
2227         $(CAP_CFLAGS)
2228
2229 test_bus_creds_SOURCES = \
2230         src/libsystemd/test-bus-creds.c
2231
2232 test_bus_creds_LDADD = \
2233         libsystemd-internal.la \
2234         libsystemd-id128-internal.la \
2235         libsystemd-daemon-internal.la \
2236         libsystemd-shared.la \
2237         libsystemd-dump.la \
2238         libsystemd-capability.la
2239
2240 test_bus_match_SOURCES = \
2241         src/libsystemd/test-bus-match.c
2242
2243 test_bus_match_LDADD = \
2244         libsystemd-internal.la \
2245         libsystemd-id128-internal.la \
2246         libsystemd-daemon-internal.la \
2247         libsystemd-shared.la
2248
2249 test_bus_kernel_SOURCES = \
2250         src/libsystemd/test-bus-kernel.c
2251
2252 test_bus_kernel_LDADD = \
2253         libsystemd-internal.la \
2254         libsystemd-id128-internal.la \
2255         libsystemd-daemon-internal.la \
2256         libsystemd-shared.la \
2257         libsystemd-dump.la \
2258         libsystemd-capability.la \
2259         $(CAP_LIBS)
2260
2261 test_bus_kernel_CFLAGS = \
2262         $(AM_CFLAGS) \
2263         $(CAP_CFLAGS)
2264
2265 test_bus_kernel_bloom_SOURCES = \
2266         src/libsystemd/test-bus-kernel-bloom.c
2267
2268 test_bus_kernel_bloom_LDADD = \
2269         libsystemd-internal.la \
2270         libsystemd-id128-internal.la \
2271         libsystemd-daemon-internal.la \
2272         libsystemd-shared.la
2273
2274 test_bus_kernel_benchmark_SOURCES = \
2275         src/libsystemd/test-bus-kernel-benchmark.c
2276
2277 test_bus_kernel_benchmark_LDADD = \
2278         libsystemd-internal.la \
2279         libsystemd-id128-internal.la \
2280         libsystemd-daemon-internal.la \
2281         libsystemd-shared.la
2282
2283 test_bus_memfd_SOURCES = \
2284         src/libsystemd/test-bus-memfd.c
2285
2286 test_bus_memfd_LDADD = \
2287         libsystemd-internal.la \
2288         libsystemd-shared.la
2289
2290 test_bus_zero_copy_SOURCES = \
2291         src/libsystemd/test-bus-zero-copy.c
2292
2293 test_bus_zero_copy_LDADD = \
2294         libsystemd-internal.la \
2295         libsystemd-id128-internal.la \
2296         libsystemd-daemon-internal.la \
2297         libsystemd-shared.la \
2298         libsystemd-dump.la \
2299         libsystemd-capability.la \
2300         $(CAP_LIBS)
2301
2302 test_bus_zero_copy_CFLAGS = \
2303         $(AM_CFLAGS) \
2304         $(CAP_CFLAGS)
2305
2306 test_bus_introspect_SOURCES = \
2307         src/libsystemd/test-bus-introspect.c
2308
2309 test_bus_introspect_LDADD = \
2310         libsystemd-shared.la \
2311         libsystemd-internal.la
2312
2313 test_event_SOURCES = \
2314         src/libsystemd/test-event.c
2315
2316 test_event_LDADD = \
2317         libsystemd-internal.la \
2318         libsystemd-id128-internal.la \
2319         libsystemd-daemon-internal.la \
2320         libsystemd-shared.la
2321
2322 test_dhcp_option_SOURCES = \
2323         src/libsystemd/dhcp-protocol.h \
2324         src/libsystemd/dhcp-internal.h \
2325         src/libsystemd/test-dhcp-option.c
2326
2327 test_dhcp_option_LDADD = \
2328         libsystemd-internal.la \
2329         libsystemd-shared.la
2330
2331 test_dhcp_client_SOURCES = \
2332         src/systemd/sd-dhcp-client.h \
2333         src/libsystemd/dhcp-protocol.h \
2334         src/libsystemd/dhcp-internal.h \
2335         src/libsystemd/test-dhcp-client.c
2336
2337 test_dhcp_client_LDADD = \
2338         libsystemd-internal.la \
2339         libsystemd-daemon-internal.la \
2340         libsystemd-id128-internal.la \
2341         libsystemd-shared.la
2342
2343 test_rtnl_SOURCES = \
2344         src/libsystemd/test-rtnl.c
2345
2346 test_rtnl_LDADD = \
2347         libsystemd-internal.la \
2348         libsystemd-daemon-internal.la \
2349         libsystemd-id128-internal.la \
2350         libsystemd-shared.la
2351
2352 test_resolve_SOURCES = \
2353         src/systemd/sd-resolve.h \
2354         src/libsystemd/test-resolve.c
2355
2356 test_resolve_LDADD = \
2357         libsystemd-internal.la \
2358         libsystemd-shared.la
2359
2360 test_resolve_CFLAGS = \
2361         $(AM_CFLAGS) \
2362         -pthread
2363
2364 busctl_SOURCES = \
2365         src/libsystemd/busctl.c
2366
2367 busctl_LDADD = \
2368         libsystemd-internal.la \
2369         libsystemd-id128-internal.la \
2370         libsystemd-daemon-internal.la \
2371         libsystemd-shared.la \
2372         libsystemd-dump.la \
2373         libsystemd-capability.la \
2374         $(CAP_LIBS)
2375
2376 busctl_CFLAGS = \
2377         $(AM_CFLAGS) \
2378         $(CAP_CFLAGS)
2379
2380 # ------------------------------------------------------------------------------
2381 if ENABLE_GTK_DOC
2382 SUBDIRS += \
2383         docs/libudev
2384
2385 noinst_DATA += \
2386         docs/html/libudev \
2387         docs/html/gudev
2388 endif
2389
2390 include_HEADERS += \
2391         src/libudev/libudev.h
2392
2393 lib_LTLIBRARIES += \
2394         libudev.la
2395
2396 libudev_la_SOURCES =\
2397         src/libudev/libudev.sym \
2398         src/libudev/libudev-private.h \
2399         src/libudev/libudev.c \
2400         src/libudev/libudev-list.c \
2401         src/libudev/libudev-util.c \
2402         src/libudev/libudev-device.c \
2403         src/libudev/libudev-enumerate.c \
2404         src/libudev/libudev-monitor.c \
2405         src/libudev/libudev-queue.c \
2406         src/libudev/libudev-hwdb-def.h \
2407         src/libudev/libudev-hwdb.c
2408
2409 libudev_la_CFLAGS = \
2410         $(AM_CFLAGS) \
2411         -fvisibility=hidden
2412
2413 libudev_la_LDFLAGS = \
2414         $(AM_LDFLAGS) \
2415         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2416         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2417
2418 libudev_la_LIBADD = \
2419         libsystemd-daemon-internal.la \
2420         libsystemd-id128-internal.la \
2421         libsystemd-shared.la
2422
2423 pkgconfiglib_DATA += \
2424         src/libudev/libudev.pc
2425
2426 EXTRA_DIST += \
2427         src/libudev/libudev.pc.in
2428
2429 CLEANFILES += \
2430         src/libudev/libudev.pc \
2431         docs/html/libudev \
2432         docs/html/gudev
2433
2434 docs/html/libudev:
2435         $(AM_V_at)$(MKDIR_P) $(dir $@)
2436         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2437
2438 docs/html/gudev:
2439         $(AM_V_at)$(MKDIR_P) $(dir $@)
2440         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2441
2442 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2443 libudev-install-hook:
2444         libname=libudev.so && $(move-to-rootlibdir)
2445
2446 libudev-uninstall-hook:
2447         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2448
2449 INSTALL_EXEC_HOOKS += libudev-install-hook
2450 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2451
2452 # ------------------------------------------------------------------------------
2453 noinst_LTLIBRARIES += \
2454         libudev-internal.la
2455
2456 libudev_internal_la_SOURCES =\
2457         $(libudev_la_SOURCES) \
2458         src/libudev/libudev-device-private.c \
2459         src/libudev/libudev-queue-private.c
2460
2461 libudev_internal_la_CFLAGS = \
2462         $(AM_CFLAGS) \
2463         -fvisibility=default
2464
2465 # ------------------------------------------------------------------------------
2466 INSTALL_DIRS += \
2467         $(sysconfdir)/udev/rules.d \
2468         $(sysconfdir)/udev/hwdb.d
2469
2470 dist_network_DATA = \
2471         network/99-default.link
2472
2473 dist_udevrules_DATA += \
2474         rules/99-systemd.rules \
2475         rules/42-usb-hid-pm.rules \
2476         rules/50-udev-default.rules \
2477         rules/60-drm.rules \
2478         rules/60-keyboard.rules \
2479         rules/60-persistent-storage-tape.rules \
2480         rules/60-persistent-serial.rules \
2481         rules/60-persistent-input.rules \
2482         rules/60-persistent-alsa.rules \
2483         rules/60-persistent-storage.rules \
2484         rules/64-btrfs.rules \
2485         rules/75-net-description.rules \
2486         rules/75-tty-description.rules \
2487         rules/78-sound-card.rules \
2488         rules/80-net-setup-link.rules \
2489         rules/95-udev-late.rules
2490
2491 dist_udevhwdb_DATA = \
2492         hwdb/20-pci-vendor-model.hwdb \
2493         hwdb/20-pci-classes.hwdb \
2494         hwdb/20-usb-vendor-model.hwdb \
2495         hwdb/20-usb-classes.hwdb \
2496         hwdb/20-sdio-vendor-model.hwdb \
2497         hwdb/20-sdio-classes.hwdb \
2498         hwdb/20-bluetooth-vendor-product.hwdb \
2499         hwdb/20-acpi-vendor.hwdb \
2500         hwdb/20-OUI.hwdb \
2501         hwdb/60-keyboard.hwdb
2502
2503 udevconfdir = $(sysconfdir)/udev
2504 dist_udevconf_DATA = \
2505         src/udev/udev.conf
2506
2507 sharepkgconfigdir = $(datadir)/pkgconfig
2508 sharepkgconfig_DATA = \
2509         src/udev/udev.pc
2510
2511 EXTRA_DIST += \
2512         rules/99-systemd.rules.in \
2513         src/udev/udev.pc.in
2514
2515 CLEANFILES += \
2516         rules/99-systemd.rules \
2517         src/udev/udev.pc
2518
2519 EXTRA_DIST += \
2520         units/systemd-udevd.service.in \
2521         units/systemd-udev-trigger.service.in \
2522         units/systemd-udev-settle.service.in
2523
2524 CLEANFILES += \
2525         units/systemd-udevd.service \
2526         units/systemd-udev-trigger.service \
2527         units/systemd-udev-settle.service
2528
2529 SOCKETS_TARGET_WANTS += \
2530         systemd-udevd-control.socket \
2531         systemd-udevd-kernel.socket
2532 SYSINIT_TARGET_WANTS += \
2533         systemd-udevd.service \
2534         systemd-udev-trigger.service
2535
2536 rootbin_PROGRAMS += \
2537         udevadm
2538
2539 rootlibexec_PROGRAMS += \
2540         systemd-udevd
2541
2542 noinst_LTLIBRARIES += \
2543         libudev-core.la
2544
2545 src/udev/keyboard-keys.txt:
2546         $(AM_V_at)$(MKDIR_P) $(dir $@)
2547         $(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/' > $@
2548
2549 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2550         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2551
2552 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2553         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2554
2555 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2556         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2557
2558 libudev_core_la_SOURCES = \
2559         src/udev/udev.h \
2560         src/udev/udev-event.c \
2561         src/udev/udev-watch.c \
2562         src/udev/udev-node.c \
2563         src/udev/udev-rules.c \
2564         src/udev/udev-ctrl.c \
2565         src/udev/udev-builtin.c \
2566         src/udev/udev-builtin-btrfs.c \
2567         src/udev/udev-builtin-hwdb.c \
2568         src/udev/udev-builtin-input_id.c \
2569         src/udev/udev-builtin-keyboard.c \
2570         src/udev/udev-builtin-net_id.c \
2571         src/udev/udev-builtin-net_setup_link.c \
2572         src/udev/udev-builtin-path_id.c \
2573         src/udev/udev-builtin-usb_id.c \
2574         src/udev/net/link-config.h \
2575         src/udev/net/link-config.c \
2576         src/udev/net/ethtool-util.h \
2577         src/udev/net/ethtool-util.c
2578
2579 nodist_libudev_core_la_SOURCES = \
2580         src/udev/keyboard-keys-from-name.h \
2581         src/udev/keyboard-keys-to-name.h \
2582         src/udev/net/link-config-gperf.c
2583
2584 BUILT_SOURCES += \
2585         $(nodist_libudev_core_la_SOURCES)
2586
2587 CLEANFILES += \
2588         src/udev/keyboard-keys-from-name.gperf \
2589         src/udev/keyboard-keys.txt \
2590         src/udev/net/link-config-gperf.c
2591
2592 EXTRA_DIST += \
2593         src/udev/net/link-config-gperf.gperf
2594
2595 libudev_core_la_CFLAGS = \
2596         $(AM_CFLAGS) \
2597         $(BLKID_CFLAGS) \
2598         $(KMOD_CFLAGS)
2599
2600 libudev_core_la_LIBADD = \
2601         libudev-internal.la \
2602         libsystemd-label.la \
2603         libsystemd-daemon-internal.la \
2604         libsystemd-internal.la \
2605         libsystemd-id128-internal.la \
2606         libsystemd-shared.la \
2607         $(BLKID_LIBS) \
2608         $(KMOD_LIBS)
2609
2610 libudev_core_la_CPPFLAGS = \
2611         $(AM_CPPFLAGS) \
2612         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2613
2614 if ENABLE_FIRMWARE
2615 libudev_core_la_SOURCES += \
2616         src/udev/udev-builtin-firmware.c
2617
2618 dist_udevrules_DATA += \
2619         rules/50-firmware.rules
2620 endif
2621
2622 if HAVE_KMOD
2623 libudev_core_la_SOURCES += \
2624         src/udev/udev-builtin-kmod.c
2625
2626 dist_udevrules_DATA += \
2627         rules/80-drivers.rules
2628 endif
2629
2630 if HAVE_BLKID
2631 libudev_core_la_SOURCES += \
2632         src/udev/udev-builtin-blkid.c
2633 endif
2634
2635 if HAVE_ACL
2636 libudev_core_la_SOURCES += \
2637         src/udev/udev-builtin-uaccess.c \
2638         src/login/logind-acl.c \
2639         src/login/sd-login.c \
2640         src/systemd/sd-login.h \
2641         src/login/login-shared.c \
2642         src/login/login-shared.h
2643
2644 libudev_core_la_LIBADD += \
2645         libsystemd-acl.la
2646 endif
2647
2648 systemd_udevd_SOURCES = \
2649         src/udev/udevd.c
2650
2651 systemd_udevd_LDADD = \
2652         libudev-core.la
2653
2654 udevadm_SOURCES = \
2655         src/udev/udevadm.c \
2656         src/udev/udevadm-info.c \
2657         src/udev/udevadm-control.c \
2658         src/udev/udevadm-monitor.c \
2659         src/udev/udevadm-hwdb.c \
2660         src/udev/udevadm-settle.c \
2661         src/udev/udevadm-trigger.c \
2662         src/udev/udevadm-test.c \
2663         src/udev/udevadm-test-builtin.c
2664
2665 udevadm_LDADD = \
2666         libudev-core.la
2667
2668 # Update hwdb on installation. Do not bother if installing
2669 # in DESTDIR, since this is likely for packaging purposes.
2670 hwdb-update-hook:
2671         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2672
2673 INSTALL_DATA_HOOKS += \
2674         hwdb-update-hook
2675
2676 hwdb-remove-hook:
2677         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2678
2679 # ------------------------------------------------------------------------------
2680 TESTS += \
2681         test/udev-test.pl \
2682         test/rules-test.sh
2683
2684 manual_tests += \
2685         test-libudev \
2686         test-udev
2687
2688 test_libudev_SOURCES = \
2689         src/test/test-libudev.c
2690
2691 test_libudev_LDADD = \
2692         libsystemd-label.la \
2693         libudev-internal.la \
2694         libsystemd-shared.la
2695
2696 test_udev_SOURCES = \
2697         src/test/test-udev.c
2698
2699 test_udev_LDADD = \
2700         libudev-core.la \
2701         $(BLKID_LIBS) \
2702         $(KMOD_LIBS) \
2703         $(SELINUX_LIBS)
2704
2705 if HAVE_ACL
2706 test_udev_LDADD += \
2707         libsystemd-acl.la
2708 endif
2709
2710 check_DATA += \
2711         test/sys
2712
2713 # packed sysfs test tree
2714 test/sys:
2715         $(AM_V_at)$(MKDIR_P) $(dir $@)
2716         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2717
2718 test-sys-distclean:
2719         -rm -rf test/sys
2720 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2721
2722 EXTRA_DIST += \
2723         test/sys.tar.xz \
2724         test/udev-test.pl \
2725         test/rules-test.sh \
2726         test/rule-syntax-check.py
2727
2728 # ------------------------------------------------------------------------------
2729 ata_id_SOURCES = \
2730         src/udev/ata_id/ata_id.c
2731
2732 ata_id_LDADD = \
2733         libudev-internal.la \
2734         libsystemd-shared.la
2735
2736 udevlibexec_PROGRAMS += \
2737         ata_id
2738
2739 # ------------------------------------------------------------------------------
2740 cdrom_id_SOURCES = \
2741         src/udev/cdrom_id/cdrom_id.c
2742
2743 cdrom_id_LDADD = \
2744         libudev-internal.la \
2745         libsystemd-shared.la
2746
2747 udevlibexec_PROGRAMS += \
2748         cdrom_id
2749
2750 dist_udevrules_DATA += \
2751         rules/60-cdrom_id.rules
2752
2753 # ------------------------------------------------------------------------------
2754 collect_SOURCES = \
2755         src/udev/collect/collect.c
2756
2757 collect_LDADD = \
2758         libudev-internal.la \
2759         libsystemd-shared.la
2760
2761 udevlibexec_PROGRAMS += \
2762         collect
2763
2764 # ------------------------------------------------------------------------------
2765 scsi_id_SOURCES =\
2766         src/udev/scsi_id/scsi_id.c \
2767         src/udev/scsi_id/scsi_serial.c \
2768         src/udev/scsi_id/scsi.h \
2769         src/udev/scsi_id/scsi_id.h
2770
2771 scsi_id_LDADD = \
2772         libudev-internal.la \
2773         libsystemd-shared.la
2774
2775 udevlibexec_PROGRAMS += \
2776         scsi_id
2777
2778 EXTRA_DIST += \
2779         src/udev/scsi_id/README
2780
2781 # ------------------------------------------------------------------------------
2782 v4l_id_SOURCES = \
2783         src/udev/v4l_id/v4l_id.c
2784
2785 v4l_id_LDADD = \
2786         libudev-internal.la
2787
2788 udevlibexec_PROGRAMS += \
2789         v4l_id
2790
2791 dist_udevrules_DATA += \
2792         rules/60-persistent-v4l.rules
2793
2794 # ------------------------------------------------------------------------------
2795 accelerometer_SOURCES = \
2796         src/udev/accelerometer/accelerometer.c
2797
2798 accelerometer_LDADD = \
2799         libudev-internal.la -lm \
2800         libsystemd-shared.la
2801
2802 udevlibexec_PROGRAMS += \
2803         accelerometer
2804
2805 dist_udevrules_DATA += \
2806         rules/61-accelerometer.rules
2807
2808 # ------------------------------------------------------------------------------
2809 if ENABLE_GUDEV
2810 if ENABLE_GTK_DOC
2811 SUBDIRS += \
2812         docs/gudev
2813 endif
2814
2815 libgudev_includedir = \
2816         $(includedir)/gudev-1.0/gudev
2817
2818 libgudev_include_HEADERS = \
2819         src/gudev/gudev.h \
2820         src/gudev/gudevenums.h \
2821         src/gudev/gudevenumtypes.h \
2822         src/gudev/gudevtypes.h \
2823         src/gudev/gudevclient.h \
2824         src/gudev/gudevdevice.h \
2825         src/gudev/gudevenumerator.h
2826
2827 lib_LTLIBRARIES += libgudev-1.0.la
2828
2829 pkgconfiglib_DATA += \
2830         src/gudev/gudev-1.0.pc
2831
2832 CLEANFILES += \
2833         src/gudev/gudev-1.0.pc
2834
2835 libgudev_1_0_la_SOURCES = \
2836         src/gudev/gudevenums.h \
2837         src/gudev/gudevenumtypes.h \
2838         src/gudev/gudevenumtypes.h\
2839         src/gudev/gudevtypes.h \
2840         src/gudev/gudevclient.h \
2841         src/gudev/gudevclient.c \
2842         src/gudev/gudevdevice.h \
2843         src/gudev/gudevdevice.c \
2844         src/gudev/gudevenumerator.h \
2845         src/gudev/gudevenumerator.c \
2846         src/gudev/gudevprivate.h
2847
2848 nodist_libgudev_1_0_la_SOURCES = \
2849         src/gudev/gudevmarshal.h \
2850         src/gudev/gudevmarshal.c \
2851         src/gudev/gudevenumtypes.h \
2852         src/gudev/gudevenumtypes.c
2853
2854 BUILT_SOURCES += \
2855         $(nodist_libgudev_1_0_la_SOURCES)
2856
2857 libgudev_1_0_la_CPPFLAGS = \
2858         $(AM_CPPFLAGS) \
2859         -I$(top_builddir)/src\
2860         -I$(top_srcdir)/src\
2861         -I$(top_builddir)/src/gudev \
2862         -I$(top_srcdir)/src/gudev \
2863         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2864         -D_GUDEV_COMPILATION \
2865         -DG_LOG_DOMAIN=\"GUdev\"
2866
2867 libgudev_1_0_la_CFLAGS = \
2868         $(AM_CFLAGS) \
2869         -fvisibility=default \
2870         $(GLIB_CFLAGS)
2871
2872 libgudev_1_0_la_LIBADD = \
2873         libudev.la \
2874         $(GLIB_LIBS)
2875
2876 libgudev_1_0_la_LDFLAGS = \
2877         $(AM_LDFLAGS) \
2878         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2879         -export-dynamic -no-undefined \
2880         -export-symbols-regex '^g_udev_.*'
2881
2882 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2883         $(AM_V_at)$(MKDIR_P) $(dir $@)
2884         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2885
2886 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2887         $(AM_V_at)$(MKDIR_P) $(dir $@)
2888         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2889         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2890
2891 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2892         $(AM_V_at)$(MKDIR_P) $(dir $@)
2893         $(AM_V_GEN)glib-mkenums --template $^ > $@
2894
2895 if HAVE_INTROSPECTION
2896 -include $(INTROSPECTION_MAKEFILE)
2897
2898 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2899
2900 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2901
2902 src_gudev_GUdev_1_0_gir_CFLAGS = \
2903         $(AM_CFLAGS) \
2904         $(INCLUDES) \
2905         -D_GUDEV_COMPILATION \
2906         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2907         -I$(top_srcdir)/src \
2908         -I$(top_builddir)/src \
2909         -I$(top_srcdir)/src/gudev \
2910         -I$(top_builddir)/src/gudev
2911
2912 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2913
2914 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2915         --pkg-export=gudev-1.0 \
2916         --warn-all
2917
2918 src_gudev_GUdev_1_0_gir_FILES = \
2919         src/gudev/gudev.h \
2920         src/gudev/gudevtypes.h \
2921         src/gudev/gudevenums.h \
2922         src/gudev/gudevenumtypes.h \
2923         src/gudev/gudevclient.h \
2924         src/gudev/gudevdevice.h \
2925         src/gudev/gudevenumerator.h \
2926         src/gudev/gudevclient.c \
2927         src/gudev/gudevdevice.c \
2928         src/gudev/gudevenumerator.c
2929
2930 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2931 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2932
2933 girdir = $(datadir)/gir-1.0
2934 gir_DATA = \
2935         src/gudev/GUdev-1.0.gir
2936
2937 typelibsdir = $(libdir)/girepository-1.0
2938 typelibs_DATA = \
2939         src/gudev/GUdev-1.0.typelib
2940
2941 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2942 endif # HAVE_INTROSPECTION
2943
2944 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2945 libgudev-install-hook:
2946         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2947
2948 libgudev-uninstall-hook:
2949         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2950
2951 INSTALL_EXEC_HOOKS += libgudev-install-hook
2952 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2953 endif
2954
2955 EXTRA_DIST += \
2956         src/gudev/gudev-1.0.pc.in \
2957         src/gudev/gudevmarshal.list \
2958         src/gudev/gudevenumtypes.h.template \
2959         src/gudev/gudevenumtypes.c.template \
2960         src/gudev/gjs-example.js \
2961         src/gudev/seed-example-enum.js \
2962         src/gudev/seed-example.js
2963
2964 # ------------------------------------------------------------------------------
2965 mtd_probe_SOURCES =  \
2966         src/udev/mtd_probe/mtd_probe.c \
2967         src/udev/mtd_probe/mtd_probe.h \
2968         src/udev/mtd_probe/probe_smartmedia.c
2969
2970 dist_udevrules_DATA += \
2971         rules/75-probe_mtd.rules
2972
2973 udevlibexec_PROGRAMS += \
2974         mtd_probe
2975
2976 # ------------------------------------------------------------------------------
2977 libsystemd_id128_la_SOURCES = \
2978         src/libsystemd-id128/libsystemd-id128.sym \
2979         src/libsystemd-id128/sd-id128.c
2980
2981 libsystemd_id128_la_CFLAGS = \
2982         $(AM_CFLAGS) \
2983         -fvisibility=hidden
2984
2985 libsystemd_id128_la_LDFLAGS = \
2986         $(AM_LDFLAGS) \
2987         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
2988         -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
2989
2990 libsystemd_id128_la_LIBADD = \
2991         libsystemd-daemon-internal.la \
2992         libsystemd-shared.la
2993
2994 libsystemd_id128_internal_la_SOURCES = \
2995         $(libsystemd_id128_la_SOURCES)
2996
2997 test_id128_SOURCES = \
2998         src/test/test-id128.c
2999
3000 test_id128_LDADD = \
3001         libsystemd-id128-internal.la \
3002         libsystemd-daemon-internal.la \
3003         libsystemd-shared.la
3004
3005 tests += \
3006         test-id128
3007
3008 pkginclude_HEADERS += \
3009         src/systemd/sd-id128.h
3010
3011 lib_LTLIBRARIES += \
3012         libsystemd-id128.la
3013
3014 noinst_LTLIBRARIES += \
3015         libsystemd-id128-internal.la
3016
3017 pkgconfiglib_DATA += \
3018         src/libsystemd-id128/libsystemd-id128.pc
3019
3020 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3021 libsystemd-id128-install-hook:
3022         libname=libsystemd-id128.so && $(move-to-rootlibdir)
3023
3024 libsystemd-id128-uninstall-hook:
3025         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
3026
3027 INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
3028 UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
3029
3030 EXTRA_DIST += \
3031         src/libsystemd-id128/libsystemd-id128.pc.in
3032
3033 # ------------------------------------------------------------------------------
3034
3035 rootlibexec_PROGRAMS += \
3036         systemd-activate
3037
3038 systemd_activate_SOURCES = \
3039         src/activate/activate.c
3040
3041 systemd_activate_LDADD = \
3042         libsystemd-label.la \
3043         libsystemd-daemon-internal.la \
3044         libsystemd-shared.la
3045
3046 # ------------------------------------------------------------------------------
3047 systemd_journald_SOURCES = \
3048         src/journal/journald.c \
3049         src/journal/journald-server.h
3050
3051 systemd_journald_LDADD = \
3052         libsystemd-journal-core.la \
3053         libsystemd-internal.la \
3054         libsystemd-shared.la
3055
3056 systemd_cat_SOURCES = \
3057         src/journal/cat.c
3058
3059 systemd_cat_LDADD = \
3060         libsystemd-journal-core.la
3061
3062 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3063 journalctl_CFLAGS = \
3064         $(AM_CFLAGS)
3065
3066 journalctl_SOURCES = \
3067         src/journal/journalctl.c
3068
3069 journalctl_LDADD = \
3070         libsystemd-journal-internal.la \
3071         libsystemd-id128-internal.la \
3072         libsystemd-logs.la \
3073         libsystemd-shared.la
3074
3075 if HAVE_ACL
3076 journalctl_LDADD += \
3077         libsystemd-acl.la
3078 endif
3079
3080 if HAVE_QRENCODE
3081 journalctl_SOURCES += \
3082         src/journal/journal-qrcode.c \
3083         src/journal/journal-qrcode.h
3084
3085 journalctl_CFLAGS += \
3086         $(QRENCODE_CFLAGS)
3087
3088 journalctl_LDADD += \
3089         $(QRENCODE_LIBS)
3090 endif
3091
3092 test_journal_SOURCES = \
3093         src/journal/test-journal.c
3094
3095 test_journal_LDADD = \
3096         libsystemd-journal-core.la
3097
3098 test_journal_send_SOURCES = \
3099         src/journal/test-journal-send.c
3100
3101 test_journal_send_LDADD = \
3102         libsystemd-journal-core.la
3103
3104 test_journal_syslog_SOURCES = \
3105         src/journal/test-journal-syslog.c
3106
3107 test_journal_syslog_LDADD = \
3108         libsystemd-journal-core.la
3109
3110 test_journal_match_SOURCES = \
3111         src/journal/test-journal-match.c
3112
3113 test_journal_match_LDADD = \
3114         libsystemd-journal-core.la
3115
3116 test_journal_enum_SOURCES = \
3117         src/journal/test-journal-enum.c
3118
3119 test_journal_enum_LDADD = \
3120         libsystemd-journal-core.la
3121
3122 test_journal_stream_SOURCES = \
3123         src/journal/test-journal-stream.c
3124
3125 test_journal_stream_LDADD = \
3126         libsystemd-journal-core.la
3127
3128 test_journal_flush_SOURCES = \
3129         src/journal/test-journal-flush.c
3130
3131 test_journal_flush_LDADD = \
3132         libsystemd-journal-core.la
3133
3134 test_journal_init_SOURCES = \
3135         src/journal/test-journal-init.c
3136
3137 test_journal_init_LDADD = \
3138         libsystemd-journal-core.la
3139
3140 test_journal_verify_SOURCES = \
3141         src/journal/test-journal-verify.c
3142
3143 test_journal_verify_LDADD = \
3144         libsystemd-journal-core.la
3145
3146 test_journal_interleaving_SOURCES = \
3147         src/journal/test-journal-interleaving.c
3148
3149 test_journal_interleaving_LDADD = \
3150         libsystemd-journal-core.la
3151
3152 test_mmap_cache_SOURCES = \
3153         src/journal/test-mmap-cache.c
3154
3155 test_mmap_cache_LDADD = \
3156         libsystemd-journal-core.la
3157
3158 test_catalog_SOURCES = \
3159         src/journal/test-catalog.c
3160
3161 test_catalog_CPPFLAGS = \
3162         $(AM_CPPFLAGS) \
3163         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3164
3165 test_catalog_LDADD = \
3166         libsystemd-journal-core.la
3167
3168 libsystemd_journal_la_SOURCES = \
3169         src/journal/libsystemd-journal.sym \
3170         src/journal/sd-journal.c \
3171         src/systemd/sd-journal.h \
3172         src/systemd/_sd-common.h \
3173         src/journal/journal-file.c \
3174         src/journal/journal-file.h \
3175         src/journal/journal-vacuum.c \
3176         src/journal/journal-vacuum.h \
3177         src/journal/journal-verify.c \
3178         src/journal/journal-verify.h \
3179         src/journal/lookup3.c \
3180         src/journal/lookup3.h \
3181         src/journal/journal-send.c \
3182         src/journal/journal-def.h \
3183         src/journal/compress.h \
3184         src/journal/catalog.c \
3185         src/journal/catalog.h \
3186         src/journal/mmap-cache.c \
3187         src/journal/mmap-cache.h
3188
3189 libsystemd_journal_la_CFLAGS = \
3190         $(AM_CFLAGS) \
3191         -fvisibility=hidden
3192
3193 libsystemd_journal_la_LDFLAGS = \
3194         $(AM_LDFLAGS) \
3195         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
3196         -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
3197
3198 libsystemd_journal_la_LIBADD = \
3199         libsystemd-label.la \
3200         libsystemd-daemon-internal.la \
3201         libsystemd-id128-internal.la \
3202         libsystemd-shared.la
3203
3204 libsystemd_journal_internal_la_SOURCES = \
3205         $(libsystemd_journal_la_SOURCES)
3206
3207 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3208 libsystemd_journal_internal_la_CFLAGS = \
3209         $(AM_CFLAGS)
3210
3211 libsystemd_journal_internal_la_LIBADD =
3212
3213 if HAVE_XZ
3214 libsystemd_journal_la_SOURCES += \
3215         src/journal/compress.c
3216
3217 libsystemd_journal_la_CFLAGS += \
3218         $(XZ_CFLAGS)
3219
3220 libsystemd_journal_la_LIBADD += \
3221         $(XZ_LIBS)
3222
3223 libsystemd_journal_internal_la_CFLAGS += \
3224         $(XZ_CFLAGS)
3225
3226 libsystemd_journal_internal_la_LIBADD += \
3227         $(XZ_LIBS)
3228 endif
3229
3230 libsystemd_journal_core_la_SOURCES = \
3231         src/journal/journald-kmsg.c \
3232         src/journal/journald-kmsg.h \
3233         src/journal/journald-syslog.c \
3234         src/journal/journald-syslog.h \
3235         src/journal/journald-stream.c \
3236         src/journal/journald-stream.h \
3237         src/journal/journald-server.c \
3238         src/journal/journald-server.h \
3239         src/journal/journald-console.c \
3240         src/journal/journald-console.h \
3241         src/journal/journald-native.c \
3242         src/journal/journald-native.h \
3243         src/journal/journald-rate-limit.c \
3244         src/journal/journald-rate-limit.h \
3245         src/journal/journal-internal.h
3246
3247 nodist_libsystemd_journal_core_la_SOURCES = \
3248         src/journal/journald-gperf.c
3249
3250 libsystemd_journal_core_la_LIBADD = \
3251         libsystemd-journal-internal.la \
3252         libudev-internal.la \
3253         libsystemd-capability.la \
3254         libsystemd-label.la \
3255         libsystemd-daemon-internal.la \
3256         libsystemd-id128-internal.la \
3257         libsystemd-shared.la
3258
3259 if ENABLE_LOGIND
3260 libsystemd_journal_core_la_LIBADD += \
3261         libsystemd-login-internal.la
3262 endif
3263
3264 if HAVE_ACL
3265 libsystemd_journal_core_la_LIBADD += \
3266         libsystemd-acl.la
3267 endif
3268
3269 noinst_LTLIBRARIES += \
3270         libsystemd-journal-core.la
3271
3272 if HAVE_GCRYPT
3273 libsystemd_journal_la_SOURCES += \
3274         src/journal/journal-authenticate.c \
3275         src/journal/journal-authenticate.h \
3276         src/journal/fsprg.c \
3277         src/journal/fsprg.h
3278
3279 libsystemd_journal_la_CFLAGS += \
3280         $(GCRYPT_CFLAGS) \
3281         -Wno-pointer-arith
3282
3283 libsystemd_journal_la_LIBADD += \
3284         $(GCRYPT_LIBS)
3285
3286 libsystemd_journal_internal_la_CFLAGS += \
3287         $(GCRYPT_CFLAGS) \
3288         -Wno-pointer-arith
3289
3290 libsystemd_journal_internal_la_LIBADD += \
3291         $(GCRYPT_LIBS)
3292 endif
3293
3294 # move lib from $(libdir) to $(rootlibdir) and update devel link, if
3295 # needed. Also, grant read access to new journal files to members of
3296 # "adm" and "wheel".
3297 libsystemd-journal-install-hook:
3298         libname=libsystemd-journal.so && $(move-to-rootlibdir)
3299         -$(MKDIR_P) $(DESTDIR)/var/log/journal
3300         -chown 0:0 $(DESTDIR)/var/log/journal
3301         -chmod 755 $(DESTDIR)/var/log/journal
3302         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
3303         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
3304
3305 libsystemd-journal-uninstall-hook:
3306         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
3307
3308 INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
3309 UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
3310
3311 # ------------------------------------------------------------------------------
3312
3313 # Update catalog on installation. Do not bother if installing
3314 # in DESTDIR, since this is likely for packaging purposes.
3315 catalog-update-hook:
3316         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3317
3318 INSTALL_DATA_HOOKS += \
3319         catalog-update-hook
3320
3321 catalog-remove-hook:
3322         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3323
3324 UNINSTALL_DATA_HOOKS += \
3325         catalog-remove-hook
3326
3327 manual_tests += \
3328         test-journal-enum
3329
3330 tests += \
3331         test-journal \
3332         test-journal-send \
3333         test-journal-syslog \
3334         test-journal-match \
3335         test-journal-stream \
3336         test-journal-init \
3337         test-journal-verify \
3338         test-journal-interleaving \
3339         test-journal-flush \
3340         test-mmap-cache \
3341         test-catalog
3342
3343 pkginclude_HEADERS += \
3344         src/systemd/sd-journal.h \
3345         src/systemd/sd-messages.h \
3346         src/systemd/_sd-common.h
3347
3348 lib_LTLIBRARIES += \
3349         libsystemd-journal.la
3350
3351 noinst_LTLIBRARIES += \
3352         libsystemd-journal-internal.la
3353
3354 rootlibexec_PROGRAMS += \
3355         systemd-journald
3356
3357 rootbin_PROGRAMS += \
3358         journalctl
3359
3360 bin_PROGRAMS += \
3361         systemd-cat
3362
3363 dist_systemunit_DATA += \
3364         units/systemd-journald.socket
3365
3366 nodist_systemunit_DATA += \
3367         units/systemd-journald.service \
3368         units/systemd-journal-flush.service
3369
3370 dist_pkgsysconf_DATA += \
3371         src/journal/journald.conf
3372
3373 pkgconfiglib_DATA += \
3374         src/journal/libsystemd-journal.pc
3375
3376 dist_catalog_DATA = \
3377         catalog/systemd.fr.catalog \
3378         catalog/systemd.ru.catalog \
3379         catalog/systemd.it.catalog \
3380         catalog/systemd.catalog
3381
3382 SOCKETS_TARGET_WANTS += \
3383         systemd-journald.socket
3384 SYSINIT_TARGET_WANTS += \
3385         systemd-journald.service \
3386         systemd-journal-flush.service
3387
3388 EXTRA_DIST += \
3389         src/journal/libsystemd-journal.pc.in \
3390         units/systemd-journald.service.in \
3391         units/systemd-journal-flush.service.in \
3392         src/journal/journald-gperf.gperf
3393
3394 CLEANFILES += \
3395         src/journal/journald-gperf.c
3396
3397 # ------------------------------------------------------------------------------
3398 if HAVE_MICROHTTPD
3399 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3400
3401 rootlibexec_PROGRAMS += \
3402         systemd-journal-gatewayd
3403
3404 systemd_journal_gatewayd_SOURCES = \
3405         src/journal/journal-gatewayd.c \
3406         src/journal/microhttpd-util.h \
3407         src/journal/microhttpd-util.c
3408
3409 systemd_journal_gatewayd_LDADD = \
3410         libsystemd-logs.la \
3411         libsystemd-journal-internal.la \
3412         libsystemd-id128-internal.la \
3413         libsystemd-daemon-internal.la \
3414         libsystemd-internal.la \
3415         libsystemd-shared.la \
3416         $(MICROHTTPD_LIBS)
3417
3418 systemd_journal_gatewayd_CFLAGS = \
3419         $(AM_CFLAGS) \
3420         $(MICROHTTPD_CFLAGS)
3421
3422 systemd_journal_gatewayd_CPPFLAGS = \
3423         $(AM_CPPFLAGS) \
3424         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
3425
3426 dist_systemunit_DATA += \
3427         units/systemd-journal-gatewayd.socket
3428
3429 nodist_systemunit_DATA += \
3430         units/systemd-journal-gatewayd.service
3431
3432 dist_gatewayddocumentroot_DATA = \
3433         src/journal/browse.html
3434
3435 endif
3436
3437 EXTRA_DIST += \
3438         units/systemd-journal-gatewayd.service.in
3439
3440 # ------------------------------------------------------------------------------
3441
3442 systemd_socket_proxyd_SOURCES = \
3443         src/socket-proxy/socket-proxyd.c
3444
3445 systemd_socket_proxyd_LDADD = \
3446         libsystemd-logs.la \
3447         libsystemd-internal.la \
3448         libsystemd-journal-internal.la \
3449         libsystemd-id128-internal.la \
3450         libsystemd-daemon-internal.la \
3451         libsystemd-shared.la
3452
3453 # ------------------------------------------------------------------------------
3454 if ENABLE_COREDUMP
3455 systemd_coredump_SOURCES = \
3456         src/journal/coredump.c
3457
3458 systemd_coredump_LDADD = \
3459         libsystemd-journal-internal.la \
3460         libsystemd-label.la \
3461         libsystemd-shared.la
3462
3463 if ENABLE_LOGIND
3464 systemd_coredump_LDADD += \
3465         libsystemd-login-internal.la
3466 endif
3467
3468 rootlibexec_PROGRAMS += \
3469         systemd-coredump
3470
3471 systemd_coredumpctl_SOURCES = \
3472         src/journal/coredumpctl.c
3473
3474 systemd_coredumpctl_LDADD = \
3475         libsystemd-journal-internal.la \
3476         libsystemd-id128-internal.la \
3477         libsystemd-shared.la
3478
3479 bin_PROGRAMS += \
3480         systemd-coredumpctl
3481
3482 dist_bashcompletion_DATA += \
3483         shell-completion/bash/systemd-coredumpctl
3484
3485 dist_zshcompletion_DATA += \
3486         shell-completion/zsh/_systemd-coredumpctl
3487
3488 sysctl_DATA = \
3489         sysctl.d/50-coredump.conf
3490
3491 CLEANFILES += \
3492         sysctl.d/50-coredump.conf
3493 endif
3494
3495 EXTRA_DIST += \
3496         sysctl.d/50-coredump.conf.in
3497
3498 # ------------------------------------------------------------------------------
3499 if ENABLE_BINFMT
3500 systemd_binfmt_SOURCES = \
3501         src/binfmt/binfmt.c
3502
3503 systemd_binfmt_LDADD = \
3504         libsystemd-shared.la
3505
3506 rootlibexec_PROGRAMS += \
3507         systemd-binfmt
3508
3509 dist_systemunit_DATA += \
3510         units/proc-sys-fs-binfmt_misc.automount \
3511         units/proc-sys-fs-binfmt_misc.mount
3512
3513 nodist_systemunit_DATA += \
3514         units/systemd-binfmt.service
3515
3516 INSTALL_DIRS += \
3517         $(prefix)/lib/binfmt.d \
3518         $(sysconfdir)/binfmt.d
3519
3520 SYSINIT_TARGET_WANTS += \
3521         systemd-binfmt.service \
3522         proc-sys-fs-binfmt_misc.automount
3523
3524 endif
3525
3526 EXTRA_DIST += \
3527         units/systemd-binfmt.service.in
3528
3529 # ------------------------------------------------------------------------------
3530 if ENABLE_VCONSOLE
3531 systemd_vconsole_setup_SOURCES = \
3532         src/vconsole/vconsole-setup.c
3533
3534 systemd_vconsole_setup_LDADD = \
3535         libsystemd-shared.la
3536
3537 rootlibexec_PROGRAMS += \
3538         systemd-vconsole-setup
3539
3540 nodist_systemunit_DATA += \
3541         units/systemd-vconsole-setup.service
3542
3543 SYSINIT_TARGET_WANTS += \
3544         systemd-vconsole-setup.service
3545 endif
3546
3547 EXTRA_DIST += \
3548         units/systemd-vconsole-setup.service.in
3549
3550 # ------------------------------------------------------------------------------
3551 if ENABLE_READAHEAD
3552 systemd_readahead_SOURCES = \
3553         src/readahead/readahead.c \
3554         src/readahead/readahead-collect.c \
3555         src/readahead/readahead-replay.c \
3556         src/readahead/readahead-analyze.c \
3557         src/readahead/readahead-common.c \
3558         src/readahead/readahead-common.h
3559
3560 systemd_readahead_LDADD = \
3561         libsystemd-daemon-internal.la \
3562         libudev-internal.la \
3563         libsystemd-shared.la
3564
3565 dist_doc_DATA += \
3566         src/readahead/sd-readahead.c \
3567         src/systemd/sd-readahead.h
3568
3569 rootlibexec_PROGRAMS += \
3570         systemd-readahead
3571
3572 dist_systemunit_DATA += \
3573         units/systemd-readahead-drop.service \
3574         units/systemd-readahead-done.timer
3575
3576 nodist_systemunit_DATA += \
3577         units/systemd-readahead-collect.service \
3578         units/systemd-readahead-replay.service \
3579         units/systemd-readahead-done.service
3580
3581 endif
3582
3583 EXTRA_DIST += \
3584         units/systemd-readahead-collect.service.in \
3585         units/systemd-readahead-replay.service.in \
3586         units/systemd-readahead-done.service.in
3587
3588 # ------------------------------------------------------------------------------
3589 if ENABLE_BOOTCHART
3590 systemd_bootchart_SOURCES = \
3591         src/bootchart/bootchart.c \
3592         src/bootchart/bootchart.h \
3593         src/bootchart/store.c \
3594         src/bootchart/store.h \
3595         src/bootchart/svg.c \
3596         src/bootchart/svg.h
3597
3598 systemd_bootchart_LDADD = \
3599         libsystemd-journal-internal.la \
3600         libsystemd-shared.la
3601
3602 rootlibexec_PROGRAMS += \
3603         systemd-bootchart
3604
3605 dist_pkgsysconf_DATA += \
3606         src/bootchart/bootchart.conf
3607 endif
3608
3609 # ------------------------------------------------------------------------------
3610 if ENABLE_QUOTACHECK
3611 rootlibexec_PROGRAMS += \
3612         systemd-quotacheck
3613
3614 nodist_systemunit_DATA += \
3615         units/systemd-quotacheck.service
3616
3617 systemd_quotacheck_SOURCES = \
3618         src/quotacheck/quotacheck.c
3619
3620 systemd_quotacheck_LDADD = \
3621         libsystemd-shared.la
3622 endif
3623
3624 EXTRA_DIST += \
3625         units/systemd-quotacheck.service.in
3626
3627 nodist_systemunit_DATA += \
3628         units/quotaon.service
3629
3630 # ------------------------------------------------------------------------------
3631 if ENABLE_RANDOMSEED
3632 rootlibexec_PROGRAMS += \
3633         systemd-random-seed
3634
3635 nodist_systemunit_DATA += \
3636         units/systemd-random-seed.service
3637
3638 systemd_random_seed_SOURCES = \
3639         src/random-seed/random-seed.c
3640
3641 systemd_random_seed_LDADD = \
3642         libsystemd-label.la \
3643         libsystemd-shared.la
3644
3645 SYSINIT_TARGET_WANTS += \
3646         systemd-random-seed.service
3647
3648 endif
3649
3650 EXTRA_DIST += \
3651         units/systemd-random-seed.service.in
3652
3653 # ------------------------------------------------------------------------------
3654 if ENABLE_BACKLIGHT
3655 rootlibexec_PROGRAMS += \
3656         systemd-backlight
3657
3658 nodist_systemunit_DATA += \
3659         units/systemd-backlight@.service
3660
3661 systemd_backlight_SOURCES = \
3662         src/backlight/backlight.c
3663
3664 systemd_backlight_LDADD = \
3665         libsystemd-label.la \
3666         libudev-internal.la \
3667         libsystemd-shared.la
3668 endif
3669
3670 EXTRA_DIST += \
3671         units/systemd-backlight@.service.in
3672
3673 # ------------------------------------------------------------------------------
3674 if ENABLE_RFKILL
3675 rootlibexec_PROGRAMS += \
3676         systemd-rfkill
3677
3678 nodist_systemunit_DATA += \
3679         units/systemd-rfkill@.service
3680
3681 systemd_rfkill_SOURCES = \
3682         src/rfkill/rfkill.c
3683
3684 systemd_rfkill_LDADD = \
3685         libsystemd-label.la \
3686         libudev-internal.la \
3687         libsystemd-shared.la
3688 endif
3689
3690 EXTRA_DIST += \
3691         units/systemd-rfkill@.service.in
3692
3693 # ------------------------------------------------------------------------------
3694 if HAVE_LIBCRYPTSETUP
3695 rootlibexec_PROGRAMS += \
3696         systemd-cryptsetup
3697
3698 systemgenerator_PROGRAMS += \
3699         systemd-cryptsetup-generator
3700
3701 dist_systemunit_DATA += \
3702         units/cryptsetup.target
3703
3704 systemd_cryptsetup_SOURCES = \
3705         src/cryptsetup/cryptsetup.c
3706
3707 systemd_cryptsetup_CFLAGS = \
3708         $(AM_CFLAGS) \
3709         $(LIBCRYPTSETUP_CFLAGS)
3710
3711 systemd_cryptsetup_LDADD = \
3712         libsystemd-label.la \
3713         libudev-internal.la \
3714         libsystemd-shared.la \
3715         $(LIBCRYPTSETUP_LIBS)
3716
3717 systemd_cryptsetup_generator_SOURCES = \
3718         src/cryptsetup/cryptsetup-generator.c
3719
3720 systemd_cryptsetup_generator_LDADD = \
3721         libsystemd-label.la \
3722         libsystemd-shared.la
3723
3724 SYSINIT_TARGET_WANTS += \
3725         cryptsetup.target
3726
3727 endif
3728
3729 # ------------------------------------------------------------------------------
3730 if ENABLE_HOSTNAMED
3731 systemd_hostnamed_SOURCES = \
3732         src/hostname/hostnamed.c
3733
3734 systemd_hostnamed_LDADD = \
3735         libsystemd-label.la \
3736         libsystemd-internal.la \
3737         libsystemd-id128-internal.la \
3738         libsystemd-daemon-internal.la \
3739         libsystemd-shared.la
3740
3741 rootlibexec_PROGRAMS += \
3742         systemd-hostnamed
3743
3744 nodist_systemunit_DATA += \
3745         units/systemd-hostnamed.service
3746
3747 dist_systemunit_DATA += \
3748         units/org.freedesktop.hostname1.busname
3749
3750 dist_dbuspolicy_DATA += \
3751         src/hostname/org.freedesktop.hostname1.conf
3752
3753 dist_dbussystemservice_DATA += \
3754         src/hostname/org.freedesktop.hostname1.service
3755
3756 polkitpolicy_files += \
3757         src/hostname/org.freedesktop.hostname1.policy
3758
3759 SYSTEM_UNIT_ALIASES += \
3760         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3761
3762 BUSNAMES_TARGET_WANTS += \
3763         org.freedesktop.hostname1.busname
3764
3765 hostnamectl_SOURCES = \
3766         src/hostname/hostnamectl.c
3767
3768 hostnamectl_LDADD = \
3769         libsystemd-internal.la \
3770         libsystemd-id128-internal.la \
3771         libsystemd-daemon-internal.la \
3772         libsystemd-shared.la
3773
3774 bin_PROGRAMS += \
3775         hostnamectl
3776
3777 dist_bashcompletion_DATA += \
3778         shell-completion/bash/hostnamectl
3779
3780 dist_zshcompletion_DATA += \
3781         shell-completion/zsh/_hostnamectl
3782
3783 endif
3784
3785 polkitpolicy_in_files += \
3786         src/hostname/org.freedesktop.hostname1.policy.in
3787
3788 EXTRA_DIST += \
3789         units/systemd-hostnamed.service.in
3790
3791 # ------------------------------------------------------------------------------
3792 if ENABLE_KDBUS
3793 systemd_bus_driverd_SOURCES = \
3794         src/bus-driverd/bus-driverd.c
3795
3796 systemd_bus_driverd_LDADD = \
3797         libsystemd-internal.la \
3798         libsystemd-id128-internal.la \
3799         libsystemd-daemon-internal.la \
3800         libsystemd-shared.la
3801
3802 rootlibexec_PROGRAMS += \
3803         systemd-bus-driverd
3804
3805 nodist_systemunit_DATA += \
3806         units/systemd-bus-driverd.service
3807
3808 dist_systemunit_DATA += \
3809         units/org.freedesktop.DBus.busname
3810
3811 BUSNAMES_TARGET_WANTS += \
3812         org.freedesktop.DBus.busname
3813
3814 nodist_userunit_DATA += \
3815         units/user/systemd-bus-driverd.service
3816
3817 USER_BUSNAMES_TARGET_WANTS += \
3818         org.freedesktop.DBus.busname
3819
3820 USER_UNIT_ALIASES += \
3821         $(systemunitdir)/org.freedesktop.DBus.busname org.freedesktop.DBus.busname
3822 endif
3823
3824 EXTRA_DIST += \
3825         units/systemd-bus-driverd.service.in \
3826         units/user/systemd-bus-driverd.service.in
3827
3828 # ------------------------------------------------------------------------------
3829 if ENABLE_LOCALED
3830 systemd_localed_SOURCES = \
3831         src/locale/localed.c
3832
3833 systemd_localed_LDADD = \
3834         libsystemd-label.la \
3835         libsystemd-internal.la \
3836         libsystemd-id128-internal.la \
3837         libsystemd-daemon-internal.la \
3838         libsystemd-shared.la
3839
3840 nodist_systemunit_DATA += \
3841         units/systemd-localed.service
3842
3843 dist_systemunit_DATA += \
3844         units/org.freedesktop.locale1.busname
3845
3846 rootlibexec_PROGRAMS += \
3847         systemd-localed
3848
3849 dist_dbuspolicy_DATA += \
3850         src/locale/org.freedesktop.locale1.conf
3851
3852 dist_dbussystemservice_DATA += \
3853         src/locale/org.freedesktop.locale1.service
3854
3855 polkitpolicy_files += \
3856         src/locale/org.freedesktop.locale1.policy
3857
3858 SYSTEM_UNIT_ALIASES += \
3859         systemd-localed.service dbus-org.freedesktop.locale1.service
3860
3861 BUSNAMES_TARGET_WANTS += \
3862         org.freedesktop.locale1.busname
3863
3864 dist_pkgdata_DATA += \
3865         src/locale/kbd-model-map
3866
3867 dist_noinst_SCRIPT = \