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