X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d85bcd1f59a00ff4d626f0acc0b24474ec1aa09..b86e511a9bde666590061c8f74d5fed150442c83:/distrib/msw/tmake/wat.t?ds=sidebyside diff --git a/distrib/msw/tmake/wat.t b/distrib/msw/tmake/wat.t index c441ec7a93..9e9f629805 100644 --- a/distrib/msw/tmake/wat.t +++ b/distrib/msw/tmake/wat.t @@ -3,14 +3,13 @@ #! Purpose: tmake template file from which makefile.wat is generated by running #! tmake -t wat wxwin.pro -o makefile.wat #! TODO: -#! - unzip.c must be compiled with $(CC), not $(CCC). +#! - extended.c, unzip.c must be compiled with $(CC), not $(CCC). #! - extended.c, unzip.c targets must be as per b32.t etc. #! - OLE files not generated correctly (need 'ole/' directory) #! Author: Vadim Zeitlin #! Created: 14.07.99 #! Version: $Id$ #!############################################################################# - #${ #! include the code which parses filelist.txt file and initializes #! %wxCommon, %wxGeneric and %wxMSW hashes. @@ -31,36 +30,47 @@ } foreach $file (sort keys %wxCommon) { - #! doesn't compile, apparently - next if $file =~ /^imagjpeg\./; - + $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $project{"WXCOMMONOBJS"} .= $file . " " + $project{"WXCOMMONOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; } foreach $file (sort keys %wxMSW) { #! these files don't compile next if $file =~ /^pnghand\./; - next if $wxGeneric{$file} =~ /\b16\b/; +#! next if $wxGeneric{$file} =~ /\b16\b/; + my $isOleObj = $wxMSW{$file} =~ /\bO\b/; + my $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $project{"WXMSWOBJS"} .= $file . " " + $project{"WXMSWOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; + $project{"WXOLEOBJS"} .= $file . " " if $isOleObj } #$} +#! an attempt to embed '#' directly in the string somehow didn't work... +#$ $text = chr(35) . '!/binb/wmake.exe'; # This file was automatically generated by tmake at #$ Now() # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! -#! an attempt to embed '#' directly in the string somehow didn't work... -#$ $text = chr(35) . '!/binb/wmake.exe'; - # # File: makefile.wat # Author: Julian Smart # Created: 1998 # # Makefile : Builds wxWindows library for Watcom C++, WIN32 +# +# NOTE: This file is generated from wat.t by tmake, but not all bugs have +# been removed from this process. If wxWindows doesn't compile, +# check the following and edit this makefile accordingly: +# +# - OLE-related files such as oleutils.cpp should have 'ole\' prepended +# to the path. +# - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC). +# They may also be wrongly specified as extended.cpp, etc. WXDIR = ..\.. @@ -72,13 +82,15 @@ LIBTARGET = $(WXLIB)\wx.lib DUMMY=dummydll # ODBCLIB = ..\..\contrib\odbc\odbc32.lib -EXTRATARGETS = xpm png zlib -EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib +EXTRATARGETS = xpm png zlib jpeg tiff +EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib clean_jpeg clean_tiff GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common XPMDIR=$(WXDIR)\src\xpm -OLEDIR=ole +JPEGDIR=$(WXDIR)\src\jpeg +TIFFDIR=$(WXDIR)\src\tiff MSWDIR=$(WXDIR)\src\msw +OLEDIR=$(MSWDIR)\ole DOCDIR = $(WXDIR)\docs @@ -125,13 +137,22 @@ cleanall: clean foreach (@objs) { $text .= $_ . ': $('; s/\.obj$//; - if ( $wxMSW{$_} =~ /\bO\b/ ) { + if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) { $text .= 'OLEDIR)\\'; } else { $text .= 'MSWDIR)\\'; } - $text .= $_ . ".cpp\n" . - ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + my $suffix, $cc; + if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { + $suffix = "c"; + $cc="CC"; + } + else { + $suffix = "cpp"; + $cc="CCC"; + } + $text .= $_ . ".$suffix\n" . + " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; } #$} @@ -145,8 +166,17 @@ cleanall: clean $text .= $_; s/\.obj$//; $text .= ': $(COMMDIR)\\'; - $text .= $_ . ".cpp\n" . - ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + my $suffix, $cc; + if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { + $suffix = "c"; + $cc="CC"; + } + else { + $suffix = "cpp"; + $cc="CCC"; + } + $text .= $_ . ".$suffix\n" . + " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; } #$} @@ -323,8 +353,28 @@ clean_zlib: .SYMBOLIC wmake -f makefile.wat clean cd $(WXDIR)\src\msw +jpeg: .SYMBOLIC + cd $(WXDIR)\src\jpeg + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_jpeg: .SYMBOLIC + cd $(WXDIR)\src\jpeg + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + +tiff: .SYMBOLIC + cd $(WXDIR)\src\tiff + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_tiff: .SYMBOLIC + cd $(WXDIR)\src\tiff + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + MFTYPE=wat -makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t - cd $(WXWIN)\distrib\msw\tmake +self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t + cd $(WXDIR)\distrib\msw\tmake tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) - copy makefile.$(MFTYPE) $(WXWIN)\src\msw + copy makefile.$(MFTYPE) $(WXDIR)\src\msw