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