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