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