Additional makefiles; changes for compilation with BC++ and GnuWin32

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-08 22:27:12 +00:00
parent f395c809b5
commit 27529614c2
31 changed files with 344 additions and 202 deletions

View File

@@ -30,6 +30,10 @@
#include <windows.h>
#endif
#ifdef LoadLibrary
#undef LoadLibrary
#endif
// ---------------------------------------------------------------------------
// Global variables
// ---------------------------------------------------------------------------
@@ -154,7 +158,11 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
#elif defined(__WINDOWS__)
lib_name += ".dll";
HMODULE handle = LoadLibrary(lib_name);
#ifdef UNICODE
HMODULE handle = LoadLibraryW(lib_name);
#else
HMODULE handle = LoadLibraryA(lib_name);
#endif
if (!handle)
return NULL;
#else

View File

@@ -3,6 +3,9 @@
#ifdef _MSC_VER
#include <io.h>
#endif
#ifdef __GNUWIN32__
#include <sys/unistd.h>
#endif
#include "wx/expr.h"

View File

@@ -12,6 +12,10 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "laywin.h"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

View File

@@ -51,14 +51,6 @@ RESFLAGS=--include-dir $(WXDIR)/include --define __WIN32__ --define __WIN95__ --
########################## Compiler flags #############################
# Miscellaneous compiler options
# Solaris/GCC: -DSVR4
# Solaris/GCC, dynamic library: -DSVR4 -fPIC
# FreeBDS 2.0: does not need -D_BSD - always defined
# AIX/CSet++: -+ -qsrcmsg -DSYSV
# AIX/GCC: -DSYSV -DAIX
# Data General: -DDG
# HP: -D_HPUX_SOURCE +a1 -Aa +d -z
# IRIX: -mips2
OPTIONS= # -D__MINGW32__ # -D__EGCS__
# Debugging information
@@ -95,10 +87,6 @@ RESSUFF=res
RSCSUFF=rsc
# Warnings
# AIX: comment out
# IRIX: -w -wlint,-fpiv
# These are for the GNU compiler. We now get the compiler to check for as
# many things as we can, to catch portability problems sooner.
WARN = -Wall
# Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
@@ -106,9 +94,6 @@ GUI = -D__WXMSW__ -D__WINDOWS__
# Optimization
# OPT = -O
# FreeBSD 2.0 with i486: OPT = -O2 -m486
# IRIX: -O2 #-O0 : no, -O1: quick, -O2: global -O3: full(register)
# Linux: -m486 # -O2 for optimization
OPT =
# Options for ar archiver
@@ -117,24 +102,11 @@ AROPTIONS = ruv
RANLIB = ranlib
# Compiler libraries: defaults to GCC libraries
# Solaris: -lgen -ldl -lsocket -lnsl
# and/or possibly -lucb, whatever that is... (-lucb CAUSES MOTIF FILE SELECTION PROBLEMS)
# or possibly -lgen -lsocket -L/usr/ccs/lib linbnsl.a
# GCC > 2.7.1 on Solaris: -lstdc++ -lc -lgen -ldl -lsocket -lnsl -lucb
# SGI: -lPW
# FreeBSD 2.0: -lg++ -lcompat
# FreeBSD 1.x: -lcompat doesn`t need, only -lg++ needed
# AIX: -lCns -lbsd
# G++ 2.7.0 requires -liostream too.
# IRIX: -lPW
#COMPLIBS=-lg++
#for win95
#COMPLIBS=-lgcc
# Compiler or system-specific include paths
# E.g. some SPARCStations need
# -I/usr/ucbinclude/sys
#added for win95
COMPPATHS=
########################## Directories ###############################
@@ -142,7 +114,7 @@ COMPPATHS=
WINLIBS=-lstdc++ -lgcc \
-lwinspool -lwinmm -lshell32 -loldnames \
-lcomctl32 -lctl3d32 -lodbc32
-lcomctl32 -lctl3d32 -lodbc32 -ladvapi32
# Shouldn't need to change these...
WXSRC=$(WXDIR)/src/msw

View File

@@ -14,7 +14,6 @@
#endif
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
@@ -1022,5 +1021,3 @@ HINSTANCE wxGetInstance()
#include "main.cpp"
#endif
#undef IN_WX_MAIN_CPP

View File

@@ -394,7 +394,7 @@ wxBitmap wxBitmap::GetBitmapForDC(wxDC& dc) const
LPBITMAPINFO lpDib;
void *lpBits = NULL;
wxASSERT( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != NULL) );
wxASSERT( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != 0) );
tmpBitmap.SetPalette(this->GetPalette());
memDC.SelectObject(tmpBitmap);

View File

@@ -26,7 +26,6 @@
*******************************************************************************/
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)

