X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ace03f87d61e73c1025f4d45fb182ecff8956d4d..8a693e6e0460b6b3c32e4b6f114a3ab7b7cd24ea:/distrib/msw/tmake/wat.t diff --git a/distrib/msw/tmake/wat.t b/distrib/msw/tmake/wat.t index dd44990bfc..49c3c8957c 100644 --- a/distrib/msw/tmake/wat.t +++ b/distrib/msw/tmake/wat.t @@ -10,7 +10,6 @@ #! Created: 14.07.99 #! Version: $Id$ #!############################################################################# - #${ #! include the code which parses filelist.txt file and initializes #! %wxCommon, %wxGeneric and %wxMSW hashes. @@ -34,27 +33,32 @@ #! 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 @@ -86,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 @@ -134,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"; } #$} @@ -154,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"; } #$} @@ -333,7 +355,7 @@ clean_zlib: .SYMBOLIC 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