#
MINGW32=1
+# set MIN_SUFFIX to nothing if you use only MinGW compiler, set it to
+# something MinGW-specific if you want to build wxWindows with more than one
+# compiler
+ifeq ($(MINGW32),1)
+ MIN_SUFFIX=_min
+else
+ MIN_SUFFIX=_cyg
+endif
+
# Set to your gcc version. Generally 'gcc --version' tells you
# which version you have. But it cannot distinguish between
# 2.95.2-1 and earlier suffix versions of 2.95 . In that case,
# on the command line like so: make WINE=1 -f makefile.g95
#WINE=1
+# Set this if you are using a cross-compiler, i.e. compiling on one system
+# the program for another one
+# CROSS=i386-mingw32-
+
# If we're using MSYS, or other utilities that use forward slashes,
# you need to set this when invoking the makefile from DOS, or the
# wrong separators will be assumed. However, if you're using MSYS,
# Define the C++ and C compiler respectively
ifndef WINE
-CXX = g++
-CC = gcc
+CXX = $(CROSS)g++
+CC = $(CROSS)gcc
else
CXX = wineg++
CC = winegcc
# Compiler used for LEX generated C
# For now at least, it can be the same as the regular C compiler
-CCLEX = $(CC)
+CCLEX = $(CROSS)$(CC)
# This shouldn't be needed as make is supposed to define this
# variable itself. Uncomment it if your make complains.
# Some versions of windres cannot cope with the --preprocessor
# option. Uncomment the RCPREPROCESSOR line below if yours can.
ifndef WINE
-RESCOMP=windres $(_USE_TEMP_FILE_IF_SUPPORTED)
+RESCOMP=$(CROSS)windres $(_USE_TEMP_FILE_IF_SUPPORTED)
else
RESCOMP=wrc
endif
RESFLAGS=$(RCPREPROCESSOR) $(RCINCSWITCH) $(WXDIR)/include $(RCEXTRAINC) $(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 = ruv
-AR = ar
-RANLIB = ranlib
+AR = $(CROSS)ar
+RANLIB = $(CROSS)ranlib
# Extra compiler libraries
COMPLIBS=
# png, jpeg, etc are exported from wx dll, so skip and save on link time.
LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(COMPLIBS)
else
- LIBS = $(EXTRALIBS) $(WXLIB) -lregex -lpng -ljpeg -lzlib -ltiff $(WINLIBS) $(COMPLIBS)
+ LIBS = $(EXTRALIBS) $(WXLIB) -lregex$(MIN_SUFFIX) -lpng$(MIN_SUFFIX) -ljpeg$(MIN_SUFFIX) -lzlib$(MIN_SUFFIX) -ltiff$(MIN_SUFFIX) $(WINLIBS) $(COMPLIBS)
endif
WINFLAGS = $(OBSOLETE_DEFINES) $(WINVERSION)
ifdef WXMAKINGDLL
EXTRADLLFLAGS = -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1
- WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).$(LIBSUFF)
+ WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT)$(MIN_SUFFIX).$(LIBSUFF)
endif
ifdef WXUSINGDLL
EXTRADLLFLAGS = -DWXUSINGDLL=1
- WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).$(LIBSUFF)
+ WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT)$(MIN_SUFFIX).$(LIBSUFF)
endif