1999-07-14 18:46:12 -04: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$
|
2003-04-05 05:14:07 -05:00
|
|
|
#! Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
|
1999-07-14 18:46:12 -04:00
|
|
|
#!#############################################################################
|
|
|
|
#${
|
|
|
|
#! 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 %wxGeneric) {
|
|
|
|
my $tag = "";
|
|
|
|
if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
|
|
|
|
$tag = "WXNONESSENTIALOBJS";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$tag = "WXGENERICOBJS";
|
|
|
|
}
|
|
|
|
|
|
|
|
$file =~ s/cp?p?$/obj/;
|
|
|
|
$project{$tag} .= $file . " "
|
|
|
|
}
|
2001-06-18 18:37:42 -04:00
|
|
|
|
|
|
|
foreach $file (sort keys %wxHTML) {
|
|
|
|
next if $wxHTML{$file} =~ /\b16\b/;
|
|
|
|
|
|
|
|
$file =~ s/cp?p?$/obj/;
|
|
|
|
$project{"WXHTMLOBJS"} .= $file . " "
|
|
|
|
}
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
foreach $file (sort keys %wxCommon) {
|
2002-01-03 18:08:41 -05:00
|
|
|
next if $wxCommon{$file} =~ /\b(16|U)\b/;
|
|
|
|
|
1999-10-25 03:19:13 -04:00
|
|
|
$isCFile = $file =~ /\.c$/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$file =~ s/cp?p?$/obj/;
|
1999-10-25 03:19:13 -04:00
|
|
|
$project{"WXCOMMONOBJS"} .= $file . " ";
|
|
|
|
$project{"WXCOBJS"} .= $file . " " if $isCFile;
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
foreach $file (sort keys %wxMSW) {
|
|
|
|
#! these files don't compile
|
|
|
|
next if $file =~ /^pnghand\./;
|
|
|
|
|
2003-01-22 12:13:52 -05:00
|
|
|
next if $wxMSW{$file} =~ /\b16\b/;
|
1999-07-14 18:46:12 -04:00
|
|
|
|
1999-10-25 03:19:13 -04:00
|
|
|
my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
|
|
|
|
my $isCFile = $file =~ /\.c$/;
|
1999-07-14 18:46:12 -04:00
|
|
|
$file =~ s/cp?p?$/obj/;
|
1999-10-25 03:19:13 -04:00
|
|
|
$project{"WXMSWOBJS"} .= $file . " ";
|
|
|
|
$project{"WXCOBJS"} .= $file . " " if $isCFile;
|
|
|
|
$project{"WXOLEOBJS"} .= $file . " " if $isOleObj
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
1999-10-25 03:19:13 -04:00
|
|
|
#! an attempt to embed '#' directly in the string somehow didn't work...
|
|
|
|
#$ $text = chr(35) . '!/binb/wmake.exe';
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2002-02-02 18:15:23 -05:00
|
|
|
# This file was automatically generated by tmake
|
1999-07-14 18:46:12 -04:00
|
|
|
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
|
|
|
|
|
|
|
|
#
|
|
|
|
# File: makefile.wat
|
|
|
|
# Author: Julian Smart
|
|
|
|
# Created: 1998
|
|
|
|
#
|
|
|
|
# Makefile : Builds wxWindows library for Watcom C++, WIN32
|
2003-01-22 12:13:52 -05:00
|
|
|
!include ..\makewat.env
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2003-01-25 07:13:36 -05:00
|
|
|
LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2001-12-08 18:28:29 -05:00
|
|
|
EXTRATARGETS = png zlib jpeg tiff regex
|
|
|
|
EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
|
1999-07-14 18:46:12 -04:00
|
|
|
GENDIR=$(WXDIR)\src\generic
|
|
|
|
COMMDIR=$(WXDIR)\src\common
|
2000-07-15 15:51:35 -04:00
|
|
|
JPEGDIR=$(WXDIR)\src\jpeg
|
|
|
|
TIFFDIR=$(WXDIR)\src\tiff
|
1999-07-14 18:46:12 -04:00
|
|
|
MSWDIR=$(WXDIR)\src\msw
|
1999-10-25 03:19:13 -04:00
|
|
|
OLEDIR=$(MSWDIR)\ole
|
2001-06-18 18:37:42 -04:00
|
|
|
HTMLDIR=$(WXDIR)\src\html
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
DOCDIR = $(WXDIR)\docs
|
|
|
|
|
2003-01-22 12:13:52 -05:00
|
|
|
GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
# These are generic things that don't need to be compiled on MSW,
|
|
|
|
# but sometimes it's useful to do so for testing purposes.
|
2003-01-22 12:13:52 -05:00
|
|
|
NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
COMMONOBJS = &
|
2003-01-22 12:13:52 -05:00
|
|
|
#$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2003-01-22 12:13:52 -05:00
|
|
|
MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2003-01-22 12:13:52 -05:00
|
|
|
HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
|
2001-06-18 18:37:42 -04:00
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
|
2001-06-18 18:37:42 -04:00
|
|
|
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2001-12-08 18:28:29 -05:00
|
|
|
SETUP_H=$(ARCHINCDIR)\wx\setup.h
|
|
|
|
|
2003-01-22 12:13:52 -05:00
|
|
|
all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
|
2001-12-08 18:28:29 -05:00
|
|
|
|
|
|
|
$(ARCHINCDIR)\wx:
|
2003-01-22 12:13:52 -05:00
|
|
|
mkdir $(ARCHINCDIR)
|
|
|
|
mkdir $(ARCHINCDIR)\wx
|
|
|
|
|
|
|
|
$(OUTPUTDIR):
|
|
|
|
@if not exist $^@ mkdir $^@
|
2001-12-08 18:28:29 -05:00
|
|
|
|
2003-04-05 05:14:07 -05:00
|
|
|
$(SETUP_H): $(ARCHINCDIR)\wx
|
|
|
|
if not exist $(WXDIR)\include\wx\msw\setup.h copy $(WXDIR)\include\wx\msw\setup0.h $(WXDIR)\include\wx\msw\setup.h
|
2003-01-22 12:13:52 -05:00
|
|
|
copy $(WXDIR)\include\wx\msw\setup.h $@
|
1999-07-14 18:46:12 -04:00
|
|
|
|
2003-01-22 12:13:52 -05:00
|
|
|
LBCFILE=wx$(TOOLKIT).lbc
|
1999-07-14 18:46:12 -04:00
|
|
|
$(LIBTARGET) : $(OBJECTS)
|
2003-01-22 12:13:52 -05:00
|
|
|
%create $(LBCFILE)
|
|
|
|
@for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
|
2003-02-09 17:03:49 -05:00
|
|
|
wlib /b /c /n $(LIBPAGESIZE) $^@ @$(LBCFILE)
|
1999-07-23 17:26:57 -04:00
|
|
|
|
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
|
|
|
|
-erase *.obj
|
|
|
|
-erase $(LIBTARGET)
|
|
|
|
-erase *.pch
|
|
|
|
-erase *.err
|
|
|
|
-erase *.lbc
|
|
|
|
|
|
|
|
cleanall: clean
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXMSWOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
2003-01-22 12:13:52 -05:00
|
|
|
$text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
|
1999-07-14 18:46:12 -04:00
|
|
|
s/\.obj$//;
|
1999-10-25 03:19:13 -04:00
|
|
|
if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
|
1999-07-14 18:46:12 -04:00
|
|
|
$text .= 'OLEDIR)\\';
|
|
|
|
} else {
|
|
|
|
$text .= 'MSWDIR)\\';
|
|
|
|
}
|
1999-10-25 03:19:13 -04:00
|
|
|
my $suffix, $cc;
|
|
|
|
if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
|
|
|
|
$suffix = "c";
|
|
|
|
$cc="CC";
|
2003-01-22 12:13:52 -05:00
|
|
|
$flags="CFLAGS";
|
1999-10-25 03:19:13 -04:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$suffix = "cpp";
|
2003-01-22 12:13:52 -05:00
|
|
|
$cc="CXX";
|
|
|
|
$flags="CXXFLAGS";
|
1999-10-25 03:19:13 -04:00
|
|
|
}
|
|
|
|
$text .= $_ . ".$suffix\n" .
|
2003-01-22 12:13:52 -05:00
|
|
|
" *\$($cc) \$($flags) \$<" . "\n\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Common objects (always compiled)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXCOMMONOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
2003-01-22 12:13:52 -05:00
|
|
|
$text .= "\$(OUTPUTDIR)\\" . $_;
|
1999-07-14 18:46:12 -04:00
|
|
|
s/\.obj$//;
|
|
|
|
$text .= ': $(COMMDIR)\\';
|
1999-10-25 03:19:13 -04:00
|
|
|
my $suffix, $cc;
|
|
|
|
if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
|
|
|
|
$suffix = "c";
|
|
|
|
$cc="CC";
|
2003-01-22 12:13:52 -05:00
|
|
|
$flags="CFLAGS";
|
1999-10-25 03:19:13 -04:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$suffix = "cpp";
|
2003-01-22 12:13:52 -05:00
|
|
|
$cc="CXX";
|
|
|
|
$flags="CXXFLAGS";
|
1999-10-25 03:19:13 -04:00
|
|
|
}
|
|
|
|
$text .= $_ . ".$suffix\n" .
|
2003-01-22 12:13:52 -05:00
|
|
|
" *\$($cc) \$($flags) \$<" . "\n\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
2003-04-05 05:14:07 -05:00
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
########################################################
|
|
|
|
# Generic objects (not always compiled, depending on
|
|
|
|
# whether platforms have native implementations)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXGENERICOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
2003-01-22 12:13:52 -05:00
|
|
|
$text .= "\$(OUTPUTDIR)\\" . $_;
|
1999-07-14 18:46:12 -04:00
|
|
|
s/\.obj$//;
|
|
|
|
$text .= ': $(GENDIR)\\';
|
|
|
|
$text .= $_ . ".cpp\n" .
|
2003-01-22 12:13:52 -05:00
|
|
|
' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
2001-06-18 18:37:42 -04:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# HTML objects (always compiled)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXHTMLOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
2003-01-22 12:13:52 -05:00
|
|
|
$text .= "\$(OUTPUTDIR)\\" . $_;
|
2001-06-18 18:37:42 -04:00
|
|
|
s/\.obj$//;
|
|
|
|
$text .= ': $(HTMLDIR)\\';
|
|
|
|
$text .= $_ . ".cpp\n" .
|
2003-01-22 12:13:52 -05:00
|
|
|
' *$(CXX) $(CXXFLAGS) $<' . "\n\n";
|
2001-06-18 18:37:42 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
1999-07-14 18:46:12 -04:00
|
|
|
png: .SYMBOLIC
|
|
|
|
cd $(WXDIR)\src\png
|
|
|
|
wmake -f makefile.wat all
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
clean_png: .SYMBOLIC
|
|
|
|
cd $(WXDIR)\src\png
|
|
|
|
wmake -f makefile.wat clean
|
|
|
|
cd $(WXDIR)\src\msw
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
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
|
|
|
|
|
2001-12-08 18:28:29 -05:00
|
|
|
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
|
|
|
|
|
1999-07-23 17:26:57 -04:00
|
|
|
MFTYPE=wat
|
2000-02-06 14:11:10 -05:00
|
|
|
self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
|
|
|
|
cd $(WXDIR)\distrib\msw\tmake
|
1999-07-23 17:26:57 -04:00
|
|
|
tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
|
2000-02-06 14:11:10 -05:00
|
|
|
copy makefile.$(MFTYPE) $(WXDIR)\src\msw
|