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