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