[PATCH 2/5] build: break the dependecy between wayland-scanner and libwayland-util.la
mchalain [marc.chalain@gmail.com]
marc.chalain at gmail.com
Thu Sep 5 03:15:23 PDT 2013
From: mchalain <marc.chalain at gmail.com>
libwayland-util.la is used by other wayland libraries and it contains more functions useless for wayland-scanner.
To build wayland-scanner without dependency with wayland libraries, the wayland-util.c is only linked to wayland-scanner.
Autotool doesn't allow to compile a file twice, but it's possible to change the name of the target file. wayland-util.c generates scanner-wayland-util.o .
---
src/Makefile.am | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 85006a3..254017f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,12 +49,16 @@ endif
include $(top_srcdir)/src/scanner.mk
if ENABLE_SCANNER
+scanner-%.o : %.c
+ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+
bin_PROGRAMS = wayland-scanner$(EXEEXT)
wayland_scanner_SOURCES = \
- scanner.c
+ scanner-scanner.c \
+ scanner-wayland-util.c
-wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
+wayland_scanner_LDADD = $(EXPAT_LIBS)
$(BUILT_SOURCES) : wayland-scanner$(EXEEXT)
--
1.7.9.5
More information about the wayland-devel
mailing list