new (for wxBase) or updated and (hopefully() improved Watcom makefiles

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-01-22 17:13:52 +00:00
parent 23d2edff35
commit a0499e2f21
12 changed files with 1853 additions and 1246 deletions

View File

@ -2,10 +2,6 @@
#! 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$
@ -49,7 +45,7 @@
#! 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$/;
@ -71,25 +67,9 @@
# 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.
!include ..\makewat.env
WXDIR = ..\..
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
LIBTARGET = $(WXLIB)\wx.lib
DUMMY=dummydll
# ODBCLIB = ..\..\contrib\odbc\odbc32.lib
LIBTARGET = $(WXDIR)\lib\wx$(TOOLKIT)$(DEBGUSUFFIX)$(WATCOM_SUFFIX).lib
EXTRATARGETS = png zlib jpeg tiff regex
EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
@ -103,44 +83,42 @@ HTMLDIR=$(WXDIR)\src\html
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 /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
@ -156,7 +134,7 @@ cleanall: clean
$_ = $project{"WXMSWOBJS"};
my @objs = split;
foreach (@objs) {
$text .= $_ . ': $(';
$text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
s/\.obj$//;
if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) {
$text .= 'OLEDIR)\\';
@ -167,13 +145,15 @@ cleanall: clean
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";
}
#$}
@ -184,27 +164,27 @@ cleanall: clean
$_ = $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
@ -220,11 +200,11 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.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";
}
#$}
@ -236,11 +216,11 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
$_ = $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";
}
#$}

182
distrib/msw/tmake/watbase.t Normal file
View File

