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