fix for open watcom

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott
2003-02-25 13:17:04 +00:00
parent 4eb299c93a
commit 26ed67330e
17 changed files with 1374 additions and 1312 deletions

View File

@@ -2,13 +2,10 @@
#! 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$
#! Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#!#############################################################################
#${
#! include the code which parses filelist.txt file and initializes
@@ -49,7 +46,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 +68,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\$(LIBNAME).lib
EXTRATARGETS = png zlib jpeg tiff regex
EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex
@@ -103,44 +84,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
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
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)
@@ -156,7 +135,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 +146,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 +165,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 +201,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 +217,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";
}
#$}

View File

@@ -159,7 +159,7 @@ typedef struct tagNMLVDISPINFOW {
#endif
#endif
#if (defined(__GNUWIN32__) || defined(__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
#if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__)) && !defined(HDN_GETDISPINFOW)
#define HDN_GETDISPINFOW (HDN_FIRST-29)
#if !wxCHECK_W32API_VERSION(2, 2)
typedef struct {

View File

@@ -1064,7 +1064,7 @@
// ----------------------------------------------------------------------------
#ifndef wxUSE_NORLANDER_HEADERS
#if (defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1200)) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
# define wxUSE_NORLANDER_HEADERS 1
#else
# define wxUSE_NORLANDER_HEADERS 0

View File

@@ -5,11 +5,10 @@
#
#
WXDIR = $(%WXWIN)
OUTPUTDIR = Watcom
PROGRAM = minimal
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat
OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj
!include $(%WXWIN)\src\makeprog.wat

View File

@@ -28,11 +28,12 @@
#include "wx/log.h"
#include "wx/app.h"
// NB: Some compilers define boolean type in Windows headers (e.g. Watcom C++).
// NB: Some compilers define boolean type in Windows headers
// (e.g. Watcom C++, but not Open Watcom).
// This causes a conflict with jmorecfg.h header from libjpeg, so we have
// to make sure libjpeg won't try to define boolean itself. This is done by
// defining HAVE_BOOLEAN.
#if defined(__WXMSW__) && (defined(__MWERKS__) || defined(__WATCOMC__))
#if defined(__WXMSW__) && (defined(__MWERKS__) || (defined(__WATCOMC__) && __WATCOMC__ < 1200))
#define HAVE_BOOLEAN
#include <windows.h>
#endif

View File

@@ -57,8 +57,18 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
#if wxUSE_LIBPNG
#ifndef PNGLINKAGEMODE
#ifdef __WATCOMC__
// we need an explicit cdecl for Watcom, at least according to
//
// http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863
//
// more testing is needed for this however, please remove this comment
// if you can confirm that my fix works with Watcom 11
#define PNGLINKAGEMODE cdecl
#else
#define PNGLINKAGEMODE LINKAGEMODE
#endif
#endif
// VS: wxPNGInfoStruct declared below is a hack that needs some explanation.

View File

@@ -3,6 +3,7 @@
# File: makefile.wat
# Author: Julian Smart
# Created: 1998
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#
# Makefile : Builds JPEG library for Watcom C++, WIN32
@@ -13,81 +14,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)
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
-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,26 +1,30 @@
WXDIR = $(%WXWIN)
#
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
LNK = tmp.lbc
all: $(OUTPUTDIR) $(LIBTARGET)
all: $(LIBTARGET)
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
# the name of the file containing the objects to be put in the library
LBCFILE=$(OUTPUTDIR)$(LIBTARGET).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
$(LIB) /b /c /n /p=512 $^@ @$(LBCFILE)
clean: .SYMBOLIC
-erase *.obj
-erase *.bak
-erase *.err
-erase *.pch
-erase *.lib
-erase *.lbc
-erase *.res
-erase *.exe
-erase *.lbc
-erase $(OUTPUTDIR)*.obj
-erase $(OUTPUTDIR)*.bak
-erase $(OUTPUTDIR)*.err
-erase $(OUTPUTDIR)*.pch
-erase $(OUTPUTDIR)*.lib
-erase $(OUTPUTDIR)*.lbc
-erase $(OUTPUTDIR)*.res
-erase $(OUTPUTDIR)*.exe
-erase $(OUTPUTDIR)*.lbc
-erase $(LIBTARGET)

View File

@@ -1,39 +1,56 @@
#
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#
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) system $(LINKOPTION)
@%append $(LNK) $(LDFLAGS)
@%append $(LNK) $(DEBUGINFO)
@%append $(LNK) system $(LINKSYSTEM)
@%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,95 +1,177 @@
# 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$
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
###############################################################################
# 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
!ifndef FINAL
FINAL=0
WATCOMDIR=$(%WATCOM)
!endif
# 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
# change/remove this if you want to create programs for older Windows versions,
# increase the version to be able to use more Win2K+-only features
WINVERFLAGS = /dWINVER=0x400 /d_WIN32_IE=0x0300
# optimize for space/time: /os or /ot
!ifeq FINAL 1
OPTFLAGS=/oails /5r
!else
OPTFLAGS=/od
!endif
###############################################################################
# You shouldn't have to modify anything after this point
###############################################################################
.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
LINKSYSTEM = nt
!else
TOOLKIT = msw
LINKSYSTEM = nt_win
BASEDIRPREFIX =
!endif
ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
# set the things which depend on debug/release
#
# note that the values for LIBPAGESIZE are minimal possible, the library
# doesn't link (Error! Library too large) with values smaller than given
!ifeq FINAL 1
CONFIGURATION=Release
LIBPAGESIZE=/p=1024
!else
CONFIGURATION=Debug
LIBPAGESIZE=/p=2048
!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
# no trailing slash for win98
!endif
!ifneq NOPRECOMP 1
PRECOMP = /fh=$(OUTPUTDIR)\watcom.pch
!endif
# the basename of the library
LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
# only LEVEL=386 is currently supported, 16 bit compilation is probably broken
LEVEL = 386
CCC = wpp$(LEVEL)
CXX = 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__
LIB = wlib /q
RC = wrc
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
# /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present
# /ox Standard optimizations
# /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
#
# 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
# zm and zv as well as the liker options below are used to make the resulting
# .exe smaller
CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS) /zm
CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /zm /zv /w=8 $(EXTRACXXFLAGS)
LDFLAGS = option eliminate, vfremoval
.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

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,7 @@
# File: makefile.wat
# Author: Julian Smart
# Created: 1998
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#
# Makefile : Builds PNG library for Watcom C++, WIN32
@@ -13,25 +14,42 @@ EXTRACPPFLAGS=-i=..\zlib
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

