From: mchalain <[email protected]>

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

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to