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