@@ -3,6 +3,7 @@
# File: makefile.wat
# Author: Julian Smart
# Created: 1998
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#
# Makefile : Builds REGEX library for Watcom C++, WIN32
@@ -13,20 +14,24 @@ EXTRACPPFLAGS=-DPOSIX_MISTAKE
WXLIB = $(WXDIR)\lib
LIBTARGET = $(WXLIB)\regex.lib
LIBTARGET = $(WXLIB)\regex$(WATCOM_SUFFIX).lib
OBJECTS = &
regcomp.obj &
regexec.obj &
regerror.obj &
regfree.obj
$(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

@@ -3,6 +3,7 @@
# File: makefile.wat
# Author: Julian Smart
# Created: 1998
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
#
# Makefile : Builds TIFF library for Watcom C++, WIN32
# This makefile has to rename files because apparently Watcom C++
@@ -14,45 +15,63 @@ EXTRACPPFLAGS=-i=..\zlib
!include $(WXDIR)\src\makewat.env
# set RENAME to 1 to rename the files to the short names -- this is needed
# with older Watcom versions
# RENAME=1
!ifeq RENAME 1
TIFF=
EXTRACPPFLAGS+=-dwxUSE_SHORTNAMES
!else
TIFF=tif_
!endif
WXLIB = $(WXDIR)\lib
LIBTARGET = $(WXLIB)\tiff.lib
LIBTARGET = $(WXLIB)\tiff$(WATCOM_SUFFIX).lib
OBJECTS= &
_aux.obj &
close.obj &
codec.obj &
compress.obj &
dir.obj &
dirinfo.obj &
dirread.obj &
dirwrite.obj &
dumpmode.obj &
error.obj &
fax3.obj &
fax3sm.obj &
flush.obj &
getimage.obj &
jpeg.obj &
luv.obj &
lzw.obj &
next.obj &
open.obj &
packbits.obj &
pixarlog.obj &
predict.obj &
print.obj &
read.obj &
strip.obj &
swab.obj &
thunder.obj &
tile.obj &
version.obj &
warning.obj &
win32.obj &
write.obj &
zip.obj
!ifeq RENAME 1
$(OUTPUTDIR)\_aux.obj &
!else
$(OUTPUTDIR)\tif_aux.obj &
!endif
$(OUTPUTDIR)\$(TIFF)close.obj &
$(OUTPUTDIR)\$(TIFF)codec.obj &
$(OUTPUTDIR)\$(TIFF)compress.obj &
$(OUTPUTDIR)\$(TIFF)dir.obj &
$(OUTPUTDIR)\$(TIFF)dirinfo.obj &
$(OUTPUTDIR)\$(TIFF)dirread.obj &
$(OUTPUTDIR)\$(TIFF)dirwrite.obj &
$(OUTPUTDIR)\$(TIFF)dumpmode.obj &
$(OUTPUTDIR)\$(TIFF)error.obj &
$(OUTPUTDIR)\$(TIFF)fax3.obj &
$(OUTPUTDIR)\$(TIFF)fax3sm.obj &
$(OUTPUTDIR)\$(TIFF)flush.obj &
$(OUTPUTDIR)\$(TIFF)getimage.obj &
$(OUTPUTDIR)\$(TIFF)jpeg.obj &
$(OUTPUTDIR)\$(TIFF)luv.obj &
$(OUTPUTDIR)\$(TIFF)lzw.obj &
$(OUTPUTDIR)\$(TIFF)next.obj &
$(OUTPUTDIR)\$(TIFF)open.obj &
$(OUTPUTDIR)\$(TIFF)packbits.obj &
$(OUTPUTDIR)\$(TIFF)pixarlog.obj &
$(OUTPUTDIR)\$(TIFF)predict.obj &
$(OUTPUTDIR)\$(TIFF)print.obj &
$(OUTPUTDIR)\$(TIFF)read.obj &
$(OUTPUTDIR)\$(TIFF)strip.obj &
$(OUTPUTDIR)\$(TIFF)swab.obj &
$(OUTPUTDIR)\$(TIFF)thunder.obj &
$(OUTPUTDIR)\$(TIFF)tile.obj &
$(OUTPUTDIR)\$(TIFF)version.obj &
$(OUTPUTDIR)\$(TIFF)warning.obj &
$(OUTPUTDIR)\$(TIFF)win32.obj &
$(OUTPUTDIR)\$(TIFF)write.obj &
$(OUTPUTDIR)\$(TIFF)zip.obj
all: $(OUTPUTDIR) $(RENAME) $(LIBTARGET) .SYMBOLIC
!ifeq RENAME 1
rename: .SYMBOLIC
copy tif_predict.h tif_pred.h
copy tif_aux.c _aux.c
@@ -88,13 +107,16 @@ rename: .SYMBOLIC
copy tif_win32.c win32.c
copy tif_write.c write.c
copy tif_zip.c zip.c
!endif
all: rename $(OBJECTS) $(LIBTARGET)
$(OUTPUTDIR):
@if not exist $^@ mkdir $^@
LBCFILE=$(OUTPUTDIR)\tiff.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
@@ -102,6 +124,7 @@ clean: .SYMBOLIC
-erase *.pch
-erase *.err
-erase *.lbc
!ifeq RENAME 1
-erase tif_pred.h
-erase _aux.c
-erase close.c
@@ -136,6 +159,7 @@ clean: .SYMBOLIC
-erase win32.c
-erase write.c
-erase zip.c
!endif
cleanall: clean

View File

@@ -37,7 +37,7 @@
* The original Berkeley copyright notice appears below in its entirety.
*/
/* Watcom C++ (or its make utility) doesn't like long filenames */
#ifdef __WATCOMC__
#ifdef wxUSE_SHORTNAMES
#include "tif_pred.h"
#else
#include "tif_predict.h"

View File

@@ -31,7 +31,7 @@
*/
#include "tiffiop.h"
/* Watcom C++ (or its make utility) doesn't like long filenames */
#ifdef __WATCOMC__
#ifdef wxUSE_SHORTNAMES
#include "tif_pred.h"
#else
#include "tif_predict.h"

View File

@@ -1,103 +1,53 @@
# 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
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
# 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)