View File

@@ -75,10 +75,12 @@ GENERICOBJS= \
$(MSWDIR)\fontdlgg.obj \
$(MSWDIR)\gridg.obj \
$(MSWDIR)\helpxlp.obj \
$(MSWDIR)\laywin.obj \
$(MSWDIR)\msgdlgg.obj \
$(MSWDIR)\panelg.obj \
$(MSWDIR)\printps.obj \
$(MSWDIR)\prntdlgg.obj \
$(MSWDIR)\sashwin.obj \
$(MSWDIR)\scrolwin.obj \
$(MSWDIR)\splitter.obj \
$(MSWDIR)\statusbr.obj \
@@ -578,6 +580,8 @@ $(MSWDIR)\gridg.obj: $(GENDIR)\gridg.$(SRCSUFF)
$(MSWDIR)\helpxlp.obj: $(GENDIR)\helpxlp.$(SRCSUFF)
$(MSWDIR)\laywin.obj: $(GENDIR)\laywin.$(SRCSUFF)
$(MSWDIR)\msgdlgg.obj: $(GENDIR)\msgdlgg.$(SRCSUFF)
$(MSWDIR)\panelg.obj: $(GENDIR)\panelg.$(SRCSUFF)
@@ -586,6 +590,8 @@ $(MSWDIR)\printps.obj: $(GENDIR)\printps.$(SRCSUFF)
$(MSWDIR)\prntdlgg.obj: $(GENDIR)\prntdlgg.$(SRCSUFF)
$(MSWDIR)\sashwin.obj: $(GENDIR)\sashwin.$(SRCSUFF)
$(MSWDIR)\scrolwin.obj: $(GENDIR)\scrolwin.$(SRCSUFF)
$(MSWDIR)\splitter.obj: $(GENDIR)\splitter.$(SRCSUFF)

View File

@@ -65,10 +65,12 @@ GENERICOBJS= \
$(GENDIR)/fontdlgg.$(OBJSUFF) \
$(GENDIR)/gridg.$(OBJSUFF) \
$(GENDIR)/helpxlp.$(OBJSUFF) \
$(GENDIR)/laywin.$(OBJSUFF) \
$(GENDIR)/msgdlgg.$(OBJSUFF) \
$(GENDIR)/panelg.$(OBJSUFF) \
$(GENDIR)/printps.$(OBJSUFF) \
$(GENDIR)/prntdlgg.$(OBJSUFF) \
$(GENDIR)/sashwin.$(OBJSUFF) \
$(GENDIR)/scrolwin.$(OBJSUFF) \
$(GENDIR)/splitter.$(OBJSUFF) \
$(GENDIR)/statusbr.$(OBJSUFF) \
@@ -112,15 +114,29 @@ COMMONOBJS = \
$(COMMDIR)/list.$(OBJSUFF) \
$(COMMDIR)/string.$(OBJSUFF) \
$(COMMDIR)/time.$(OBJSUFF) \
$(COMMDIR)/tokenzr.$(OBJSUFF) \
$(COMMDIR)/y_tab.$(OBJSUFF) \
$(COMMDIR)/stream.$(OBJSUFF) \
$(COMMDIR)/fstream.$(OBJSUFF) \
$(COMMDIR)/mstream.$(OBJSUFF) \
$(COMMDIR)/zstream.$(OBJSUFF) \
$(COMMDIR)/datstrm.$(OBJSUFF) \
$(COMMDIR)/objstrm.$(OBJSUFF) \
$(COMMDIR)/extended.$(OBJSUFF) \
$(COMMDIR)/wincmn.$(OBJSUFF)
# Unfortunately, GnuWin32 fails with a syntax error in Sockets.h,
# so remove socket code.
# $(COMMDIR)/socket.$(OBJSUFF) \
# $(COMMDIR)/sckaddr.$(OBJSUFF) \
# $(COMMDIR)/sckfile.$(OBJSUFF) \
# $(COMMDIR)/sckipc.$(OBJSUFF) \
# $(COMMDIR)/sckstrm.$(OBJSUFF) \
# $(COMMDIR)/protocol.$(OBJSUFF) \
# $(COMMDIR)/http.$(OBJSUFF) \
# $(COMMDIR)/ftp.$(OBJSUFF) \
# $(COMMDIR)/url.$(OBJSUFF) \
MSWOBJS = \
accel.$(OBJSUFF) \
app.$(OBJSUFF) \
@@ -201,12 +217,14 @@ MSWOBJS = \
utils.$(OBJSUFF) \
utilsexc.$(OBJSUFF) \
wave.$(OBJSUFF) \
window.$(OBJSUFF) \
$(OLEDIR)/droptgt.$(OBJSUFF) \
$(OLEDIR)/dropsrc.$(OBJSUFF) \
$(OLEDIR)/dataobj.$(OBJSUFF) \
$(OLEDIR)/oleutils.$(OBJSUFF) \
$(OLEDIR)/uuid.$(OBJSUFF)
window.$(OBJSUFF)
# OLE not supported yet by GnuWin32 (?)
# $(OLEDIR)/droptgt.$(OBJSUFF) \
# $(OLEDIR)/dropsrc.$(OBJSUFF) \
# $(OLEDIR)/dataobj.$(OBJSUFF) \
# $(OLEDIR)/oleutils.$(OBJSUFF) \
# $(OLEDIR)/uuid.$(OBJSUFF)
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS)
@@ -255,46 +273,6 @@ $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
# Extra targets
prologio:
cd $(WXDIR)/utils/prologio/src ; $(MAKE) -f makefile.g95
cd $(WXDIR)/src/msw
clean_proio:
cd $(WXDIR)/utils/prologio/src; $(MAKE) -f makefile.g95 clean
cd $(WXDIR)/src/msw
makedib:
cd $(WXDIR)/src/msw/dib ; $(MAKE) -f makefile.g95
cd $(WXDIR)/src/msw
clean_dib:
cd $(WXDIR)/src/msw/dib; $(MAKE) -f makefile.g95 clean
cd $(WXDIR)/src/msw
gauge:
cd $(WXDIR)/src/msw/gauge; $(MAKE) -f makefile.g95
cd $(WXDIR)/src/msw
clean_gauge:
cd $(WXDIR)/src/msw/gauge; $(MAKE) -f makefile.g95 clean
cd $(WXDIR)/src/msw
wxstring:
cd $(WXDIR)/contrib/wxstring; $(MAKE) -f makefile.g95 OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)"
cd $(WXDIR)/src/msw
clean_wxstring:
cd $(WXDIR)/contrib/wxstring; $(MAKE) -f makefile.g95 clean
cd $(WXDIR)/src/msw
itsy:
cd $(WXDIR)/src/msw/itsybits; $(MAKE) -f makefile.g95
cd $(WXDIR)/src/msw
clean_itsy:
cd $(WXDIR)/contrib/itsybits; $(MAKE) -f makefile.g95 clean
cd $(WXDIR)/src/msw
rcparser:
cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95
cd $(WXDIR)/src/msw
@@ -303,14 +281,6 @@ clean_rcp:
cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean
cd $(WXDIR)/src/msw
# +++start steve161(09.04.1995): added for wxString in \contrib\wxstring
wxstring_ol:
cd ../../contrib/wxstring; $(MAKE) -f makefile.unx xview
wxstring_motif:
cd ../../contrib/wxstring; $(MAKE) -f makefile.unx motif
wxstring_hp:
cd ../../contrib/wxstring; $(MAKE) -f makefile.unx hp
clean:
rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core

