Cross-compilation fails when using the --host configure option
since the cross-compiler is not invoked by the hand-made Makefiles
in doc/examples.
The CC variable must be passed explicitly to ensure the host's
default compiler is not invoked.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
cp -fR $(srcdir)/$$subdir $(builddir); \
done; \
fi
- $(MAKE) -f dist-files/Makefile AM_CPPFLAGS="$(CPPFLAGS) -I../../../urcu/ -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all
+ $(MAKE) -f dist-files/Makefile AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I../../../urcu/ -I../../../" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../.libs/ -Wl,-rpath="$(PWD)/../../.libs/"' $(AM_MAKEFLAGS) all
clean-local:
$(MAKE) -f dist-files/Makefile $(AM_MAKEFLAGS) clean
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifndef CC
-CC = gcc
+ifdef AM_CC
+CC = $(AM_CC)
endif
CFLAGS = -g -O2 -Wall