[PATCH 2/5] build: cross compile wayland-scanner
mchalain [marc.chalain@gmail.com]
marc.chalain at gmail.com
Mon Sep 23 02:12:59 PDT 2013
From: mchalain <marc.chalain at gmail.com>
the wayland-scanner files are build with CC_FOR_BUILD instead CC like the other files.
CC_FOR_BUILD could be initialize by autotool but here it's still hard coded to "gcc"
---
src/Makefile.am | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 35230bc..a5d7f62 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,9 @@ pkgconfig_DATA = wayland-client.pc wayland-server.pc
AM_CPPFLAGS = $(FFI_CFLAGS)
AM_CFLAGS = $(GCC_CFLAGS)
+CC_FOR_BUILD = gcc
+CCLD_FOR_BUILD = $(CC_FOR_BUILD)
+COMPILE_FOR_BUILD = $(CC_FOR_BUILD)
protocoldir = $(top_srcdir)/protocol
@@ -49,16 +52,18 @@ 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 $@ $<
+build-%.o : %.c
+ $(AM_V_CC)$(COMPILE_FOR_BUILD) -MT $@ -MD -MP -MF $(DEPDIR)/build-$*.Tpo -c -o $@ $<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/build-$*.Tpo $(DEPDIR)/build-$*.Po
bin_PROGRAMS = wayland-scanner
wayland_scanner_SOURCES = \
- scanner-scanner.c \
- scanner-wayland-util.c
+ build-scanner.c \
+ build-wayland-util.c
wayland_scanner_LDADD = $(EXPAT_LIBS)
+wayland_scanner_LINK = $(CCLD_FOR_BUILD) -o $@
$(BUILT_SOURCES) : wayland-scanner
--
1.7.9.5
More information about the wayland-devel
mailing list