Modified Mingw32 makefiles to compile with Mingw32 2.95 or earlier;
some wxMSW/gcc compile fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4b3d29db08
commit
1a7f306263
@ -51,7 +51,10 @@ Instructions are similar to those for Regular Mingw32 except
|
||||
PLEASE APPLY THESE PATCHES BY HAND! There are apparently a few
|
||||
different versions of the headers floating around.
|
||||
|
||||
->copy wxWin\src\makeg295.env to wxWin\src\makeg95.env
|
||||
->Edit wx/src/makeg95.env and set the MINGW32 variable at the top of
|
||||
the file to either 1 (you have Mingw32) or 0 (you have Cygwin32).
|
||||
If using MINGW32, also set the MINGW32VERSION variable
|
||||
appropriately.
|
||||
|
||||
|
||||
c) Build instructions
|
||||
@ -81,7 +84,6 @@ c) Build instructions
|
||||
|
||||
-> type: cd c:\wxWin\src\msw
|
||||
-> type: make -f makefile.g95 (if using GNU tools)
|
||||
or type: make -f makefile.g295 (if using Mingw32/gcc-2.95)
|
||||
or type: make -f makefile.vc (if using MS VC++)
|
||||
|
||||
|
||||
|
@ -919,3 +919,15 @@ samples/wizard/*.png
|
||||
samples/wizard/*.ico
|
||||
samples/wizard/*.txt
|
||||
|
||||
samples/console/*.cpp
|
||||
samples/console/*.h
|
||||
samples/console/makefile*
|
||||
samples/console/*.rc
|
||||
samples/console/*.def
|
||||
samples/console/*.bmp
|
||||
samples/console/*.xpm
|
||||
samples/console/*.xbm
|
||||
samples/console/*.png
|
||||
samples/console/*.ico
|
||||
samples/console/*.txt
|
||||
|
||||
|
@ -28,22 +28,39 @@
|
||||
next if $wxCommon{$file} =~ /\b(16)\b/;
|
||||
|
||||
#! needs extra files (sql*.h) so not compiled by default.
|
||||
next if $file =~ /^odbc\./;
|
||||
#! next if $file =~ /^odbc\./;
|
||||
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " "
|
||||
if ( $file =~ /^odbc\./ )
|
||||
{
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"ADVANCEDOBJS"} .= '$(COMMDIR)/' . $file . " "
|
||||
}
|
||||
else
|
||||
{
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " "
|
||||
}
|
||||
}
|
||||
|
||||
foreach $file (sort keys %wxMSW) {
|
||||
#! Mingw32 doesn't have the OLE headers and has some troubles with
|
||||
#! socket code
|
||||
next if $wxMSW{$file} =~ /\b(O|16)\b/;
|
||||
|
||||
#! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
|
||||
next if $file =~ /^dirdlg\./;
|
||||
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"WXMSWOBJS"} .= '$(MSWDIR)/' . $file . " "
|
||||
next if $wxMSW{$file} =~ /\b(16)\b/;
|
||||
|
||||
#! Mingw32 doesn't have the OLE headers and has some troubles with
|
||||
#! socket code, so put in ADVANCEDOBJS
|
||||
if ( $wxMSW{$file} =~ /\b(O)\b/ )
|
||||
{
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"ADVANCEDOBJS"} .= '$(MSWDIR)/ole/' . $file . " "
|
||||
}
|
||||
else
|
||||
{
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"WXMSWOBJS"} .= '$(MSWDIR)/' . $file . " "
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach $file (sort keys %wxHTML) {
|
||||
@ -102,6 +119,9 @@ HTMLOBJS = \
|
||||
MSWOBJS = \
|
||||
#$ ExpandList("WXMSWOBJS");
|
||||
|
||||
ADVANCEDOBJS = \
|
||||
#$ ExpandList("ADVANCEDOBJS");
|
||||
|
||||
ZLIBOBJS = \
|
||||
$(ZLIBDIR)/adler32.$(OBJSUFF) \
|
||||
$(ZLIBDIR)/compress.$(OBJSUFF) \
|
||||
@ -197,7 +217,20 @@ XPMOBJECTS = $(XPMDIR)/crbuffri.o\
|
||||
$(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o
|
||||
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(ADVANCEDOBJS) # $(XPMOBJECTS)
|
||||
|
||||
ifeq ($(MINGW32),1)
|
||||
ifeq ($(MINGW32VERSION),2.95)
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) $(ADVANCEDOBJS) # $(XPMOBJECTS)
|
||||
else
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS)
|
||||
endif
|
||||
else
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS)
|
||||
endif
|
||||
|
||||
all: $(OBJECTS) $(WXLIB)
|
||||
|
||||
@ -247,21 +280,21 @@ $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
|
||||
# mv y.tab.c $(COMMDIR)/y_tab.c
|
||||
|
||||
clean:
|
||||
-erase *.o
|
||||
-erase *.bak
|
||||
-erase core
|
||||
-erase ..\common\y_tab.c
|
||||
-erase ..\common\lex_yy.c
|
||||
-erase ..\common\*.o
|
||||
-erase ..\common\*.bak
|
||||
-erase ..\generic\*.o
|
||||
-erase ..\generic\*.bak
|
||||
-erase ..\html\*.o
|
||||
-erase ..\png\*.o
|
||||
-erase ..\png\*.bak
|
||||
-erase ..\zlib\*.o
|
||||
-erase ..\zlib\*.bak
|
||||
-erase ..\jpeg\*.o
|
||||
-erase ..\..\lib\libwx.a
|
||||
rm -f *.o
|
||||
rm -f *.bak
|
||||
rm -f core
|
||||
rm -f ..\common\y_tab.c
|
||||
rm -f ..\common\lex_yy.c
|
||||
rm -f ..\common\*.o
|
||||
rm -f ..\common\*.bak
|
||||
rm -f ..\generic\*.o
|
||||
rm -f ..\generic\*.bak
|
||||
rm -f ..\html\*.o
|
||||
rm -f ..\png\*.o
|
||||
rm -f ..\png\*.bak
|
||||
rm -f ..\zlib\*.o
|
||||
rm -f ..\zlib\*.bak
|
||||
rm -f ..\jpeg\*.o
|
||||
rm -f ..\..\lib\libwx.a
|
||||
|
||||
cleanall: clean
|
||||
|
@ -190,6 +190,8 @@ downloaded from the <a href="http://www.wxwindows.org">wxWindows Web site</a>.<P
|
||||
supported platforms (currently Windows and GTK only).
|
||||
<li><a href="../../samples/config">config</a>: demonstrates use of wxConfig, which
|
||||
defaults to wxRegConfig on WIN32, wxIniConfig on WIN16, and wxFileConfig on other platforms.
|
||||
<li><a href="../../samples/console">console</a>: demonstrates a console application using
|
||||
console-mode (no-GUI) compilation of wxWindows.
|
||||
<li><a href="../../samples/controls">controls</a>: sample showing a variety of controls, including
|
||||
wxNotebook.
|
||||
<li><a href="../../samples/db">db</a>: wxDB ODBC sample.
|
||||
|
@ -211,10 +211,16 @@ Compiling using the makefiles:
|
||||
'make -f makefile.b32 FINAL=1'
|
||||
for the library and samples.
|
||||
|
||||
Note: the wxWindows library and (some) samples compile in 16-bit mode
|
||||
Note (1): the wxWindows library and (some) samples compile in 16-bit mode
|
||||
using makefile.bcc, but at present the wxWindows resource system is switched
|
||||
off in this mode. See issues.txt for details.
|
||||
|
||||
Note (2): the wxWindows makefiles assume byte structure alignment. Please
|
||||
make sure that your own project or makefile settings use the
|
||||
same alignment, or you could experience mysterious crashes. To
|
||||
change the alignment, add a suitable option to the $(CFG) target code
|
||||
in src/msw/makefile.b32.
|
||||
|
||||
Compiling using the IDE files:
|
||||
|
||||
1. Load src\bc32.ide (or src\bc32d.ide for a debugging version).
|
||||
@ -342,10 +348,10 @@ Here are the steps required:
|
||||
- For Cygwin, make sure there's a \tmp directory on your
|
||||
Windows drive or bison will crash.
|
||||
|
||||
- makeg95.env configuation:
|
||||
|
||||
- Edit wx/src/makeg95.env and set the MINGW32 variable at the top of
|
||||
the file to either 1 (you have Mingw32) or 0 (you have Cygwin32).
|
||||
If using MINGW32, also set the MINGW32VERSION variable
|
||||
appropriately.
|
||||
|
||||
- Mingw32 may not support winsock.h, so if you have a problem
|
||||
here, comment out socket-related files in src/msw/makefile.g95.
|
||||
|
@ -138,8 +138,10 @@
|
||||
// we are setting this define because of the complex check
|
||||
// using NORLANDER as Cygwin may follow. (header author is Anders Norlander)
|
||||
#if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
|
||||
#ifndef wxUSE_NORLANDER_HEADERS
|
||||
# define wxUSE_NORLANDER_HEADERS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -337,7 +337,13 @@
|
||||
// complains about deallocating
|
||||
// arrays of wxPoints if wxPoint is a class.
|
||||
|
||||
#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__)&&!defined(wxUSE_NORLANDER_HEADERS))
|
||||
#if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
|
||||
#ifndef wxUSE_NORLANDER_HEADERS
|
||||
# define wxUSE_NORLANDER_HEADERS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS))
|
||||
// Can't use OLE drag and drop in Windows 3.1 because we don't know how
|
||||
// to implement UUIDs
|
||||
// GnuWin32 doesn't have appropriate headers for e.g. IUnknown.
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "wx/string.h"
|
||||
#include "wx/splitter.h"
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow)
|
||||
|
@ -7,7 +7,10 @@
|
||||
|
||||
# If using Cygwin, set this to 0.
|
||||
# If using Mingw32, set this to 1.
|
||||
MINGW32=0
|
||||
MINGW32=1
|
||||
|
||||
# Set to the version you have
|
||||
MINGW32VERSION=2.95
|
||||
|
||||
########################## Compiler ##################################
|
||||
|
||||
@ -15,9 +18,13 @@ MINGW32=0
|
||||
# Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95
|
||||
|
||||
ifeq ($(MINGW32),1)
|
||||
CC = gcc --pipe -fvtable-thunks
|
||||
ifeq ($(MINGW32VERSION),2.95)
|
||||
CC = gcc --pipe -fvtable-thunks
|
||||
else
|
||||
CC = gcc
|
||||
endif
|
||||
else
|
||||
CC = gcc
|
||||
CC = gcc
|
||||
endif
|
||||
|
||||
# C compiler for pure C programs
|
||||
@ -119,6 +126,14 @@ WXINC=$(WXDIR)/include
|
||||
WXBASESRC=$(WXDIR)/src/common
|
||||
WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
|
||||
|
||||
GNUWIN32EXTRA=-I$(WXDIR)/include/wx/msw/gnuwin32
|
||||
|
||||
ifeq ($(MINGW32),1)
|
||||
ifeq ($(MINGW32),2.95)
|
||||
GNUWIN32EXTRA=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MINGW32),1)
|
||||
INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
|
||||
else
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
# This file was automatically generated by tmake at 15:16, 1999/10/21
|
||||
# This file was automatically generated by tmake at 12:32, 1999/10/22
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
|
||||
|
||||
#
|
||||
@ -258,6 +258,15 @@ MSWOBJS = \
|
||||
$(MSWDIR)/window.$(OBJSUFF) \
|
||||
$(MSWDIR)/xpmhand.$(OBJSUFF)
|
||||
|
||||
ADVANCEDOBJS = \
|
||||
$(COMMDIR)/odbc.$(OBJSUFF) \
|
||||
$(MSWDIR)/ole/automtn.$(OBJSUFF) \
|
||||
$(MSWDIR)/ole/dataobj.$(OBJSUFF) \
|
||||
$(MSWDIR)/ole/dropsrc.$(OBJSUFF) \
|
||||
$(MSWDIR)/ole/droptgt.$(OBJSUFF) \
|
||||
$(MSWDIR)/ole/oleutils.$(OBJSUFF) \
|
||||
$(MSWDIR)/ole/uuid.$(OBJSUFF)
|
||||
|
||||
ZLIBOBJS = \
|
||||
$(ZLIBDIR)/adler32.$(OBJSUFF) \
|
||||
$(ZLIBDIR)/compress.$(OBJSUFF) \
|
||||
@ -353,7 +362,20 @@ XPMOBJECTS = $(XPMDIR)/crbuffri.o\
|
||||
$(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o
|
||||
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(ADVANCEDOBJS) # $(XPMOBJECTS)
|
||||
|
||||
ifeq ($(MINGW32),1)
|
||||
ifeq ($(MINGW32VERSION),2.95)
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) $(ADVANCEDOBJS) # $(XPMOBJECTS)
|
||||
else
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS)
|
||||
endif
|
||||
else
|
||||
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \
|
||||
$(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS)
|
||||
endif
|
||||
|
||||
all: $(OBJECTS) $(WXLIB)
|
||||
|
||||
@ -403,21 +425,21 @@ $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
|
||||
# mv y.tab.c $(COMMDIR)/y_tab.c
|
||||
|
||||
clean:
|
||||
-erase *.o
|
||||
-erase *.bak
|
||||
-erase core
|
||||
-erase ..\common\y_tab.c
|
||||
-erase ..\common\lex_yy.c
|
||||
-erase ..\common\*.o
|
||||
-erase ..\common\*.bak
|
||||
-erase ..\generic\*.o
|
||||
-erase ..\generic\*.bak
|
||||
-erase ..\html\*.o
|
||||
-erase ..\png\*.o
|
||||
-erase ..\png\*.bak
|
||||
-erase ..\zlib\*.o
|
||||
-erase ..\zlib\*.bak
|
||||
-erase ..\jpeg\*.o
|
||||
-erase ..\..\lib\libwx.a
|
||||
rm -f *.o
|
||||
rm -f *.bak
|
||||
rm -f core
|
||||
rm -f ..\common\y_tab.c
|
||||
rm -f ..\common\lex_yy.c
|
||||
rm -f ..\common\*.o
|
||||
rm -f ..\common\*.bak
|
||||
rm -f ..\generic\*.o
|
||||
rm -f ..\generic\*.bak
|
||||
rm -f ..\html\*.o
|
||||
rm -f ..\png\*.o
|
||||
rm -f ..\png\*.bak
|
||||
rm -f ..\zlib\*.o
|
||||
rm -f ..\zlib\*.bak
|
||||
rm -f ..\jpeg\*.o
|
||||
rm -f ..\..\lib\libwx.a
|
||||
|
||||
cleanall: clean
|
||||
|
@ -417,7 +417,7 @@ wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const
|
||||
delete [] formats;
|
||||
}
|
||||
|
||||
return n < nFormats ? format : wxDF_INVALID;
|
||||
return (n < nFormats) ? (wxDataFormat) format : (wxDataFormat) wxDF_INVALID;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -87,6 +87,10 @@ SOURCE=.\common\choiccmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\clipcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\cmndata.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -119,6 +123,10 @@ SOURCE=.\common\dcbase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\dobjcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\dlgcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -93,6 +93,10 @@ SOURCE=.\common\choiccmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\clipcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\cmndata.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -125,6 +129,10 @@ SOURCE=.\common\dcbase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\dobjcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\dlgcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -100,6 +100,10 @@ SOURCE=.\common\choiccmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\clipcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\cmndata.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -132,6 +136,10 @@ SOURCE=.\common\dcbase.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\dobjcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\dlgcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
Loading…
Reference in New Issue
Block a user