# Set to the appropriate remove command
RM=rm -f
-# Set to the appropriate copy command and separator
+# Set to the appropriate copy command
COPY=cp
+# Cross compiling? Provide the target prefix (eg., i386-mingw32-)
+# CROSS=i386-mingw32-
+
########################## Compiler ##################################
# C++ compiler
ifeq ($(MINGW32),1)
ifneq "$(findstring 2.95, $(MINGW32VERSION))" ""
- CC = gcc --pipe -fvtable-thunks
+ CC = $(CROSS)gcc --pipe -fvtable-thunks
else
- CC = gcc
+ CC = $(CROSS)gcc
endif
else
- CC = gcc
+ CC = $(CROSS)gcc
endif
# C compiler for pure C programs
CCC = $(CC)
# Compiler used for LEX generated C
-CCLEX=gcc
+CCLEX=$(CROSS)gcc
# GRG: This shouldn't be here! make is supposed to define the
# MAKE variable itself.
#YACC=bison
# Settings for Cyginw/Mingw32
-RESCOMP=windres
+RESCOMP=$(CROSS)windres
RCINPUTSWITCH=-i
RCOUTPUTSWITCH=-o
RCINCSWITCH=--include-dir
RCDEFSWITCH=--define
+RCPREPROCESSOR=--preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED"
-RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
+RESFLAGS=$(RCPREPROCESSOR) $(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__
# Needed to build a DLL if your linker does not support --shared option.
-AS = as
-DLLTOOL = dlltool
+AS = $(CROSS)as
+DLLTOOL = $(CROSS)dlltool
########################## Compiler flags #############################
# Options for ar archiver
# AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
-AR = ar
+AR = $(CROSS)ar
AROPTIONS = ruv
-RANLIB = ranlib
+RANLIB = $(CROSS)ranlib
# Extra compiler libraries
COMPLIBS=