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