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