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