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