From 58a003cea37daa79525945317d169363d31e97ba Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Fri, 14 Jan 2000 10:01:56 +0000 Subject: [PATCH] Mumit Khan's patches for cross compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/makeg95.env | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/makeg95.env b/src/makeg95.env index 7dfcb53b0a..ace66917c3 100644 --- a/src/makeg95.env +++ b/src/makeg95.env @@ -27,9 +27,12 @@ LD_SUPPORTS_SHARED=yes # 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 @@ -37,19 +40,19 @@ COPY=cp 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. @@ -63,17 +66,18 @@ YACC=byacc #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 ############################# @@ -124,9 +128,9 @@ OPT = -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions # 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= -- 2.45.2