From 95f102ab59fb99cb9f925cd4e2558f42fc7e2f3e Mon Sep 17 00:00:00 2001 From: Chris Elliott Date: Wed, 4 Sep 2002 10:47:11 +0000 Subject: [PATCH] Introducing wxBase for borland based on Michael Fieldings patch 598106 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tmake/b32.t | 3 - distrib/msw/tmake/b32base.t | 315 ++++++++++++++++++++++++++++++++++ distrib/msw/tmake/makeall.bat | 1 + distrib/msw/tmake/makeall.sh | 1 + 4 files changed, 317 insertions(+), 3 deletions(-) create mode 100644 distrib/msw/tmake/b32base.t diff --git a/distrib/msw/tmake/b32.t b/distrib/msw/tmake/b32.t index fec308a4d3..8e0bdbe621 100644 --- a/distrib/msw/tmake/b32.t +++ b/distrib/msw/tmake/b32.t @@ -368,14 +368,11 @@ $(WIN95FLAG) ! $(CFG) clean: $(PERIPH_CLEAN_TARGET) - -erase $(LIBTARGET) - -erase $(WXLIBDIR)\wx.dll -erase $(WXLIBDIR)\wx.tds -erase $(WXLIBDIR)\wx.il? -erase *.obj -erase *.pch -erase *.csm - -erase *.cfg -erase "wx32.#??" -erase ..\common\y_tab.c -erase ..\common\lex_yy.c diff --git a/distrib/msw/tmake/b32base.t b/distrib/msw/tmake/b32base.t new file mode 100644 index 0000000000..a2ac5b0539 --- /dev/null +++ b/distrib/msw/tmake/b32base.t @@ -0,0 +1,315 @@ +#!############################################################################# +#! File: baseb32.t +#! Purpose: tmake template file from which makebase.b32 is generated by running +#! tmake -t b32 wxwin.pro +#! Author: Michael Fielding +#! Created: 6-08-02 +#! Version: $Id$ +#!############################################################################# + +#${ + #! include the code which parses filelist.txt file and initializes + #! %wxCommon, %wxGeneric and %wxMSW hashes. + IncludeTemplate("filelist.t"); + + #! now transform these hashes into $project tags + foreach $file (sort keys %wxCommon) { + next if $wxCommon{$file} !~ /\bB\b/; + + $isCFile = $file =~ /\.c$/; + $file =~ s/cp?p?$/obj/; + $obj = "\$(MSWDIR)\\" . $file . " "; + $project{"WXCOMMONOBJS"} .= $obj; + $project{"WXCOBJS"} .= $obj if $isCFile; + } + + foreach $file (sort keys %wxMSW) { + next if $wxMSW{$file} !~ /\bB\b/; + + $isCFile = $file =~ /\.c$/; + + my $isOleObj = $wxMSW{$file} =~ /\bO\b/; + $file =~ s/cp?p?$/obj/; + my $obj = "\$(MSWDIR)\\" . $file . " "; + + $project{"WXMSWOBJS"} .= $obj; + if ( $isOleObj ) { + #! remember that this file is in ole subdir + $project{"WXOLEOBJS"} .= $obj; + } + $project{"WXCOBJS"} .= $obj if $isCFile; + } + + foreach $file (sort keys %wxBase) { + $isCFile = $file =~ /\.c$/; + $file =~ s/cp?p?$/obj/; + $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " "; + $project{"WXCOBJS"} .= $obj if $isCFile; + } +#$} + + + +# This file was automatically generated by tmake +# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! + +# +# File: makebase.b32 +# Author: Julian Smart +# Created: 1998 +# Updated: Michael Fielding, 2002 +# Copyright: +# +# "%W% %G%" +# +# Makefile : Builds wxWindows library wxbase.lib for MS Windows, +# and Borland C++ (32-bit). + +# BCCDIR now defined in ../makeb32.env + +!if "$(WXWIN)" == "" +!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx +!endif + +WXDIR = $(WXWIN) +THISDIR = $(WXDIR)\src\msw + +# Set all these to 1 if you want to build a dynamic library +!if "$(DLL)" == "1" +WXMAKINGDLL=1 +WXBUILDDLL=1 +!endif + +wxUSE_GUI=0 + +!include $(WXDIR)\src\makeb32.env + +PERIPH_LIBS= +PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET) +PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET) + +!if "$(DLL)" == "0" +DUMMY=dummy +!else +DUMMY=dummydll +LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex +!endif + +LIBTARGET=$(WXLIB) + +GENDIR=..\generic +COMMDIR=..\common +HTMLDIR=..\html +OLEDIR=.\ole +MSWDIR=. + +DOCDIR = $(WXDIR)\docs + +COMMONOBJS = \ + $(MSWDIR)\y_tab.obj \ + #$ ExpandList("WXCOMMONOBJS"); + +MSWOBJS = #$ ExpandList("WXMSWOBJS"); + +OBJECTS = $(COMMONOBJS) $(MSWOBJS) + +default: wx + +wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) + +all: wx + +# Copy the in-CVS setup0.h to setup.h if necessary +makesetuph: + cd $(WXDIR)\include\wx\msw + if not exist setup.h copy setup0.h setup.h + cd $(WXDIR)\src\msw + +# Copy include\wx\msw\setup.h to the architecture-specific location +makearchsetuph: + copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH) + cd $(WXDIR)\src\msw + +$(ARCHINCDIR)\wx: + -mkdir $(ARCHINCDIR) + -mkdir $(ARCHINCDIR)\wx + +!if "$(DLL)" == "0" + +$(LIBTARGET): $(DUMMY).obj $(OBJECTS) + -erase $(WXLIB) + tlib "$(WXLIB)" /P1024 @&&! ++$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) +! + +!else + +$(LIBTARGET): $(DUMMY).obj $(OBJECTS) + -erase $(WXLIB) + -erase $(WXDLL) + $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! +c0d32.obj $(OBJECTS) +$(WXLIBDIR)\$(WXLIBNAME) +nul +$(PERIPH_LIBS) $(LIBS) +wxb32 +! + implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll +!endif + +dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h +dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res + +version.res: + brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc + +$(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c + +# cl @<< +# $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ +# << + +$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c + copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c + +$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c + copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c + + +#${ + $_ = $project{"WXMSWOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_ . ": "; + if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } + $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; + s/obj$/$suffix/; + $text .= $_ . "\n\n"; + } +#$} + +######################################################## +# Common objects (always compiled) + +#${ + $_ = $project{"WXCOMMONOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_ . ": "; + $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; + s/MSWDIR/COMMDIR/; + s/obj$/$suffix/; + $text .= $_ . "\n\n"; + } +#$} + + +all_utils: + cd $(WXDIR)\utils + ${MAKE} -f makefile.b32 + cd $(WXDIR)\src\msw + +all_samples: + cd $(WXDIR)\samples + ${MAKE} -f makefile.b32 + cd $(WXDIR)\src\msw + +all_execs: + cd $(WXDIR)\utils + ${MAKE} -f makefile.b32 all_execs + cd $(WXDIR)\src\msw + +png: $(CFG) + cd $(WXDIR)\src\png + ${MAKE} -f makefile.b32 wxUSE_GUI=0 + cd $(WXDIR)\src\msw + +clean_png: + cd $(WXDIR)\src\png + ${MAKE} -f makefile.b32 clean + cd $(WXDIR)\src\msw + +zlib: $(CFG) + cd $(WXDIR)\src\zlib + ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib + cd $(WXDIR)\src\msw + +clean_zlib: + cd $(WXDIR)\src\zlib + ${MAKE} -f makefile.b32 clean + cd $(WXDIR)\src\msw + +jpeg: $(CFG) + cd $(WXDIR)\src\jpeg + ${MAKE} -f makefile.b32 wxUSE_GUI=0 + cd $(WXDIR)\src\msw + +clean_jpeg: + cd $(WXDIR)\src\jpeg + ${MAKE} -f makefile.b32 clean + cd $(WXDIR)\src\msw + +regex: $(CFG) + cd $(WXDIR)\src\regex + ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib + cd $(WXDIR)\src\msw + +clean_regex: + cd $(WXDIR)\src\regex + ${MAKE} -f makefile.b32 clean + cd $(WXDIR)\src\msw + +tiff: $(CFG) + cd $(WXDIR)\src\tiff + ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib + cd $(WXDIR)\src\msw + +clean_tiff: + cd $(WXDIR)\src\tiff + ${MAKE} -f makefile.b32 clean + cd $(WXDIR)\src\msw + +$(CFG): makebase.b32 + copy &&! +-Hc +-H=$(WXDIR)\src\msw\wx32.csm +-3 +-d +-a1 # byte alignment +-R- +-X +-w-par +-w-aus +-w-hid # virtual function A hides virtual function B +-tWM +-tWC + +-I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR) +-I$(WXDIR)\include\wx\msw\gnuwin32 + +-L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk +-D__WXWIN__ +-D__WXMSW__ +-D__WINDOWS__ +-DWIN32 +$(OPT) +$(DEBUG_FLAGS) +$(WIN95FLAG) +! $(CFG) + +clean: $(PERIPH_CLEAN_TARGET) + -erase $(WXLIBDIR)\wx.tds + -erase $(WXLIBDIR)\wx.il? + -erase *.obj + -erase *.pch + -erase *.csm + -erase "wx32.#??" + -erase ..\common\y_tab.c + -erase ..\common\lex_yy.c + +cleanall: clean + +self: + cd $(WXWIN)\distrib\msw\tmake + tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) + copy makefile.$(MFTYPE) $(WXWIN)\src\msw diff --git a/distrib/msw/tmake/makeall.bat b/distrib/msw/tmake/makeall.bat index 65760aa864..5adeb0a694 100755 --- a/distrib/msw/tmake/makeall.bat +++ b/distrib/msw/tmake/makeall.bat @@ -49,6 +49,7 @@ echo Generating for Visual C++ 4.0... echo Generating for Borland C++ (32 bits)... %TM% -t b32 wxwin.pro -o %WXDIR%\src\msw\makefile.b32 %TM% -t b32univ wxwin.pro -o %WXDIR%\src\msw\makeuniv.b32 +%TM% -t b32base wxwin.pro -o %WXDIR%\src\msw\makebase.b32 echo Generating for Visual C++ 1.52... %TM% -t dos wxwin.pro -o %WXDIR%\src\msw\makefile.dos echo Generating for Borland C++ (16 bits)... diff --git a/distrib/msw/tmake/makeall.sh b/distrib/msw/tmake/makeall.sh index 67ae2bbfc3..b8e4935f19 100755 --- a/distrib/msw/tmake/makeall.sh +++ b/distrib/msw/tmake/makeall.sh @@ -23,6 +23,7 @@ do echo "Generating $mswdir/makefile.b32 for Borland C++ (32 bits)..." ./tmake -t b32 wxwin.pro -o $mswdir/makefile.b32 ;; ./tmake -t b32univ wxwin.pro -o $mswdir/makeuniv.b32 ;; + ./tmake -t b32base wxwin.pro -o $mswdir/makebase.b32 ;; bcc.t) echo "Generating $mswdir/makefile.bcc for Borland C++ (16 bits)..." -- 2.45.2