@ -0,0 +1,182 @@
#!#############################################################################
#! 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
LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib
EXTRATARGETS = zlib regex
EXTRATARGETSCLEAN = clean_zlib clean_regex
COMMDIR=$(WXDIR)\src\common
MSWDIR=$(WXDIR)\src\msw
OLEDIR=$(MSWDIR)\ole
COMMONOBJS = &
#$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)", " &\n\t\$(OUTPUTDIR)")
MSWOBJS = &
#$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)", " &\n\t\$(OUTPUTDIR)")
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 $@
LBCFILE=$(OUTPUTDIR)wx$(TOOLKIT).lbc
$(LIBTARGET) : $(OBJECTS)
%create $(LBCFILE)
@for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
-erase *.obj
-erase $(LIBTARGET)
-erase *.pch
-erase *.err
-erase *.lbc
cleanall: clean
-erase $(LBCFILE)
#${
$_ = $project{"WXMSWOBJS"};
my @objs = split;
foreach (@objs) {
$text .= "\$(OUTPUTDIR)" . $_ . ': $(';
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) {
$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="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
tmake -t $(MFTYPE) wxwin.pro -o makebase.wat
copy makebase.wat $(WXDIR)\src\msw

View File

@ -0,0 +1,9 @@
wxUSE_GUI = 0
OUTPUTDIR = Watcom\
PROGRAM = console
OBJECTS = $(OUTPUTDIR)$(PROGRAM).obj
!include $(%WXWIN)\src\makeprog.wat

View File

@ -13,81 +13,83 @@ EXTRACPPFLAGS=-i=..\zlib
WXLIB = $(WXDIR)\lib
LIBTARGET = $(WXLIB)\jpeg.lib
LIBTARGET = $(WXLIB)\jpeg$(WATCOM_SUFFIX).lib
SYSDEPMEM= jmemnobs.obj
# source files: JPEG library proper
LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c &
jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c &
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c &
jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c &
jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c &
jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c &
jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c &
jquant2.c jutils.c jmemmgr.c
# memmgr back ends: compile only one of these into a working library
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c &
rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
# files included by source files
INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h &
jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
# documentation, test, and support files
DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc &
coderules.doc filelist.doc change.log
MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc &
makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds &
makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st &
maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms &
makvms.opt
CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
jconfig.vms
CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
testimgp.jpg
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
COMOBJECTS = &
$(OUTPUTDIR)jcomapi.obj &
$(OUTPUTDIR)jutils.obj &
$(OUTPUTDIR)jerror.obj &
$(OUTPUTDIR)jmemmgr.obj &
$(OUTPUTDIR)jmemnobs.obj
# compression library object files
CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
CLIBOBJECTS = &
$(OUTPUTDIR)jcapimin.obj &
$(OUTPUTDIR)jcapistd.obj &
$(OUTPUTDIR)jctrans.obj &
$(OUTPUTDIR)jcparam.obj &
$(OUTPUTDIR)jdatadst.obj &
$(OUTPUTDIR)jcinit.obj &
$(OUTPUTDIR)jcmaster.obj &
$(OUTPUTDIR)jcmarker.obj &
$(OUTPUTDIR)jcmainct.obj &
$(OUTPUTDIR)jcprepct.obj &
$(OUTPUTDIR)jccoefct.obj &
$(OUTPUTDIR)jccolor.obj &
$(OUTPUTDIR)jcsample.obj &
$(OUTPUTDIR)jchuff.obj &
$(OUTPUTDIR)jcphuff.obj &
$(OUTPUTDIR)jcdctmgr.obj &
$(OUTPUTDIR)jfdctfst.obj &
$(OUTPUTDIR)jfdctflt.obj &
$(OUTPUTDIR)jfdctint.obj
# decompression library object files
DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
jquant1.obj jquant2.obj jdmerge.obj
DLIBOBJECTS = &
$(OUTPUTDIR)jdapimin.obj &
$(OUTPUTDIR)jdapistd.obj &
$(OUTPUTDIR)jdtrans.obj &
$(OUTPUTDIR)jdatasrc.obj &
$(OUTPUTDIR)jdmaster.obj &
$(OUTPUTDIR)jdinput.obj &
$(OUTPUTDIR)jdmarker.obj &
$(OUTPUTDIR)jdhuff.obj &
$(OUTPUTDIR)jdphuff.obj &
$(OUTPUTDIR)jdmainct.obj &
$(OUTPUTDIR)jdcoefct.obj &
$(OUTPUTDIR)jdpostct.obj &
$(OUTPUTDIR)jddctmgr.obj &
$(OUTPUTDIR)jidctfst.obj &
$(OUTPUTDIR)jidctflt.obj &
$(OUTPUTDIR)jidctint.obj &
$(OUTPUTDIR)jidctred.obj &
$(OUTPUTDIR)jdsample.obj &
$(OUTPUTDIR)jdcolor.obj &
$(OUTPUTDIR)jquant1.obj &
$(OUTPUTDIR)jquant2.obj &
$(OUTPUTDIR)jdmerge.obj
# These objectfiles are included in libjpeg.lib
OBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
rdswitch.obj cdjpeg.obj
DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
rdcolmap.obj cdjpeg.obj
TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
all: $(OBJECTS) $(LIBTARGET)
OBJECTS = $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
all: $(OUTPUTDIR) $(LIBTARGET) .SYMBOLIC
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
LBCFILE=$(OUTPUTDIR)jpeg.lbc
$(LIBTARGET) : $(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 /q /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC
-erase *.obj
clean: .SYMBOLIC
-erase $(OUTPUTDIR)*.obj
-erase $(LIBTARGET)
-erase *.pch
-erase *.err
-erase *.lbc
-erase $(OUTPUTDIR)*.pch
-erase $(OUTPUTDIR)*.err
-erase $(OUTPUTDIR)*.lbc
cleanall: clean

View File

@ -1,16 +1,14 @@
WXDIR = $(%WXWIN)
!include makewat.env
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
# the name of the file containing the objects to be put in the library
LNK = tmp.lbc
all: $(LIBTARGET)
$(LIBTARGET) : $(OBJECTS)
%create tmp.lbc
@for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
wlib /b /c /n /p=512 $^@ @tmp.lbc
%create $(LNK)
@for %i in ( $(OBJECTS) ) do @%append $(LNK) +%i
wlib /b /c /n /p=512 $^@ @$(LNK)
clean: .SYMBOLIC
-erase *.obj

View File

@ -3,37 +3,49 @@ WXDIR = $(%WXWIN)
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
LNK = $(PROGRAM).lnk
LNK = $(OUTPUTDIR)$(PROGRAM).lnk
all: $(PROGRAM).exe $(EXTRATARGETS)
all: $(OUTPUTDIR) $(OUTPUTDIR)$(PROGRAM).exe $(EXTRATARGETS) .SYMBOLIC
$(PROGRAM).exe : $(OBJECTS) $(PROGRAM).res $(LNK) $(WXLIB)\wx.lib
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
!ifeq wxUSE_GUI 0
RESFILE=
!else
RESFILE=$(OUTPUTDIR)$(PROGRAM).res
!endif
$(OUTPUTDIR)$(PROGRAM).exe : $(OBJECTS) $(RESFILE) $(LNK) $(WXLIB)\$(LIBNAME).lib
wlink @$(LNK)
$(BINDCOMMAND) $(PROGRAM).res
!ifneq wxUSE_GUI 0
$(BINDCOMMAND) $(RESFILE)
!endif
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
$(RC) $(RESFLAGS1) $(PROGRAM).rc
!ifneq wxUSE_GUI 0
$(RESFILE): $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
$(RC) $(RESFLAGS) /fo=$(RESFILE) $(PROGRAM).rc
!endif
$(LNK) : makefile.wat
%create $(LNK)
@%append $(LNK) debug all
@%append $(LNK) $(DEBUGINFO)
@%append $(LNK) system $(LINKOPTION)
@%append $(LNK) $(STACK)
@%append $(LNK) name $(PROGRAM).exe
@%append $(LNK) name $(OUTPUTDIR)$(PROGRAM).exe
@for %i in ($(OBJECTS)) do @%append $(LNK) file %i
@for %i in ($(LIBS)) do @%append $(LNK) lib %i
@for %i in ($(EXTRALIBS)) do @%append $(LNK) lib %i
# @%append $(LNK) $(MINDATA)
# @%append $(LNK) $(MAXDATA)
clean: .SYMBOLIC
-erase *.obj
-erase *.bak
-erase *.err
-erase *.pch
-erase *.lib
-erase $(OUTPUTDIR)*.obj
-erase $(OUTPUTDIR)*.bak
-erase $(OUTPUTDIR)*.err
-erase $(OUTPUTDIR)*.pch
-erase $(OUTPUTDIR)*.lib
-erase $(LNK)
-erase *.res
-erase *.exe
-erase *.lbc
-erase $(OUTPUTDIR)*.res
-erase $(OUTPUTDIR)*.exe
-erase $(OUTPUTDIR)*.lbc
-rmdir $(OUTPUTDIR)

View File

@ -1,64 +1,132 @@
# File: makewat.env
###############################################################################
# File: src/makewat.env
# Purpose: Watcom environments for wxWindows makefiles.
# Author: Julian Smart and others
#
# The main things to change are:
# Version: $Id$
###############################################################################
# The following environment variables must be set:
#
# WATCOM: set to where the compiler is installed
# WXDIR: set to where the wxWindows is installed
# MODE: set to windows [16 bit windows], nt [win32s], or win386 [32-bit non-WIN32]
# WXWIN: set to where the wxWindows is installed
# PATH: set correctly, i.e. contains all Watcom directories
# LIB: same as PATH
# INCLUDE: same as PATH
# set wxUSE_GUI=0 to build wxBase instead of (default) wxMSW
!ifndef wxUSE_GUI
wxUSE_GUI=1
!endif
# set FINAL=1 to disable debug and enable optimizations
FINAL=0
WATCOMDIR=$(%WATCOM)
# set WATCOM_SUFFIX to nothing if you use only Watcom compiler, set it to
# something Watcom-specific if you want to build wxWindows with more than one
# compiler
WATCOM_SUFFIX=_w
.EXTENSIONS:
.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
#WXDIR = d:\wx2\wxwind~1
!ifndef %WATCOM
!error WATCOM environment variable must be set!
!endif
WATCOMDIR=$(%WATCOM)
!ifndef %WXWIN
!error WXWIN environment variable must be set!
!endif
WXDIR = $(%WXWIN)
WXINC = $(WXDIR)\include
# Suffixes
OBJSUFF=obj
SRCSUFF=cpp
!ifeq FINAL 1
WXDEBUG=0
!ifneq NOPRECOMP 1
PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch
!else
WXDEBUG=1
!endif
!ifeq WXDEBUG 1
DEBUGFLAGS = /D__WXDEBUG__ /o1
DEBUGFLAGS = /D__WXDEBUG__
DEBUGCFLAGS = $(DEBUGFLAGS) /d2
DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
DEBUGINFO = debug all
DEBUGSUFFIX = d
!else
DEBUGFLAGS =
DEBUGCFLAGS =
DEBUGCXXFLAGS =
DEBUGINFO =
DEBUGSUFFIX =
!endif
RC = wrc
# TOOLKIT is used as the name of lib subdir containing wx/setup.h
# BASEDIRPREFIX is used to construct OUTPUTDIR
!ifeq wxUSE_GUI 0
TOOLKIT = base
BASEDIRPREFIX = Base
LINKOPTION = nt
!else
TOOLKIT = msw
LINKOPTION = nt_win
BASEDIRPREFIX =
!endif
ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
!ifeq FINAL 1
CONFIGURATION=Release
!else
CONFIGURATION=Debug
!endif
# set OUTPUTDIR to the directory to be used for the .obj files created during
# the build (under $WXWIN)
!ifndef OUTPUTDIR
OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
!endif
!ifneq NOPRECOMP 1
PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
!endif
# the basename of the library
LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
# You shouldn't have to modify anything after this point
########################################################
# only LEVEL=386 is currently supported, 16 bit compilation is probably broken
LEVEL = 386
CCC = wpp$(LEVEL)
CC = wcc$(LEVEL)
OS_TARGET = nt_win
MODEL =
# If you use win95, assumptions will be made about Win95 icon format etc.
# so nt_win is probably better for simultaneous Win32s/Win95/NT operation.
LINKOPTION = nt_win # win95
WINVERFLAGS = /dWINVER=0x400 /d__WIN95__
CXX = wpp$(LEVEL)
CC = wcc$(LEVEL)
RC = wrc
WINVERFLAGS = /dWINVER=0x400
BINDCOMMAND = wrc
WATLIBDIR = $(WATCOMDIR)\lib386\nt
MINDATA =
MAXDATA =
STACK = option stack=64k
LIBS = $(WXDIR)\lib\wx.lib $(WXDIR)\lib\regex.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\tiff.lib $(WXDIR)\lib\jpeg.lib &
$(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
$(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\opengl32.lib &
$(WATLIBDIR)\uuid.lib $(WXDIR)\lib\watcom\odbc32.lib
IFLAGS = -i=$(WXDIR)\lib\msw -i=$(WXINC) -i=$(WXDIR)\contrib\include -i=$(%watcom)\h;$(%watcom)\h\nt;$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff;$(WXDIR)\include\wx\msw\gnuwin32
RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
RESFLAGS2 = -R $(name) /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
$(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
$(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
!ifneq wxUSE_GUI 0
$(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
$(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
$(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
!endif
$(WATLIBDIR)\comctl32.lib &
$(WATLIBDIR)\comdlg32.lib &
$(WATLIBDIR)\odbc32.lib &
$(WATLIBDIR)\ole32.lib &
$(WATLIBDIR)\oleaut32.lib &
$(WATLIBDIR)\opengl32.lib &
$(WATLIBDIR)\uuid.lib
IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
-i=$(%watcom)\h;$(%watcom)\h\nt &
-i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
-i=$(WXDIR)\include\wx\msw\gnuwin32
RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
# Here are some possible optimization flags:
# /5r Pentium timings
@ -67,29 +135,33 @@ RESFLAGS2 = -R $(name) /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERF
# /or Reordering for Pentium timings (included in /ox)
# The Watcom-recommended flags for optimum Pentium speed are:
# /oneatx /zp4 /5 /fpi87 /fp5
OPTFLAGS=/ox /5r
# /d1 for line numbers only: anything else produces an enormous wx32.lib
# for PPro:
# OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
#
# optimize for space/time: /os or /ot
!ifeq FINAL 1
OPTFLAGS=/oails /5r
!else
OPTFLAGS=/od
!endif
# NB: /bm switch is needed for thread-safe runtime, if you don't use
# wxThread you may remove it
CPPFLAGS = /bt=nt /w1 /DWIN32 /bm /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) $(DEBUGFLAGS) /d__WXMSW__ $(WINVERFLAGS) $(EXTRACPPFLAGS) # /d__WATCOMC__
CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
!ifeq wxUSE_GUI 0
CPPFLAGS += /dwxUSE_GUI=0
!endif
CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
.cpp.obj: # $< # .AUTODEPEND
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
*$(CXX) $(CXXFLAGS) $<
.c.obj: # $< # .AUTODEPEND
*$(CC) $(CPPFLAGS) $(IFLAGS) $<
*$(CC) $(CFLAGS) $<
# This doesn't work for wcc
# %create tmp.lbc
# @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $<
# echo $<
# $(CC) @tmp.lbc
dummy: .SYMBOLIC
@echo Please give a target for wxWin makefiles: the usual one is 'all'.
defaulttarget: all .SYMBOLIC
erasepch: .SYMBOLIC
-erase $(WXDIR)\src\msw\watcom.pch
-erase $(OUTPUTDIR)watcom.pch

412
src/msw/makebase.wat Normal file
View File

@ -0,0 +1,412 @@
#!/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
LIBTARGET = $(WXDIR)\lib\wx$(TOOLKIT)$(DEBUGSUFFIX)_w.lib
EXTRATARGETS = zlib regex
EXTRATARGETSCLEAN = clean_zlib clean_regex
COMMDIR=$(WXDIR)\src\common
MSWDIR=$(WXDIR)\src\msw
OLEDIR=$(MSWDIR)\ole
COMMONOBJS = &
$(OUTPUTDIR)appcmn.obj &
$(OUTPUTDIR)clntdata.obj &
$(OUTPUTDIR)cmdline.obj &
$(OUTPUTDIR)config.obj &
$(OUTPUTDIR)datetime.obj &
$(OUTPUTDIR)datstrm.obj &
$(OUTPUTDIR)db.obj &
$(OUTPUTDIR)dbtable.obj &
$(OUTPUTDIR)dircmn.obj &
$(OUTPUTDIR)dynarray.obj &
$(OUTPUTDIR)dynlib.obj &
$(OUTPUTDIR)dynload.obj &
$(OUTPUTDIR)encconv.obj &
$(OUTPUTDIR)event.obj &
$(OUTPUTDIR)extended.obj &
$(OUTPUTDIR)ffile.obj &
$(OUTPUTDIR)file.obj &
$(OUTPUTDIR)fileconf.obj &
$(OUTPUTDIR)filefn.obj &
$(OUTPUTDIR)filename.obj &
$(OUTPUTDIR)filesys.obj &
$(OUTPUTDIR)fontmap.obj &
$(OUTPUTDIR)fs_inet.obj &
$(OUTPUTDIR)fs_mem.obj &
$(OUTPUTDIR)fs_zip.obj &
$(OUTPUTDIR)ftp.obj &
$(OUTPUTDIR)hash.obj &
$(OUTPUTDIR)hashmap.obj &
$(OUTPUTDIR)http.obj &
$(OUTPUTDIR)intl.obj &
$(OUTPUTDIR)ipcbase.obj &
$(OUTPUTDIR)list.obj &
$(OUTPUTDIR)log.obj &
$(OUTPUTDIR)longlong.obj &
$(OUTPUTDIR)memory.obj &
$(OUTPUTDIR)mimecmn.obj &
$(OUTPUTDIR)module.obj &
$(OUTPUTDIR)msgout.obj &
$(OUTPUTDIR)mstream.obj &
$(OUTPUTDIR)object.obj &
$(OUTPUTDIR)process.obj &
$(OUTPUTDIR)protocol.obj &
$(OUTPUTDIR)regex.obj &
$(OUTPUTDIR)sckaddr.obj &
$(OUTPUTDIR)sckfile.obj &
$(OUTPUTDIR)sckipc.obj &
$(OUTPUTDIR)sckstrm.obj &
$(OUTPUTDIR)socket.obj &
$(OUTPUTDIR)strconv.obj &
$(OUTPUTDIR)stream.obj &
$(OUTPUTDIR)string.obj &
$(OUTPUTDIR)sysopt.obj &
$(OUTPUTDIR)textbuf.obj &
$(OUTPUTDIR)textfile.obj &
$(OUTPUTDIR)timercmn.obj &
$(OUTPUTDIR)tokenzr.obj &
$(OUTPUTDIR)txtstrm.obj &
$(OUTPUTDIR)unzip.obj &
$(OUTPUTDIR)url.obj &
$(OUTPUTDIR)utilscmn.obj &
$(OUTPUTDIR)variant.obj &
$(OUTPUTDIR)wfstream.obj &
$(OUTPUTDIR)wxchar.obj &
$(OUTPUTDIR)zipstrm.obj &
$(OUTPUTDIR)zstream.obj &
$(OUTPUTDIR)init.obj
MSWOBJS = &
$(OUTPUTDIR)dde.obj &
$(OUTPUTDIR)dir.obj &
$(OUTPUTDIR)gsocket.obj &
$(OUTPUTDIR)gsockmsw.obj &
$(OUTPUTDIR)main.obj &
$(OUTPUTDIR)mimetype.obj &
$(OUTPUTDIR)regconf.obj &
$(OUTPUTDIR)registry.obj &
$(OUTPUTDIR)snglinst.obj &
$(OUTPUTDIR)thread.obj &
$(OUTPUTDIR)utils.obj &
$(OUTPUTDIR)utilsexc.obj &
$(OUTPUTDIR)volume.obj
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 $@
LBCFILE=$(OUTPUTDIR)wx$(TOOLKIT).lbc
$(LIBTARGET) : $(OBJECTS)
%create $(LBCFILE)
@for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
-erase *.obj
-erase $(LIBTARGET)
-erase *.pch
-erase *.err
-erase *.lbc
cleanall: clean
-erase $(LBCFILE)
$(OUTPUTDIR)dde.obj: $(MSWDIR)\dde.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)dir.obj: $(MSWDIR)\dir.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)gsocket.obj: $(MSWDIR)\gsocket.c
*$(CC) $(CFLAGS) $<
$(OUTPUTDIR)gsockmsw.obj: $(MSWDIR)\gsockmsw.c
*$(CC) $(CFLAGS) $<
$(OUTPUTDIR)main.obj: $(MSWDIR)\main.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)mimetype.obj: $(MSWDIR)\mimetype.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)regconf.obj: $(MSWDIR)\regconf.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)registry.obj: $(MSWDIR)\registry.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)snglinst.obj: $(MSWDIR)\snglinst.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)thread.obj: $(MSWDIR)\thread.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)utils.obj: $(MSWDIR)\utils.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)utilsexc.obj: $(MSWDIR)\utilsexc.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)volume.obj: $(MSWDIR)\volume.cpp
*$(CXX) $(CXXFLAGS) $<
########################################################
# Common objects (always compiled)
$(OUTPUTDIR)appcmn.obj: $(COMMDIR)\appcmn.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)clntdata.obj: $(COMMDIR)\clntdata.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)cmdline.obj: $(COMMDIR)\cmdline.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)config.obj: $(COMMDIR)\config.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)datetime.obj: $(COMMDIR)\datetime.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)datstrm.obj: $(COMMDIR)\datstrm.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)db.obj: $(COMMDIR)\db.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)dbtable.obj: $(COMMDIR)\dbtable.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)dircmn.obj: $(COMMDIR)\dircmn.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)dynarray.obj: $(COMMDIR)\dynarray.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)dynlib.obj: $(COMMDIR)\dynlib.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)dynload.obj: $(COMMDIR)\dynload.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)encconv.obj: $(COMMDIR)\encconv.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)event.obj: $(COMMDIR)\event.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)extended.obj: $(COMMDIR)\extended.c
*$(CC) $(CFLAGS) $<
$(OUTPUTDIR)ffile.obj: $(COMMDIR)\ffile.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)file.obj: $(COMMDIR)\file.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)fileconf.obj: $(COMMDIR)\fileconf.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)filefn.obj: $(COMMDIR)\filefn.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)filename.obj: $(COMMDIR)\filename.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)filesys.obj: $(COMMDIR)\filesys.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)fontmap.obj: $(COMMDIR)\fontmap.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)fs_inet.obj: $(COMMDIR)\fs_inet.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)fs_mem.obj: $(COMMDIR)\fs_mem.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)fs_zip.obj: $(COMMDIR)\fs_zip.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)ftp.obj: $(COMMDIR)\ftp.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)hash.obj: $(COMMDIR)\hash.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)hashmap.obj: $(COMMDIR)\hashmap.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)http.obj: $(COMMDIR)\http.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)intl.obj: $(COMMDIR)\intl.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)ipcbase.obj: $(COMMDIR)\ipcbase.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)list.obj: $(COMMDIR)\list.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)log.obj: $(COMMDIR)\log.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)longlong.obj: $(COMMDIR)\longlong.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)memory.obj: $(COMMDIR)\memory.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)mimecmn.obj: $(COMMDIR)\mimecmn.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)module.obj: $(COMMDIR)\module.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)msgout.obj: $(COMMDIR)\msgout.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)mstream.obj: $(COMMDIR)\mstream.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)object.obj: $(COMMDIR)\object.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)process.obj: $(COMMDIR)\process.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)protocol.obj: $(COMMDIR)\protocol.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)regex.obj: $(COMMDIR)\regex.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)sckaddr.obj: $(COMMDIR)\sckaddr.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)sckfile.obj: $(COMMDIR)\sckfile.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)sckipc.obj: $(COMMDIR)\sckipc.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)sckstrm.obj: $(COMMDIR)\sckstrm.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)socket.obj: $(COMMDIR)\socket.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)strconv.obj: $(COMMDIR)\strconv.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)stream.obj: $(COMMDIR)\stream.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)string.obj: $(COMMDIR)\string.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)sysopt.obj: $(COMMDIR)\sysopt.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)textbuf.obj: $(COMMDIR)\textbuf.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)textfile.obj: $(COMMDIR)\textfile.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)timercmn.obj: $(COMMDIR)\timercmn.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)tokenzr.obj: $(COMMDIR)\tokenzr.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)txtstrm.obj: $(COMMDIR)\txtstrm.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)unzip.obj: $(COMMDIR)\unzip.c
*$(CC) $(CFLAGS) $<
$(OUTPUTDIR)url.obj: $(COMMDIR)\url.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)utilscmn.obj: $(COMMDIR)\utilscmn.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)variant.obj: $(COMMDIR)\variant.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)wfstream.obj: $(COMMDIR)\wfstream.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)wxchar.obj: $(COMMDIR)\wxchar.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)zipstrm.obj: $(COMMDIR)\zipstrm.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)zstream.obj: $(COMMDIR)\zstream.cpp
*$(CXX) $(CXXFLAGS) $<
$(OUTPUTDIR)init.obj: $(COMMDIR)\init.cpp
*$(CXX) $(CXXFLAGS) $<
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
tmake -t $(MFTYPE) wxwin.pro -o makebase.wat
copy makebase.wat $(WXDIR)\src\msw

