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