2003-01-22 12:13:52 -05:00
|
|
|
#!#############################################################################
|
|
|
|
#! File: wat.t
|
|
|
|
#! Purpose: tmake template file from which makefile.wat is generated by running
|
|
|
|
#! tmake -t wat wxwin.pro -o makefile.wat
|
|
|
|
#! Author: Vadim Zeitlin
|
|
|
|
#! Created: 14.07.99
|
|
|
|
#! Version: $Id$
|
|
|
|
#!#############################################################################
|
|
|
|
#${
|
|
|
|
#! include the code which parses filelist.txt file and initializes
|
|
|
|
#! %wxCommon, %wxGeneric and %wxMSW hashes.
|
|
|
|
IncludeTemplate("filelist.t");
|
|
|
|
|
|
|
|
#! now transform these hashes into $project tags
|
|
|
|
foreach $file (sort keys %wxCommon) {
|
|
|
|
next if $wxCommon{$file} !~ /\bB\b/;
|
|
|
|
|
|
|
|
$isCFile = $file =~ /\.c$/;
|
|
|
|
$file =~ s/cp?p?$/obj/;
|
|
|
|
$project{"WXCOMMONOBJS"} .= $file . " ";
|
|
|
|
$project{"WXCOBJS"} .= $file . " " if $isCFile;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach $file (sort keys %wxMSW) {
|
|
|
|
next if $wxMSW{$file} !~ /\bB\b/;
|
|
|
|
|
|
|
|
my $isCFile = $file =~ /\.c$/;
|
|
|
|
$file =~ s/cp?p?$/obj/;
|
|
|
|
$project{"WXMSWOBJS"} .= $file . " ";
|
|
|
|
$project{"WXCOBJS"} .= $file . " " if $isCFile;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach $file (sort keys %wxBase) {
|
|
|
|
my $isCFile = $file =~ /\.c$/;
|
|
|
|
$file =~ s/cp?p?$/obj/;
|
|
|
|
$project{"WXCOMMONOBJS"} .= $file . " ";
|
|
|
|
$project{"WXCOBJS"} .= $file . " " if $isCFile;
|
|
|
|
}
|
|
|
|
|
|
|
|
#$}
|
|
|
|
#! 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
|
|
|
|
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WATBASE.T!
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# Name: makebase.wat
|
|
|
|
# Purpose: Builds wxBase library for Watcom C++ under Win32
|
|
|
|
# Author: Vadim Zeitlin
|
|
|
|
# Created: 21.01.03
|
|
|
|
# RCS-ID: $Id$
|
|
|
|
# Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
|
|
|
|
# Licence: wxWindows licence
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
wxUSE_GUI=0
|
|
|
|
|
|
|
|
!include ..\makewat.env
|
|
|
|
|
2003-06-19 04:05:26 -04:00
|
|
|
LIBTARGET = $(WXDIR)\lib\wx$(TOOLKIT)$(DEBUGSUFFIX)_w.lib
|
2003-01-22 12:13:52 -05:00
|
|
|
|
|
|
|
EXTRATARGETS = zlib regex
|
|
|
|
EXTRATARGETSCLEAN = clean_zlib clean_regex
|
|
|
|
COMMDIR=$(WXDIR)\src\common
|
|
|
|
MSWDIR=$(WXDIR)\src\msw
|
|
|
|
OLEDIR=$(MSWDIR)\ole
|
|
|
|
|
|
|
|
COMMONOBJS = &
|
2003-06-19 04:05:26 -04:00
|
|
|
#$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
2003-01-22 12:13:52 -05:00
|
|
|
|
|
|
|
MSWOBJS = &
|
2003-06-19 04:05:26 -04:00
|
|
|
#$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
2003-01-22 12:13:52 -05:00
|
|
|
|
|
|
|
OBJECTS = $(COMMONOBJS) $(MSWOBJS)
|
|
|
|
|
|
|
|
SETUP_H=$(ARCHINCDIR)\wx\setup.h
|
|
|
|
|
|
|
|
all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
|
|
|
|
|
|
|
|
$(ARCHINCDIR)\wx:
|
|
|
|
mkdir $(ARCHINCDIR)
|
|
|
|
mkdir $(ARCHINCDIR)\wx
|
|
|
|
|
|
|
|
$(OUTPUTDIR):
|
|
|
|
mkdir $(OUTPUTDIR)
|
|
|
|
|
|
|
|
$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
|
|
|
|
copy $(WXDIR)\include\wx\msw\setup.h $@
|
|
|
|
|
2003-06-19 04:05:26 -04:00
|
|
|
LBCFILE=$(OUTPUTDIR)\wx$(TOOLKIT).lbc
|
2003-01-22 12:13:52 -05:00
|
|
|
$(LIBTARGET) : $(OBJECTS)
|
|
|
|
%create $(LBCFILE)
|
|
|
|
@for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
|
|
|
|
wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
|
|
|
|
|
|
|
|
|
|
|
|
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
|
2003-06-19 04:13:00 -04:00
|
|
|
-erase $(OUTPUTDIR)\*.obj
|
2003-01-22 12:13:52 -05:00
|
|
|
-erase $(LIBTARGET)
|
2003-06-19 04:13:00 -04:00
|
|
|
-erase $(OUTPUTDIR)\*.pch
|
|
|
|
-erase $(OUTPUTDIR)\*.err
|
|
|
|
-erase $(OUTPUTDIR)\*.lbc
|
2003-01-22 12:13:52 -05:00
|
|
|
|
|
|
|
cleanall: clean
|
|
|
|
-erase $(LBCFILE)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXMSWOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
2003-06-19 04:05:26 -04:00
|
|
|
$text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
|
2003-01-22 12:13:52 -05:00
|
|
|
s/\.obj$//;
|
|
|
|
$text .= 'MSWDIR)\\';
|
|
|
|
|
|
|
|
my $suffix, $cc;
|
|
|
|
if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
|
|
|
|
$suffix = "c";
|
|
|
|
$cc="CC";
|
|
|
|
$flags="CFLAGS";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$suffix = "cpp";
|
|
|
|
$cc="CXX";
|
|
|
|
$flags="CXXFLAGS";
|
|
|
|
}
|
|
|
|
$text .= $_ . ".$suffix\n" .
|
|
|
|
" *\$($cc) \$($flags) \$<" . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Common objects (always compiled)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXCOMMONOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
2003-06-19 04:05:26 -04:00
|
|
|
$text .= "\$(OUTPUTDIR)\\" . $_;
|
2003-01-22 12:13:52 -05:00
|
|
|
s/\.obj$//;
|
|
|
|
$text .= ': $(COMMDIR)\\';
|
|
|
|
my $suffix, $cc;
|
|
|
|
if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
|
|
|
|
$suffix = "c";
|
|
|
|
$cc="CC";
|
|
|
|
$flags="CFLAGS";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$suffix = "cpp";
|
|
|
|
$cc="CXX";
|
|
|
|
$flags="CXXFLAGS";
|
|
|
|
}
|
|
|
|
$text .= $_ . ".$suffix\n" .
|
|
|
|
" *\$($cc) \$($flags) \$<" . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
zlib: .SYMBOLIC
|
|
|
|
cd $(WXDIR)\src\zlib
|
|
|
|
wmake -f makefile.wat all
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
clean_zlib: .SYMBOLIC
|
|
|
|
cd $(WXDIR)\src\zlib
|
|
|
|
wmake -f makefile.wat clean
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
regex: .SYMBOLIC
|
|
|
|
cd $(WXDIR)\src\regex
|
|
|
|
wmake -f makefile.wat all
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
clean_regex: .SYMBOLIC
|
|
|
|
cd $(WXDIR)\src\regex
|
|
|
|
wmake -f makefile.wat clean
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
MFTYPE=watbase
|
|
|
|
self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
|
|
|
|
cd $(WXDIR)\distrib\msw\tmake
|
2003-06-19 04:05:26 -04:00
|
|
|
perl -S tmake -t $(MFTYPE) wxwin.pro -o makebase.wat
|
2003-01-22 12:13:52 -05:00
|
|
|
copy makebase.wat $(WXDIR)\src\msw
|