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