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