From 1997b8ba196182eceec6e54a0b9aaff3aa956eea Mon Sep 17 00:00:00 2001 From: Chris Elliott Date: Thu, 19 Jun 2003 09:21:07 +0000 Subject: [PATCH] fix making base for Borland git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tmake/b32base.t | 67 +++---- src/makeprog.b32 | 3 + src/msw/makebase.b32 | 376 +++++++++++++++++------------------- 3 files changed, 207 insertions(+), 239 deletions(-) diff --git a/distrib/msw/tmake/b32base.t b/distrib/msw/tmake/b32base.t index 9366f8c9e9..11854c5d5d 100644 --- a/distrib/msw/tmake/b32base.t +++ b/distrib/msw/tmake/b32base.t @@ -18,7 +18,7 @@ $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $obj = "\$(MSWDIR)\\" . $file . " "; + $obj = "\$(OBJ_PATH)\\" . $file . " "; $project{"WXCOMMONOBJS"} .= $obj; $project{"WXCOBJS"} .= $obj if $isCFile; } @@ -30,7 +30,7 @@ my $isOleObj = $wxMSW{$file} =~ /\bO\b/; $file =~ s/cp?p?$/obj/; - my $obj = "\$(MSWDIR)\\" . $file . " "; + my $obj = "\$(OBJ_PATH)\\" . $file . " "; $project{"WXMSWOBJS"} .= $obj; if ( $isOleObj ) { @@ -43,7 +43,7 @@ foreach $file (sort keys %wxBase) { $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " "; + $project{"WXCOMMONOBJS"} .= "\$(OBJ_PATH)\\" . $file . " "; $project{"WXCOBJS"} .= $obj if $isCFile; } #$} @@ -92,7 +92,7 @@ PERIPH_CLEAN_TARGET=clean_zlib clean_regex $(PERIPH_CLEAN_TARGET) DUMMY=dummy !else DUMMY=dummydll -LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex +LIBS= cw32mti import32 ole2w32 odbc32 zlib regex !endif LIBTARGET=$(WXLIB) @@ -114,10 +114,13 @@ OBJECTS = $(COMMONOBJS) $(MSWOBJS) default: wx -wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) +wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph makeoutdir $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) all: wx +makeoutdir: + -mkdir $(OBJ_PATH) + # Copy the in-CVS setup0.h to setup.h if necessary makesetuph: cd $(WXDIR)\include\wx\msw @@ -168,9 +171,11 @@ version.res: my @objs = split; foreach (@objs) { $text .= $_ . ": "; - if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; s/obj$/$suffix/; + s/OBJ_PATH/MSWDIR/; + if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } + $text .= $_ . "\n\n"; } #$} @@ -184,7 +189,7 @@ version.res: foreach (@objs) { $text .= $_ . ": "; $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; - s/MSWDIR/COMMDIR/; + s/OBJ_PATH/COMMDIR/; s/obj$/$suffix/; $text .= $_ . "\n\n"; } @@ -206,15 +211,7 @@ all_execs: ${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 @@ -226,15 +223,6 @@ clean_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 @@ -246,15 +234,7 @@ clean_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 &&! @@ -285,16 +265,21 @@ $(WIN95FLAG) ! $(CFG) clean: $(PERIPH_CLEAN_TARGET) - -erase $(WXLIBDIR)\wx.tds - -erase $(WXLIBDIR)\wx.il? - -erase *.obj - -erase *.pch - -erase *.csm - -erase "wx32.#??" + -$(RM) $(WXLIBDIR)\*.tds + -$(RM) $(WXLIBDIR)\*.il? + -$(RM) $(OBJ_PATH)\*.obj + -$(RM) $(OBJ_PATH)\*.pch + -$(RM) $(OBJ_PATH)\*.csm + -$(RM) $(OBJ_PATH)\"wx32.#??" + +cleancfg: + -$(RM) $(OBJ_PATH)\*.cfg + + +cleanall: clean cleancfg -cleanall: clean self: cd $(WXWIN)\distrib\msw\tmake - tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) - copy makefile.$(MFTYPE) $(WXWIN)\src\msw + perl -S tmake -tb32base wxwin.pro -o makebase.b32 + copy makebase.b32 $(WXWIN)\src\msw diff --git a/src/makeprog.b32 b/src/makeprog.b32 index 1d8d5f2629..75ffc42b07 100644 --- a/src/makeprog.b32 +++ b/src/makeprog.b32 @@ -101,8 +101,11 @@ $(TARGETRES) .c.obj: bcc32 $(CPPFLAGS) -P- -c -n$(EXEDIR) {$< } +!if "$(wxUSE_GUI)" != "0" +#make resources only with GUI apps $(TARGETRES) : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include /i$(WXDIR)\contrib\include -fo$(EXEDIR)\$(