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