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