#
# Set component roots via envvar <feature>_PATH. Also available for
# customization: CC, RC, AR, CPPFLAGS, LDFLAGS, LIBS, CFLAGS, RCFLAGS,
-# ARCH[=custom], CURL_LDFLAGS_BIN, CURL_LDFLAGS_LIB, CURL_DLL_SUFFIX,
+# ARCH[=custom], CROSSPREFIX, CURL_LDFLAGS_BIN, CURL_LDFLAGS_LIB, CURL_DLL_SUFFIX,
# and more for individual components (see below).
# This script is reused by 'src' and 'docs/examples' Makefile.m32 scripts.
CPPFLAGS += -I. -I$(PROOT)/include
RCFLAGS += -I$(PROOT)/include
+CC := $(CROSSPREFIX)$(CC)
+AR := $(CROSSPREFIX)$(AR)
+RC ?= $(CROSSPREFIX)windres
+
ifneq ($(ARCH),custom)
# Set environment var ARCH to your architecture to override auto-detection.
ifndef ARCH
### Global rules
-RC ?= windres
-
ifneq ($(findstring /sh,$(SHELL)),)
DEL = rm -f $1
COPY = -cp -afv $1 $2
all: $(TARGETS)
%.o: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+ $(CC) -W -Wall $(CFLAGS) $(CPPFLAGS) -c $<
%.res: %.rc
$(RC) -O coff $(RCFLAGS) -i $< -o $@