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
|
1999-10-23 15:55:01 -04:00
|
|
|
#! TODO:
|
1999-10-24 09:07:26 -04:00
|
|
|
#! - extended.c, unzip.c must be compiled with $(CC), not $(CCC).
|
1999-10-23 15:55:01 -04:00
|
|
|
#! - extended.c, unzip.c targets must be as per b32.t etc.
|
|
|
|
#! - OLE files not generated correctly (need 'ole/' directory)
|
1999-07-14 18:46:12 -04:00
|
|
|
#! 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 %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) {
|
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\./;
|
|
|
|
|
1999-11-08 20:52:28 -05:00
|
|
|
#! next if $wxGeneric{$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
|
|
|
|
|
|
|
# This file was automatically generated by tmake at #$ Now()
|
|
|
|
# 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
|
1999-10-24 11:14:05 -04:00
|
|
|
#
|
|
|
|
# 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.
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
WXDIR = ..\..
|
|
|
|
|
|
|
|
!include $(WXDIR)\src\makewat.env
|
|
|
|
|
|
|
|
WXLIB = $(WXDIR)\lib
|
|
|
|
|
|
|
|
LIBTARGET = $(WXLIB)\wx.lib
|
|
|
|
DUMMY=dummydll
|
|
|
|
# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
|
|
|
|
|
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
|
|
|
|
|
|
|
|
GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t")
|
|
|
|
|
|
|
|
# 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")
|
|
|
|
|
|
|
|
COMMONOBJS = &
|
|
|
|
y_tab.obj &
|
|
|
|
#$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t")
|
|
|
|
|
|
|
|
MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t")
|
|
|
|
|
2001-06-18 18:37:42 -04:00
|
|
|
HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t")
|
|
|
|
|
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
|
|
|
ARCHINCDIR=$(WXDIR)\lib\msw
|
|
|
|
SETUP_H=$(ARCHINCDIR)\wx\setup.h
|
|
|
|
|
|
|
|
all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
|
|
|
|
|
|
|
|
$(ARCHINCDIR)\wx:
|
|
|
|
mkdir $(ARCHINCDIR)
|
|
|
|
mkdir $(ARCHINCDIR)\wx
|
|
|
|
|
|
|
|
$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
|
|
|
|
copy $(WXDIR)\include\wx\msw\setup.h $@
|
1999-07-14 18:46:12 -04:00
|
|
|
|
|
|
|
$(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
|
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) {
|
|
|
|
$text .= $_ . ': $(';
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$suffix = "cpp";
|
|
|
|
$cc="CCC";
|
|
|
|
}
|
|
|
|
$text .= $_ . ".$suffix\n" .
|
|
|
|
" *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Common objects (always compiled)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXCOMMONOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
|
|
|
$text .= $_;
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$suffix = "cpp";
|
|
|
|
$cc="CCC";
|
|
|
|
}
|
|
|
|
$text .= $_ . ".$suffix\n" .
|
|
|
|
" *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n";
|
1999-07-14 18:46:12 -04:00
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
|
|
|
|
copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
|
|
|
|
|
|
|
|
$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
|
|
|
|
copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Generic objects (not always compiled, depending on
|
|
|
|
# whether platforms have native implementations)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXGENERICOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
|
|
|
$text .= $_;
|
|
|
|
s/\.obj$//;
|
|
|
|
$text .= ': $(GENDIR)\\';
|
|
|
|
$text .= $_ . ".cpp\n" .
|
|
|
|
' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
2001-06-18 18:37:42 -04:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# HTML objects (always compiled)
|
|
|
|
|
|
|
|
#${
|
|
|
|
$_ = $project{"WXHTMLOBJS"};
|
|
|
|
my @objs = split;
|
|
|
|
foreach (@objs) {
|
|
|
|
$text .= $_;
|
|
|
|
s/\.obj$//;
|
|
|
|
$text .= ': $(HTMLDIR)\\';
|
|
|
|
$text .= $_ . ".cpp\n" .
|
|
|
|
' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n";
|
|
|
|
}
|
|
|
|
#$}
|
|
|
|
|
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
|