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