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