From: Chris Elliott Date: Mon, 26 May 2003 11:34:39 +0000 (+0000) Subject: Borland makefiles now keep output apart X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2cedc12a6ab49a8d943b303a3d391c6ac59e201c Borland makefiles now keep output apart git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/distrib/msw/tmake/b32.t b/distrib/msw/tmake/b32.t index be9ebf6ab1..7210da753f 100644 --- a/distrib/msw/tmake/b32.t +++ b/distrib/msw/tmake/b32.t @@ -18,7 +18,7 @@ $file =~ s/cp?p?$/obj/; $obj = "\$(UNIVDIR)\\" . $file . " "; - $project{"WXUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " " + $project{"WXUNIVOBJS"} .= "\$(OBJ_PATH)\\" . $file . " " } foreach $file (sort keys %wxUNIV) { @@ -26,14 +26,14 @@ $file =~ s/cp?p?$/obj/; $obj = "\$(UNIVTHEMEDIR)\\" . $file . " "; - $project{"WXUNIVTHEMEOBJS"} .= "\$(MSWDIR)\\" . $file . " " + $project{"WXUNIVTHEMEOBJS"} .= "\$(OBJ_PATH)\\" . $file . " " } foreach $file (sort keys %wxHTML) { next if $wxHTML{$file} =~ /\b16\b/; $file =~ s/cp?p?$/obj/; - $project{"WXHTMLOBJS"} .= "\$(MSWDIR)\\" . $file . " " + $project{"WXHTMLOBJS"} .= "\$(OBJ_PATH)\\" . $file . " " } foreach $file (sort keys %wxCommon) { @@ -41,7 +41,7 @@ $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $obj = "\$(MSWDIR)\\" . $file . " "; + $obj = "\$(OBJ_PATH)\\" . $file . " "; $project{"WXCOMMONOBJS"} .= $obj; $project{"WXCOBJS"} .= $obj if $isCFile; } @@ -50,18 +50,11 @@ foreach $file (sort keys %wxMSW) { next if $wxMSW{$file} =~ /\b16\b/; -#! if ( $file =~ /^automtn/ ) { -#! #! comment in old makefile.b32 seems to imply that this file can not -#! #! be compiled with Borland (leads to crash in oleauto sample) -#! No longer true, at least for BC++ 5.2 -#! next; -#! } - $isCFile = $file =~ /\.c$/; 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 ) { @@ -75,18 +68,11 @@ foreach $file (sort keys %wxMSW) { next unless $wxMSW{$file} =~ /\b(L|B)\b/; -#! if ( $file =~ /^automtn/ ) { -#! #! comment in old makefile.b32 seems to imply that this file can not -#! #! be compiled with Borland (leads to crash in oleauto sample) -#! No longer true, at least for BC++ 5.2 -#! next; -#! } - $isCFile = $file =~ /\.c$/; my $isOleObj = $wxMSW{$file} =~ /\bO\b/; $file =~ s/cp?p?$/obj/; - my $obj = "\$(MSWDIR)\\" . $file . " "; + my $obj = "\$(OBJ_PATH)\\" . $file . " "; $project{"WXMSWUNIVOBJS"} .= $obj; if ( $isOleObj ) { @@ -102,7 +88,7 @@ next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/; $file =~ s/cp?p?$/obj/; - $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " " + $project{"WXGENERICOBJS"} .= "\$(OBJ_PATH)\\" . $file . " " } #! Generic Dir for UNIV Port @@ -118,7 +104,7 @@ $project{"WXUNIVOBJS"} =~ /\b$filereal\b/; - $project{"WXGENERICUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " " + $project{"WXGENERICUNIVOBJS"} .= "\$(OBJ_PATH)\\" . $file . " " } #$} @@ -171,7 +157,6 @@ PERIPH_TARGET=ctl3d $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) !endif -#PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS) 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) @@ -180,7 +165,7 @@ PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PER DUMMY=dummy !else DUMMY=dummydll -LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex +LIBS= cw32mti import32 ole2w32 odbc32 zlib_$(DEBUG_SUFFIX) png_$(DEBUG_SUFFIX) jpeg_$(DEBUG_SUFFIX) tiff_$(DEBUG_SUFFIX) regex_$(DEBUG_SUFFIX) !endif LIBTARGET=$(WXLIB) @@ -220,7 +205,7 @@ OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) default: wx -wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) +wx: $(ARCHINCDIR)\wx makeoutdir makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) all: wx @@ -235,15 +220,18 @@ makearchsetuph: copy $(SETUPSRCDIR)\setup.h $(ARCHSETUPH) cd $(WXDIR)\src\msw +makeoutdir: + -mkdir $(OBJ_PATH) + $(ARCHINCDIR)\wx: -mkdir $(ARCHINCDIR) -mkdir $(ARCHINCDIR)\wx - -erase $(CFG) + -if exist $(CFG) $(RM) $(CFG) !if "$(DLL)" == "0" $(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(LIBTARGET) + -if exist $(LIBTARGET) $(RM) $(LIBTARGET) tlib "$(LIBTARGET)" /P1024 $(LINKDEBUGFLAGS) @&&! +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) ! @@ -279,10 +267,11 @@ version.res: $_ = $project{"WXMSWUNIVOBJS"}; my @objs = split; foreach (@objs) { - $text .= $_ . ": "; - if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } + $text .= $_ . ": "; + if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/OBJ_PATH/OLEDIR/; } $suffix = $project{"WXCUNIVOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; s/obj$/$suffix/; + s/OBJ_PATH/MSWDIR/; $text .= $_ . "\n\n"; } #$} @@ -296,10 +285,11 @@ version.res: $_ = $project{"WXMSWOBJS"}; my @objs = split; foreach (@objs) { - $text .= $_ . ": "; - if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } + $text .= $_ . ": "; + if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/OBJ_PATH/OLEDIR/; } $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; s/obj$/$suffix/; + s/OBJ_PATH/MSWDIR/; $text .= $_ . "\n\n"; } #$} @@ -313,7 +303,7 @@ version.res: my @objs = split; foreach (@objs) { $text .= $_ . ": "; - s/MSWDIR/UNIVDIR/; + s/OBJ_PATH/UNIVDIR/; s/obj$/\$(SRCSUFF)/; $text .= $_ . "\n\n"; } @@ -328,7 +318,7 @@ version.res: my @objs = split; foreach (@objs) { $text .= $_ . ": "; - s/MSWDIR/UNIVTHEMEDIR/; + s/OBJ_PATH/UNIVTHEMEDIR/; s/obj$/\$(SRCSUFF)/; $text .= $_ . "\n\n"; } @@ -345,7 +335,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"; } @@ -363,7 +353,7 @@ version.res: my @objs = split; foreach (@objs) { $text .= $_ . ": "; - s/MSWDIR/GENDIR/; + s/OBJ_PATH/GENDIR/; s/obj$/\$(SRCSUFF)/; $text .= $_ . "\n\n"; } @@ -380,7 +370,7 @@ version.res: my @objs = split; foreach (@objs) { $text .= $_ . ": "; - s/MSWDIR/GENDIR/; + s/OBJ_PATH/GENDIR/; s/obj$/\$(SRCSUFF)/; $text .= $_ . "\n\n"; } @@ -395,7 +385,7 @@ version.res: my @objs = split; foreach (@objs) { $text .= $_ . ": "; - s/MSWDIR/HTMLDIR/; + s/OBJ_PATH/HTMLDIR/; s/obj$/\$(SRCSUFF)/; $text .= $_ . "\n\n"; } @@ -419,58 +409,58 @@ all_execs: png: $(CFG) cd $(WXDIR)\src\png - ${MAKE} -f makefile.b32 FINAL=$(FINAL) + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_png: cd $(WXDIR)\src\png - ${MAKE} -f makefile.b32 clean + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) clean cd $(WXDIR)\src\msw zlib: $(CFG) cd $(WXDIR)\src\zlib - ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_zlib: cd $(WXDIR)\src\zlib - ${MAKE} -f makefile.b32 clean + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) clean cd $(WXDIR)\src\msw jpeg: $(CFG) cd $(WXDIR)\src\jpeg - ${MAKE} -f makefile.b32 FINAL=$(FINAL) + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_jpeg: cd $(WXDIR)\src\jpeg - ${MAKE} -f makefile.b32 clean + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) clean cd $(WXDIR)\src\msw regex: $(CFG) cd $(WXDIR)\src\regex - ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_regex: cd $(WXDIR)\src\regex - ${MAKE} -f makefile.b32 clean + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) clean cd $(WXDIR)\src\msw tiff: $(CFG) cd $(WXDIR)\src\tiff - ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_tiff: cd $(WXDIR)\src\tiff - ${MAKE} -f makefile.b32 clean + ${MAKE} -f makefile.b32 OUTPUTDIR=$(OUTPUTDIR) FINAL=$(FINAL) clean cd $(WXDIR)\src\msw $(CFG): makefile.b32 copy &&! -Hc --H=$(WXDIR)\src\msw\wx32.csm +-H=$(OBJ_PATH)\wx32.csm -3 -d -a1 # byte alignment @@ -494,15 +484,21 @@ $(DEBUG_FLAGS) $(WIN95FLAG) ! $(CFG) +cleancfg: + -if exist $(OBJ_PATH)\*.cfg $(RM) $(OBJ_PATH)\*.cfg + clean: $(PERIPH_CLEAN_TARGET) - -erase $(WXLIBDIR)\wx.tds - -erase $(WXLIBDIR)\wx.il? - -erase *.obj - -erase *.pch - -erase *.csm - -erase "wx32.#??" + -if exist $(WXLIBDIR)\wx.il? $(RM) $(WXLIBDIR)\wx.tds + -if exist $(WXLIBDIR)\wx.il? $(RM) $(WXLIBDIR)\wx.il? + -if exist $(OBJ_PATH)\*.obj $(RM) $(OBJ_PATH)\*.obj + -if exist $(OBJ_PATH)\*.csm $(RM) $(OBJ_PATH)\*.csm + -if exist "$(OBJ_PATH)\wx32.#??" $(RM) "$(OBJ_PATH)\wx32.#??" + -if exist *.pch $(RM) *.pch + -if exist *.csm $(RM) *.csm + -if exist *.obj $(RM) *.obj + -if exist "wx32.#??" $(RM) "wx32.#??" -cleanall: clean +cleanall: clean cleancfg # Making documents @@ -592,7 +588,7 @@ allpdfrtf: pdfrtf portingpdfrtf $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj cd $(DOCDIR)/latex/wx - -erase wx.ph + -if exist wx.ph $(RM) wx.ph hc wx move wx.hlp $(DOCDIR)\winhelp\wx.hlp move wx.cnt $(DOCDIR)\winhelp\wx.cnt @@ -600,7 +596,7 @@ $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/w $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj cd $(DOCDIR)/latex/porting - -erase porting.ph + -if exist porting.ph $(RM) porting.ph hc porting move porting.hlp $(DOCDIR)\winhelp\porting.hlp move porting.cnt $(DOCDIR)\winhelp\porting.cnt @@ -608,7 +604,7 @@ $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOC $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj cd $(DOCDIR)/latex/techref - -erase techref.ph + -if exist techref.ph $(RM) techref.ph hc techref move techref.hlp $(DOCDIR)\winhelp\techref.hlp move techref.cnt $(DOCDIR)\winhelp\techref.cnt @@ -654,10 +650,10 @@ $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex cd $(DOCDIR)\latex\wx -mkdir $(DOCDIR)\html\wx -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html - -erase $(DOCDIR)\html\wx\*.con - -erase $(DOCDIR)\html\wx\*.ref - -erase $(DOCDIR)\latex\wx\*.con - -erase $(DOCDIR)\latex\wx\*.ref + -if exist $(DOCDIR)\html\wx\*.con $(RM) $(DOCDIR)\html\wx\*.con + -if exist $(DOCDIR)\html\wx\*.ref $(RM) $(DOCDIR)\html\wx\*.ref + -if exist $(DOCDIR)\latex\wx\*.con $(RM) $(DOCDIR)\latex\wx\*.con + -if exist $(DOCDIR)\latex\wx\*.ref $(RM) $(DOCDIR)\latex\wx\*.ref cd $(THISDIR) $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp @@ -670,10 +666,10 @@ $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex cd $(DOCDIR)\latex\porting -mkdir $(DOCDIR)\html\porting -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html - -erase $(DOCDIR)\html\porting\*.con - -erase $(DOCDIR)\html\porting\*.ref - -erase $(DOCDIR)\latex\porting\*.con - -erase $(DOCDIR)\latex\porting\*.ref + -if exist $(DOCDIR)\html\porting\*.con $(RM) $(DOCDIR)\html\porting\*.con + -if exist $(DOCDIR)\html\porting\*.ref $(RM) $(DOCDIR)\html\porting\*.ref + -if exist $(DOCDIR)\latex\porting\*.con $(RM) $(DOCDIR)\latex\porting\*.con + -if exist $(DOCDIR)\latex\porting\*.ref $(RM) $(DOCDIR)\latex\porting\*.ref cd $(THISDIR) $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex @@ -741,6 +737,12 @@ MFTYPE=b32 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t self: +!if "$(TM)"=="" + @echo Error in Environment! + @echo Please set TM in the environment to the directory containing tmake binaries + @echo eg set TM=c:\wx\tmake\bin +!else cd $(WXWIN)\distrib\msw\tmake - tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) + perl $(TM)\tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) copy makefile.$(MFTYPE) $(WXWIN)\src\msw +!endif diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 04869b7bf8..1f18abb765 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -239,12 +239,16 @@ Compiling using the makefiles (updated 24 Sept 02): You may like to use the short form as shown by a dos directory listing ; eg instead of c:\wxwindows-2.5.0 use c:\wxwind~1.4 Reboot if needed for the changes to autoexec.bat to take effect. + 2. Change directory to src\msw. Type 'make -f makefile.b32' to make the wxWindows core library. Ignore the compiler warnings. This produces a library in the wxwindows\lib directory called wx32ds.lib + 3. Change directory to a sample or demo such as samples\minimal, and type - 'make -f makefile.b32'. This produces a windows exe file + 'make -f makefile.b32'. This produces a windows exe file - by default + in the BORL subdirectory (see note 9) + 4. For release versions, recompile wxWindows and samples using 'make -f makefile.b32 clean' 'make -f makefile.b32 FINAL=1' @@ -291,6 +295,14 @@ Compiling using the makefiles (updated 24 Sept 02): There is a sample\console directory and in this type 'make -f makefile.b32 wxUSE_GUI=0' +9. OUTPUTDIR may be set to the name of the directory where you want all the + object files to be generated (the library files are always created in + %WXWIN%\lib). Compilation will fail if you set it to an empty string + to create them in the same directory as the source. If you change OUTPUTDIR, + make sure that it does not have a trailing backslash! + In the samples, you may use EXEDIR=adir to build the samples in adir. Setting + EXEDIR=. will build in the current directory, + Note (0): This provides the ability to produce separate wxwindows libraries for different purposes, and only have to rebuild the applications @@ -397,7 +409,7 @@ There are several makefile variables which may be modified: - OUTPUTDIR may be set to the name of the directory where you want all the object files to be generated (the library files are always created in - %WXWIN\lib). Compilation will fail if you set it to an empty string + %WXWIN%\lib). Compilation will fail if you set it to an empty string to create them in the same directory as the source. If you change OUTPUTDIR, make sure that it does not have a trailing backslash! diff --git a/src/jpeg/makefile.b32 b/src/jpeg/makefile.b32 index de0ff66c62..fbcb6fd442 100644 --- a/src/jpeg/makefile.b32 +++ b/src/jpeg/makefile.b32 @@ -2,77 +2,171 @@ # File: makefile.b32 # Author: Julian Smart # Created: 1993 -# Updated: +# Updated: # Copyright: # # "%W% %G%" # # Makefile : Builds JPEG library (BC++ 32-bit) -# WXWIN and BCCDIR are set by parent make - -LIBTARGET =..\..\lib\jpeg.lib - -SYSDEPMEM= jmemnobs.obj - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +LIBTARGET=jpeg +WXWIN=..\.. + +!include ..\makeb32.env + +SYSDEPMEM= \ + $(OBJ_PATH)\jmemnobs.obj + # library object files common to compression and decompression -COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +COMOBJECTS= \ + $(OBJ_PATH)\jcomapi.obj \ + $(OBJ_PATH)\jutils.obj \ + $(OBJ_PATH)\jerror.obj \ + $(OBJ_PATH)\jmemmgr.obj \ + $(SYSDEPMEM) + # compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ - jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ - jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +CLIBOBJECTS= \ + $(OBJ_PATH)\jcapimin.obj \ + $(OBJ_PATH)\jcapistd.obj \ + $(OBJ_PATH)\jctrans.obj \ + $(OBJ_PATH)\jcparam.obj \ + $(OBJ_PATH)\jdatadst.obj \ + $(OBJ_PATH)\jcinit.obj \ + $(OBJ_PATH)\jcmaster.obj \ + $(OBJ_PATH)\jcmarker.obj \ + $(OBJ_PATH)\jcmainct.obj \ + $(OBJ_PATH)\jcprepct.obj \ + $(OBJ_PATH)\jccoefct.obj \ + $(OBJ_PATH)\jccolor.obj \ + $(OBJ_PATH)\jcsample.obj \ + $(OBJ_PATH)\jchuff.obj \ + $(OBJ_PATH)\jcphuff.obj \ + $(OBJ_PATH)\jcdctmgr.obj \ + $(OBJ_PATH)\jfdctfst.obj \ + $(OBJ_PATH)\jfdctflt.obj \ + $(OBJ_PATH)\jfdctint.obj + # decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ - jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ - jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ - jquant1.obj jquant2.obj jdmerge.obj +DLIBOBJECTS= \ + $(OBJ_PATH)\jdapimin.obj \ + $(OBJ_PATH)\jdapistd.obj \ + $(OBJ_PATH)\jdtrans.obj \ + $(OBJ_PATH)\jdatasrc.obj \ + $(OBJ_PATH)\jdmaster.obj \ + $(OBJ_PATH)\jdinput.obj \ + $(OBJ_PATH)\jdmarker.obj \ + $(OBJ_PATH)\jdhuff.obj \ + $(OBJ_PATH)\jdphuff.obj \ + $(OBJ_PATH)\jdmainct.obj \ + $(OBJ_PATH)\jdcoefct.obj \ + $(OBJ_PATH)\jdpostct.obj \ + $(OBJ_PATH)\jddctmgr.obj \ + $(OBJ_PATH)\jidctfst.obj \ + $(OBJ_PATH)\jidctflt.obj \ + $(OBJ_PATH)\jidctint.obj \ + $(OBJ_PATH)\jidctred.obj \ + $(OBJ_PATH)\jdsample.obj \ + $(OBJ_PATH)\jdcolor.obj \ + $(OBJ_PATH)\jquant1.obj \ + $(OBJ_PATH)\jquant2.obj \ + $(OBJ_PATH)\jdmerge.obj + # These objectfiles are included in libjpeg.lib OBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj -!include $(WXWIN)\src\makelib.b32 +$(OBJ_PATH)\jmemnobs.obj: jmemnobs.c + +$(OBJ_PATH)\jcomapi.obj: jcomapi.c + +$(OBJ_PATH)\jutils.obj: jutils.c + +$(OBJ_PATH)\jerror.obj: jerror.c + +$(OBJ_PATH)\jmemmgr.obj: jmemmgr.c + +$(OBJ_PATH)\jcapimin.obj: jcapimin.c + +$(OBJ_PATH)\jcapistd.obj: jcapistd.c + +$(OBJ_PATH)\jctrans.obj: jctrans.c + +$(OBJ_PATH)\jcparam.obj: jcparam.c + +$(OBJ_PATH)\jdatadst.obj: jdatadst.c + +$(OBJ_PATH)\jcinit.obj: jcinit.c + +$(OBJ_PATH)\jcmaster.obj: jcmaster.c + +$(OBJ_PATH)\jcmarker.obj: jcmarker.c + +$(OBJ_PATH)\jcmainct.obj: jcmainct.c + +$(OBJ_PATH)\jcprepct.obj: jcprepct.c + +$(OBJ_PATH)\jccoefct.obj: jccoefct.c + +$(OBJ_PATH)\jccolor.obj: jccolor.c + +$(OBJ_PATH)\jcsample.obj: jcsample.c + +$(OBJ_PATH)\jchuff.obj: jchuff.c + +$(OBJ_PATH)\jcphuff.obj: jcphuff.c + +$(OBJ_PATH)\jcdctmgr.obj: jcdctmgr.c + +$(OBJ_PATH)\jfdctfst.obj: jfdctfst.c + +$(OBJ_PATH)\jfdctflt.obj: jfdctflt.c + +$(OBJ_PATH)\jfdctint.obj: jfdctint.c + +$(OBJ_PATH)\jdapimin.obj: jdapimin.c + +$(OBJ_PATH)\jdapistd.obj: jdapistd.c + +$(OBJ_PATH)\jdtrans.obj: jdtrans.c + +$(OBJ_PATH)\jdatasrc.obj: jdatasrc.c + +$(OBJ_PATH)\jdmaster.obj: jdmaster.c + +$(OBJ_PATH)\jdinput.obj: jdinput.c + +$(OBJ_PATH)\jdmarker.obj: jdmarker.c + +$(OBJ_PATH)\jdhuff.obj: jdhuff.c + +$(OBJ_PATH)\jdphuff.obj: jdphuff.c + +$(OBJ_PATH)\jdmainct.obj: jdmainct.c + +$(OBJ_PATH)\jdcoefct.obj: jdcoefct.c + +$(OBJ_PATH)\jdpostct.obj: jdpostct.c + +$(OBJ_PATH)\jddctmgr.obj: jddctmgr.c + +$(OBJ_PATH)\jidctfst.obj: jidctfst.c + +$(OBJ_PATH)\jidctflt.obj: jidctflt.c + +$(OBJ_PATH)\jidctint.obj: jidctint.c + +$(OBJ_PATH)\jidctred.obj: jidctred.c + +$(OBJ_PATH)\jdsample.obj: jdsample.c + +$(OBJ_PATH)\jdcolor.obj: jdcolor.c + +$(OBJ_PATH)\jquant1.obj: jquant1.c + +$(OBJ_PATH)\jquant2.obj: jquant2.c + +$(OBJ_PATH)\jdmerge.obj: jdmerge.c + + +!include ..\makelib.b32 diff --git a/src/makeb32.env b/src/makeb32.env index 857e503f62..b22614cde4 100644 --- a/src/makeb32.env +++ b/src/makeb32.env @@ -4,24 +4,35 @@ RM= erase !endif +BORLAND_SUFFIX=bc +DEBUG_SUFFIX= + WXDIR = $(WXWIN) -CFG = $(WXDIR)\src\msw\wxw32 +CFG = wxw32 +!ifndef OUTPUTDIR +OBJ_PATH=$(WXDIR)\BORL +OUTPUTDIR=$(WXDIR)\BORL +!else +OBJ_PATH=$(OUTPUTDIR) +!endif + +!ifndef BCCDIR BCCDIR=$(MAKEDIR)\.. +!endif !if "$(BCCDIR)" == "\.." !error Your Borland compiler does not define MAKEDIR. Pleasedefine the BCCDIR variable in makeb32.env line 10, e.g. BCCDIR=d:\bc4 !endif -ARCHINCDIR=$(WXDIR)\lib\msw +ARCHINCDIR=$(WXDIR)\lib\$(BORLAND_SUFFIX) ARCHSETUPH=$(ARCHINCDIR)\wx\setup.h #see below for SETUPSRCDIR - -# Using a config file isn't compatible across all BC++ versions -# LNKCFG=$(WXDIR)\src\msw\bclnk32.cfg +!ifndef WXLIBDIR WXLIBDIR = $(WXDIR)\lib -WXLIBDIR2 = $(WXDIR)\contrib\lib +!endif + WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc;$(WXDIR)\src\regex; WIN95FLAG = -D__WIN95__ -D__WINDOWS__ RFLAGS = -i$(WXDIR)\include;$(WXDIR)\src @@ -61,6 +72,9 @@ LINKDEBUGFLAGS=/v !ifndef DLL DLL=0 +!else +DLL=1 +WXMAKINGDLL=1 !endif # Target WXMAKINGDLL WXUSINGDLL WXBUILDDLL @@ -77,18 +91,14 @@ DLL=0 # options and all the obj files, and note that you must delete the obj files if you # change the options so that they are compiled using the correct ones. -!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" -WXLIBNAME=wx32 -!else -WXLIBNAME=wx32 -!endif +WXLIBNAME=wx25 + ## Use this if you want to use the UNIV controls set rather than the native ones ## make -f makefile.b32 WXUSINGUNIV=1 !if "$(WXUSINGUNIV)" == "1" USE_UNIV="UNIV" -CFG=$(CFG)v -WXLIBNAME=$(WXLIBNAME)v +BORLAND_SUFFIX=$(BORLAND_SUFFIX)v ARCHINCDIR=$(ARCHINCDIR)v SETUPSRCDIR=$(WXDIR)\include\wx\univ PORT=__WXUNIVERSAL__ @@ -98,43 +108,35 @@ PORT=__WXMSW__ SETUPSRCDIR=$(WXDIR)\include\wx\msw !endif -#not sure what to do with unicode builds - we need to define something ? -#!if "$(UNICODE)" == "1" -#WXLIBNAME=$(WXLIBNAME)u -#!endif - +#unicode builds handled inside setup.h #a hybrid , does not set __WXDEBUG__ but sets -v (see above) !if "$(FINAL)" == "hybrid" -WXLIBNAME=$(WXLIBNAME)h -CFG=$(CFG)h +DEBUG_SUFFIX=$(DEBUG_SUFFIX)h !endif !if "$(FINAL)" == "0" -WXLIBNAME=$(WXLIBNAME)d -CFG=$(CFG)d +DEBUG_SUFFIX=$(DEBUG_SUFFIX)d !endif !if "$(wxUSE_GUI)" == "0" -WXLIBNAME=$(WXLIBNAME)b -CFG=$(CFG)b +BORLAND_SUFFIX=$(BORLAND_SUFFIX)b CPPFLAGS=-DwxUSE_GUI=0 !endif !if "$(WXMAKINGDLL)" != "1" && "$(WXUSINGDLL)" != "1" -WXLIBNAME=$(WXLIBNAME)s +BORLAND_SUFFIX=$(BORLAND_SUFFIX)s !endif !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" INCEXT=dll$(INCEXT) !endif -!ifndef WXLIBDIR -WXLIBDIR=$(WXDIR)\lib -!endif - -WXLIB=$(WXLIBDIR)\$(WXLIBNAME).lib -WXDLL=$(WXLIBDIR)\$(WXLIBNAME).dll +# final names determined here +WXLIB=$(WXLIBDIR)\$(WXLIBNAME)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX).lib +WXDLL=$(WXLIBDIR)\$(WXLIBNAME)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX).dll +LIBTARGET=$(WXLIBDIR)\$(LIBTARGET)_$(DEBUG_SUFFIX).lib +OBJ_PATH=$(OBJ_PATH)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX) !if "$(WXMAKINGDLL)" == "1" DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL @@ -152,7 +154,7 @@ DLL_FLAGS= LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS) !endif -CFG=$(CFG).cfg +CFG=$(OBJ_PATH)\$(CFG).cfg CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) @$(CFG) $(EXTRACPPFLAGS) DUMMY=dummy @@ -163,7 +165,7 @@ OBJSUFF = obj WAITFLAG = /w .$(SRCSUFF).obj: - bcc32 $(CPPFLAGS) -c {$< } + bcc32 $(CPPFLAGS) -c -o$(OBJ_PATH)\$(