View File

@@ -161,7 +161,11 @@ bool wxNotebook::Create(wxWindow *parent,
return FALSE;
}
SetWindowFont((HWND)m_hwnd, ::GetStockObject(DEFAULT_GUI_FONT), FALSE);
// Not all compilers recognise SetWindowFont
// SetWindowFont((HWND)m_hwnd, ::GetStockObject(DEFAULT_GUI_FONT), FALSE);
::SendMessage((HWND) m_hwnd, WM_SETFONT,
(WPARAM)::GetStockObject(DEFAULT_GUI_FONT),TRUE);
if ( parent != NULL )
parent->AddChild(this);

View File

@@ -22,7 +22,6 @@
#endif
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)

View File

@@ -22,7 +22,6 @@
#endif
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
@@ -30,8 +29,6 @@
#endif
#include <wx/setup.h>
#include <wx/log.h>
#include <windows.h>

View File

@@ -18,7 +18,6 @@
#endif
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)

View File

@@ -14,7 +14,6 @@
#endif
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)

View File

@@ -14,7 +14,6 @@
#endif
// For compilers that support precompilation, includes "wx.h".
#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)

View File

@@ -12,6 +12,10 @@
// - add high level functions (RegisterOleServer, ...)
///////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "registry.h"
#endif
// ============================================================================
// declarations
// ============================================================================

View File

@@ -85,8 +85,10 @@ example.obj: example.c zlib.h zconf.h
minigzip.obj: minigzip.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
lib: $(LIBTARGET)
# we must cut the command line to fit in the MS/DOS 128 byte limit:
$(LIBTARGET: $(OBJ1) $(OBJ2)
$(LIBTARGET): $(OBJ1) $(OBJ2)
del $(LIBTARGET)
$(LIB) $(LIBTARGET) +$(OBJP1)
$(LIB) $(LIBTARGET) +$(OBJP2)