#! 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$
}
foreach $file (sort keys %wxCommon) {
+ next if $wxCommon{$file} =~ /\b(16|U)\b/;
+
$isCFile = $file =~ /\.c$/;
$file =~ s/cp?p?$/obj/;
$project{"WXCOMMONOBJS"} .= $file . " ";
#! these files don't compile
next if $file =~ /^pnghand\./;
-#! next if $wxGeneric{$file} =~ /\b16\b/;
+ next if $wxMSW{$file} =~ /\b16\b/;
my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
my $isCFile = $file =~ /\.c$/;
#! 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()
+# This file was automatically generated by tmake
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
#
# 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 = ..\..
-
-!include $(WXDIR)\src\makewat.env
+!include ..\makewat.env
-WXLIB = $(WXDIR)\lib
-
-LIBTARGET = $(WXLIB)\wx.lib
-DUMMY=dummydll
-# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
+LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib
EXTRATARGETS = png zlib jpeg tiff regex
EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
DOCDIR = $(WXDIR)\docs
-GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
+GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
# These are generic things that don't need to be compiled on MSW,
# but sometimes it's useful to do so for testing purposes.
-NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t")
+NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
COMMONOBJS = &
- y_tab.obj &
- #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
+ $(OUTPUTDIR)\y_tab.obj &
+ #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
-MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
+MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
-HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
+HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
-ARCHINCDIR=$(WXDIR)\lib\msw
SETUP_H=$(ARCHINCDIR)\wx\setup.h
-all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
+all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
$(ARCHINCDIR)\wx:
- mkdir $(ARCHINCDIR)
- mkdir $(ARCHINCDIR)\wx
+ mkdir $(ARCHINCDIR)
+ mkdir $(ARCHINCDIR)\wx
+
+$(OUTPUTDIR):
+ @if not exist $^@ mkdir $^@
$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
- copy $(WXDIR)\include\wx\msw\setup.h $@
+ copy $(WXDIR)\include\wx\msw\setup.h $@
+LBCFILE=wx$(TOOLKIT).lbc
$(LIBTARGET) : $(OBJECTS)
- %create tmp.lbc
- @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
- wlib /b /c /n /p=512 $^@ @tmp.lbc
-
-#test : $(OBJECTS)
-# %create tmp.lbc
-# @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
-# wlib /b /c /n /p=512 $^@ @tmp.lbc
+ %create $(LBCFILE)
+ @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
+ wlib /b /c /n $(LIBPAGESIZE) $^@ @$(LBCFILE)
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
$_ = $project{"WXMSWOBJS"};
my @objs = split;
foreach (@objs) {
- $text .= $_ . ': $(';
+ $text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
s/\.obj$//;
if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
$text .= 'OLEDIR)\\';
if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
$suffix = "c";
$cc="CC";
+ $flags="CFLAGS";
}
else {
$suffix = "cpp";
- $cc="CCC";
+ $cc="CXX";
+ $flags="CXXFLAGS";
}
$text .= $_ . ".$suffix\n" .
- " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
+ " *\$($cc) \$($flags) \$<" . "\n\n";
}
#$}
$_ = $project{"WXCOMMONOBJS"};
my @objs = split;
foreach (@objs) {
- $text .= $_;
+ $text .= "\$(OUTPUTDIR)\\" . $_;
s/\.obj$//;
$text .= ': $(COMMDIR)\\';
my $suffix, $cc;
if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
$suffix = "c";
$cc="CC";
+ $flags="CFLAGS";
}
else {
$suffix = "cpp";
- $cc="CCC";
+ $cc="CXX";
+ $flags="CXXFLAGS";
}
$text .= $_ . ".$suffix\n" .
- " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
+ " *\$($cc) \$($flags) \$<" . "\n\n";
}
#$}
-y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
- *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
-
-# *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c
+$(OUTPUTDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
+ *$(CC) $(CFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c
$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
$_ = $project{"WXGENERICOBJS"};
my @objs = split;
foreach (@objs) {
- $text .= $_;
+ $text .= "\$(OUTPUTDIR)\\" . $_;
s/\.obj$//;
$text .= ': $(GENDIR)\\';
$text .= $_ . ".cpp\n" .
- ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
+ ' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
}
#$}
$_ = $project{"WXHTMLOBJS"};
my @objs = split;
foreach (@objs) {
- $text .= $_;
+ $text .= "\$(OUTPUTDIR)\\" . $_;
s/\.obj$//;
$text .= ': $(HTMLDIR)\\';
$text .= $_ . ".cpp\n" .
- ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
+ ' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
}
#$}