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