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