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