From: Mattia Barbon Date: Wed, 3 Jul 2002 21:46:28 +0000 (+0000) Subject: Updated Makefiles for MinGW GCC 3.1 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/46c0c2dcf2b618a5701e73b6cda431e74899cc41 Updated Makefiles for MinGW GCC 3.1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/distrib/msw/tmake/g95.t b/distrib/msw/tmake/g95.t index ea576f935b..9de7c9be06 100644 --- a/distrib/msw/tmake/g95.t +++ b/distrib/msw/tmake/g95.t @@ -142,7 +142,7 @@ DOCDIR = $(WXDIR)/docs # Only use the WIN32 wxDirDialog if we have a recent # version of Mingw32 ifeq ($(MINGW32),1) - ifneq "$(findstring 2.95, $(MINGW32VERSION))" "" + ifneq "$(_GCC295)$(_GCC3)" "" DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF) else DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF) @@ -306,7 +306,7 @@ TIFFOBJS = $(TIFFDIR)/tif_aux.o \ $(TIFFDIR)/tif_zip.o ifeq ($(MINGW32),1) - ifneq "$(findstring 2.95, $(MINGW32VERSION))" "" + ifneq "$(_GCC295)$(_GCC3)" "" OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS) else OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) diff --git a/src/makeg95.env b/src/makeg95.env index e53d90b25c..9c1514fdd8 100644 --- a/src/makeg95.env +++ b/src/makeg95.env @@ -54,9 +54,15 @@ COPY=cp # C++ compiler # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95 +# _GCC295 means GCC is GCC 2.95 +# _GCC3 mans GCC is 3.x or better (can actually just be 3.1 or better +# for Cygwin/MinGW) +_GCC295=$(if $(findstring 2.95, $(MINGW32VERSION)), 1,) +_GCC3=$(if $(findstring 3., $(MINGW32VERSION)), 1,) + ifeq ($(MINGW32),1) - ifneq "$(findstring 2.95, $(MINGW32VERSION))" "" - CC = $(CROSS)gcc --pipe -fvtable-thunks + ifneq "$(_GCC295)$(_GCC3)" "" + CC = $(CROSS)gcc --pipe $(if $(_GCC3), , -fvtable-thunks) else CC = $(CROSS)gcc endif diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 5d96fc9929..1cb2601500 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -63,7 +63,7 @@ DOCDIR = $(WXDIR)/docs # Only use the WIN32 wxDirDialog if we have a recent # version of Mingw32 ifeq ($(MINGW32),1) - ifneq "$(findstring 2.95, $(MINGW32VERSION))" "" + ifneq "$(_GCC295)$(_GCC3)" "" DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF) else DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF) @@ -508,7 +508,7 @@ TIFFOBJS = $(TIFFDIR)/tif_aux.o \ $(TIFFDIR)/tif_zip.o ifeq ($(MINGW32),1) - ifneq "$(findstring 2.95, $(MINGW32VERSION))" "" + ifneq "$(_GCC295)$(_GCC3)" "" OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS) else OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) @@ -520,20 +520,12 @@ ifeq ($(wxUSE_GUI),0) OBJECTS = $(MSWOBJS_BASE) $(COMMONOBJS_BASE) $(COMMONOBJS_BASEONLY) $(GENERICOBJS_BASE) endif -# MBN: if anyone has a better solution for this kludge, step -# forward, *please* -# this tests is we are on cygwin or not ( will _not_ work if you are using -# ZSH on plain Win32, tought ); it uses the presence of "/" -# in the PATH variable - # how do you do "VAR=\" ? BLEAGH! BACKSLASH=$(subst a,\,a) -ifeq (,$(findstring /,$(PATH))) - IS_CYGWIN=0 +ifeq (,$(findstring $(OSTYPE),"cygwin!msys")) PATH_SEPARATOR:=$(BACKSLASH) PATH_SUBST=/ else - IS_CYGWIN=1 PATH_SEPARATOR=/ PATH_SUBST:=$(BACKSLASH) endif