X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f2071dda0b6016afed8777a4dd23f0ada537026b..37d92fba2884ef721b9851ef11eca6bbbf4f1778:/distrib/msw/tmake/wat.t diff --git a/distrib/msw/tmake/wat.t b/distrib/msw/tmake/wat.t index 4fb9b6452a..b500044781 100644 --- a/distrib/msw/tmake/wat.t +++ b/distrib/msw/tmake/wat.t @@ -2,11 +2,14 @@ #! File: wat.t #! Purpose: tmake template file from which makefile.wat is generated by running #! tmake -t wat wxwin.pro -o makefile.wat +#! TODO: +#! - 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. @@ -30,8 +33,10 @@ #! 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) { @@ -40,23 +45,35 @@ 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 = ..\.. @@ -73,8 +90,8 @@ EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common XPMDIR=$(WXDIR)\src\xpm -OLEDIR=ole MSWDIR=$(WXDIR)\src\msw +OLEDIR=$(MSWDIR)\ole DOCDIR = $(WXDIR)\docs @@ -104,8 +121,8 @@ $(LIBTARGET) : $(OBJECTS) # %create tmp.lbc # @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i # wlib /b /c /n /p=512 $^@ @tmp.lbc - - + + clean: .SYMBOLIC $(EXTRATARGETSCLEAN) -erase *.obj -erase $(LIBTARGET) @@ -121,13 +138,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"; } #$} @@ -141,8 +167,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"; } #$} @@ -241,9 +276,9 @@ wrffrp.obj: $(XPMDIR)\wrffrp.c *$(CC) $(CPPFLAGS) $(IFLAGS) $< OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ - trees$(O) + trees$(O) OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ - infutil$(O) inffast$(O) + infutil$(O) inffast$(O) adler32.obj: adler32.c zutil.h zlib.h zconf.h $(CC) -c $(CFLAGS) $*.c @@ -319,3 +354,8 @@ clean_zlib: .SYMBOLIC 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 + tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) + copy makefile.$(MFTYPE) $(WXWIN)\src\msw