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