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