File diff suppressed because it is too large Load Diff

View File

@ -8,30 +8,48 @@
WXDIR = ..\..
EXTRACPPFLAGS=-i=..\zlib
OUTPUTDIR=Watcom\
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
LIBTARGET = $(WXLIB)\png.lib
LIBTARGET = $(WXLIB)\png$(WATCOM_SUFFIX).lib
OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj &
pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj &
pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj
OBJECTS = &
$(OUTPUTDIR)png.obj &
$(OUTPUTDIR)pngread.obj &
$(OUTPUTDIR)pngrtran.obj &
$(OUTPUTDIR)pngrutil.obj &
$(OUTPUTDIR)pngpread.obj &
$(OUTPUTDIR)pngtrans.obj &
$(OUTPUTDIR)pngwrite.obj &
$(OUTPUTDIR)pngwtran.obj &
$(OUTPUTDIR)pngwutil.obj &
$(OUTPUTDIR)pngerror.obj &
$(OUTPUTDIR)pngmem.obj &
$(OUTPUTDIR)pngwio.obj &
$(OUTPUTDIR)pngrio.obj &
$(OUTPUTDIR)pngget.obj &
$(OUTPUTDIR)pngset.obj
all: $(OBJECTS) $(LIBTARGET)
all: $(OUTPUTDIR) $(LIBTARGET) .SYMBOLIC
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
LBCFILE=$(OUTPUTDIR)png.lbc
$(LIBTARGET) : $(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 /q /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC
-erase *.obj
-erase $(OUTPUTDIR)*.obj
-erase $(LIBTARGET)
-erase *.pch
-erase *.err
-erase *.lbc
-erase $(OUTPUTDIR)*.pch
-erase $(OUTPUTDIR)*.err
-erase $(OUTPUTDIR)*.lbc
cleanall: clean

View File

@ -9,24 +9,30 @@
WXDIR = ..\..
EXTRACPPFLAGS=-DPOSIX_MISTAKE
OUTPUTDIR=watcom\
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
LIBTARGET = $(WXLIB)\regex.lib
LIBTARGET = $(WXLIB)\regex$(WATCOM_SUFFIX).lib
OBJECTS= &
regcomp.obj &
regexec.obj &
regerror.obj &
regfree.obj
OBJECTS = &
$(OUTPUTDIR)regcomp.obj &
$(OUTPUTDIR)regexec.obj &
$(OUTPUTDIR)regerror.obj &
$(OUTPUTDIR)regfree.obj
all: $(OBJECTS) $(LIBTARGET)
all: $(OUTPUTDIR) $(LIBTARGET) .SYMBOLIC
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
LBCFILE=$(OUTPUTDIR)regex.lbc
$(LIBTARGET) : $(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 /q /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC
-erase *.obj

View File

@ -1,103 +1,51 @@
# Makefile for zlib
# Watcom 10a
##############################################################################
# Name: src/zlib/makefile.wat
# Purpose: build zlib using Watcom 11.0+ compiler
# Author: Vadim Zeitlin
# Created: 21.01.03
# RCS-ID: $Id$
# Copyright: (c) 2003 Vadim Zeitlin
# Licence: wxWindows licence
##############################################################################
# This version of the zlib makefile was adapted by Chris Young for use
# with Watcom 10a 32-bit protected mode flat memory model. It was created
# for use with POV-Ray ray tracer and you may choose to edit the CFLAGS to
# suit your needs but the -DMSDOS is required.
# -- Chris Young 76702.1655@compuserve.com
WXDIR = ..\..
OUTPUTDIR=watcom\
# To use, do "wmake -f makefile.wat"
!include $(WXDIR)\src\makewat.env
# See zconf.h for details about the memory requirements.
# ------------- Watcom 10a -------------
MODEL=-mf
CFLAGS= $(MODEL) -fpi87 -fp5 -zp4 -5r -w5 -oneatx -DWIN32
CC=wcc386
LD=wcl386
LIB=wlib -b -c
LDFLAGS=
O=.obj
LIBTARGET=..\..\lib\zlib.lib
LIBTARGET=$(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib
# variables
OBJECTS=adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) &
trees$(O) zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) &
infutil$(O) inffast$(O)
OBJECTS = &
$(OUTPUTDIR)adler32.obj &
$(OUTPUTDIR)compress.obj &
$(OUTPUTDIR)crc32.obj &
$(OUTPUTDIR)gzio.obj &
$(OUTPUTDIR)uncompr.obj &
$(OUTPUTDIR)deflate.obj &
$(OUTPUTDIR)trees.obj &
$(OUTPUTDIR)zutil.obj &
$(OUTPUTDIR)inflate.obj &
$(OUTPUTDIR)infblock.obj &
$(OUTPUTDIR)inftrees.obj &
$(OUTPUTDIR)infcodes.obj &
$(OUTPUTDIR)infutil.obj &
$(OUTPUTDIR)inffast.obj
# all: test
all: $(LIBTARGET)
all: $(OUTPUTDIR) $(LIBTARGET) .SYMBOLIC
adler32.obj: adler32.c zutil.h zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
compress.obj: compress.c zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
crc32.obj: crc32.c zutil.h zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
gzio.obj: gzio.c zutil.h zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h &
infcodes.h infutil.h
$(CC) $(CFLAGS) $*.c
infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h &
infcodes.h inffast.h
$(CC) $(CFLAGS) $*.c
inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
$(CC) $(CFLAGS) $*.c
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
$(CC) $(CFLAGS) $*.c
infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
$(CC) $(CFLAGS) $*.c
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
$(CC) $(CFLAGS) $*.c
trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
uncompr.obj: uncompr.c zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
zutil.obj: zutil.c zutil.h zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
example.obj: example.c zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
minigzip.obj: minigzip.c zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
LBCFILE=$(OUTPUTDIR)zlib.lbc
$(LIBTARGET) : $(OBJECTS)
%create tmp.lbc
@for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
wlib /b /c /n /p=512 $^@ @tmp.lbc
example.exe: example.obj $(LIBTARGET)
$(LD) $(LDFLAGS) example.obj $(LIBTARGET)
minigzip.exe: minigzip.obj $(LIBTARGET)
$(LD) $(LDFLAGS) minigzip.obj $(LIBTARGET)
test: minigzip.exe example.exe
example
echo hello world | minigzip | minigzip -d >test
type test
%create $(LBCFILE)
@for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC
-erase *.obj
-erase *.exe
-erase $(LIBTARGET)
-erase $(LIBTARGET)