Restructured the VC makefile to build the OBJ files in either a DEBUG or RELEASE subdir to allow concurrent debug and release builds to exist side by side.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker 2001-01-16 10:47:03 +00:00
parent fddfd9e1f1
commit cd31c795b0
5 changed files with 297 additions and 242 deletions

View File

@ -11,73 +11,172 @@
# Put here the object file name for the correct system-dependent memory
# manager file. For NT we suggest jmemnobs.obj, which expects the OS to
# provide adequate virtual memory.
SYSDEPMEM= jmemnobs.obj
SYSDEPMEM= $D\jmemnobs.obj
# miscellaneous OS-dependent stuff
# file deletion command
!if "$(RM)" == ""
RM= del
!endif
# End of configurable options.
# 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
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= $D\jcomapi.obj $D\jutils.obj $D\jerror.obj $D\jmemmgr.obj $(SYSDEPMEM)
# 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= $D\jcapimin.obj \
$D\jcapistd.obj \
$D\jctrans.obj \
$D\jcparam.obj \
$D\jdatadst.obj \
$D\jcinit.obj \
$D\jcmaster.obj \
$D\jcmarker.obj \
$D\jcmainct.obj \
$D\jcprepct.obj \
$D\jccoefct.obj \
$D\jccolor.obj \
$D\jcsample.obj \
$D\jchuff.obj \
$D\jcphuff.obj \
$D\jcdctmgr.obj \
$D\jfdctfst.obj \
$D\jfdctflt.obj \
$D\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= $D\jdapimin.obj \
$D\jdapistd.obj \
$D\jdtrans.obj \
$D\jdatasrc.obj \
$D\jdmaster.obj \
$D\jdinput.obj \
$D\jdmarker.obj \
$D\jdhuff.obj \
$D\jdphuff.obj \
$D\jdmainct.obj \
$D\jdcoefct.obj \
$D\jdpostct.obj \
$D\jddctmgr.obj \
$D\jidctfst.obj \
$D\jidctflt.obj \
$D\jidctint.obj \
$D\jidctred.obj \
$D\jdsample.obj \
$D\jdcolor.obj \
$D\jquant1.obj \
$D\jquant2.obj \
$D\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
COBJECTS= $D\cjpeg.obj \
$D\rdppm.obj \
$D\rdgif.obj \
$D\rdtarga.obj \
$D\rdrle.obj \
$D\rdbmp.obj \
$D\rdswitch.obj \
$D\cdjpeg.obj
DOBJECTS= $D\djpeg.obj \
$D\wrppm.obj \
$D\wrgif.obj \
$D\wrtarga.obj \
$D\wrrle.obj \
$D\wrbmp.obj \
$D\rdcolmap.obj \
$D\cdjpeg.obj
TROBJECTS= $D\jpegtran.obj \
$D\rdswitch.obj \
$D\cdjpeg.obj \
$D\transupp.obj
!if "$(FINAL)" == "1"
LIBTARGET=..\..\lib\jpeg.lib
@ -95,9 +194,6 @@ LIBTARGET=..\..\lib\jpegd.lib
defaulttarget:
echo Please use the 'all' target for this makefile.
clean:
-erase $(LIBTARGET)
-erase *.obj
# Pull in standard variable definitions

View File

@ -1,84 +1,31 @@
#
# File: makefile.vc
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds winpng.lib library for Windows 3.1
# Change WXDIR or WXWIN to wherever wxWindows is found
WXDIR = $(WXWIN)
WINPNGDIR = ..\png
WINPNGINC = $(WINPNGDIR)
!if "$(FINAL)" == "1"
WINPNGLIB=..\..\lib\png.lib
LIBTARGET=$(WXDIR)\lib\png.lib
!else if "$(FINAL)" == "hybrid"
WINPNGLIB=..\..\lib\pngh.lib
LIBTARGET=$(WXDIR)\lib\pngh.lib
!else
WINPNGLIB=..\..\lib\pngd.lib
LIBTARGET=$(WXDIR)\lib\pngd.lib
!endif
INC = /I..\zlib
# Set this to nothing if your compiler is MS C++ 7
ZOPTION=
!ifndef FINAL
FINAL=0
!endif
PRECOMP=/YuWX.H
!if "$(FINAL)" == "0"
OPT = /Od
CPPFLAGS= /W4 /Zi $(CRTFLAG) /GX $(ZOPTION) $(OPT) /D__WXMSW__ $(INC)
CFLAGS= /W4 /Zi $(CRTFLAG) /GX /Od /D__WXMSW__ $(INC)
LINKFLAGS=/NOD /CO /ONERROR:NOEXE
_CRTFLAG=/MDd
!else if "$(FINAL)" == "hybrid"
OPT = /Od
CPPFLAGS= /W4 /Zi $(CRTFLAG) /GX $(ZOPTION) $(OPT) /D__WXMSW__ $(INC)
CFLAGS= /W4 /Zi $(CRTFLAG) /GX /Od /D__WXMSW__ $(INC)
LINKFLAGS=/NOD /CO /ONERROR:NOEXE
_CRTFLAG=/MD
!else
# /Ox for real FINAL version
OPT = /O2
CPPFLAGS= /W4 $(CRTFLAG) /GX /D__WXMSW__ $(INC)
CFLAGS= /W4 $(CRTFLAG) /GX /D__WXMSW__ $(INC)
LINKFLAGS=/NOD /ONERROR:NOEXE
_CRTFLAG=/MD
!endif
!if "$(CRTFLAG)" == ""
CRTFLAG=$(_CRTFLAG)
!endif
OBJECTS = $D\png.obj \
$D\pngread.obj \
$D\pngrtran.obj \
$D\pngrutil.obj \
$D\pngpread.obj \
$D\pngtrans.obj \
$D\pngwrite.obj \
$D\pngwtran.obj \
$D\pngwutil.obj \
$D\pngerror.obj \
$D\pngmem.obj \
$D\pngwio.obj \
$D\pngrio.obj \
$D\pngget.obj \
$D\pngset.obj
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
all: $(WINPNGLIB)
# Pull in standard variable definitions
$(WINPNGLIB): $(OBJECTS)
-erase $(WINPNGLIB)
lib @<<
-out:$(WINPNGLIB)
$(OBJECTS)
<<
!include ..\makelib.vc
.c.obj:
cl -DWIN32 $(OPT) $(CFLAGS) /c $*.c
clean:
-erase *.obj
-erase *.exe
-erase $(WINPNGLIB)
cleanall: clean

View File

@ -8,39 +8,39 @@ LIBTARGET=$(WXDIR)\lib\tiffd.lib
!endif
OBJECTS= \
tif_aux.obj \
tif_close.obj \
tif_codec.obj \
tif_compress.obj \
tif_dir.obj \
tif_dirinfo.obj \
tif_dirread.obj \
tif_dirwrite.obj \
tif_dumpmode.obj \
tif_error.obj \
tif_fax3.obj \
tif_fax3sm.obj \
tif_flush.obj \
tif_getimage.obj \
tif_jpeg.obj \
tif_luv.obj \
tif_lzw.obj \
tif_next.obj \
tif_open.obj \
tif_packbits.obj \
tif_pixarlog.obj \
tif_predict.obj \
tif_print.obj \
tif_read.obj \
tif_strip.obj \
tif_swab.obj \
tif_thunder.obj \
tif_tile.obj \
tif_version.obj \
tif_warning.obj \
tif_win32.obj \
tif_write.obj \
tif_zip.obj \
$D/tif_aux.obj \
$D/tif_close.obj \
$D/tif_codec.obj \
$D/tif_compress.obj \
$D/tif_dir.obj \
$D/tif_dirinfo.obj \
$D/tif_dirread.obj \
$D/tif_dirwrite.obj \
$D/tif_dumpmode.obj \
$D/tif_error.obj \
$D/tif_fax3.obj \
$D/tif_fax3sm.obj \
$D/tif_flush.obj \
$D/tif_getimage.obj \
$D/tif_jpeg.obj \
$D/tif_luv.obj \
$D/tif_lzw.obj \
$D/tif_next.obj \
$D/tif_open.obj \
$D/tif_packbits.obj \
$D/tif_pixarlog.obj \
$D/tif_predict.obj \
$D/tif_print.obj \
$D/tif_read.obj \
$D/tif_strip.obj \
$D/tif_swab.obj \
$D/tif_thunder.obj \
$D/tif_tile.obj \
$D/tif_version.obj \
$D/tif_warning.obj \
$D/tif_win32.obj \
$D/tif_write.obj \
$D/tif_zip.obj \

View File

@ -11,6 +11,10 @@
#
!include <..\makevc.env>
!if "$(RM)" == ""
RM= del
!endif
THISDIR=$(WXWIN)\src\xpm
!if "$(FINAL)" == "1"
@ -23,27 +27,30 @@ LIBTARGET=$(WXDIR)\lib\xpmd.lib
XPMDIR=$(WXDIR)\src\xpm
OBJECTS = $(XPMDIR)\attrib.obj\
$(XPMDIR)\crbuffri.obj\
$(XPMDIR)\crdatfri.obj\
$(XPMDIR)\create.obj\
$(XPMDIR)\crifrbuf.obj\
$(XPMDIR)\crifrdat.obj\
$(XPMDIR)\data.obj\
$(XPMDIR)\image.obj\
$(XPMDIR)\info.obj\
$(XPMDIR)\hashtab.obj\
$(XPMDIR)\misc.obj\
$(XPMDIR)\parse.obj\
$(XPMDIR)\rdftodat.obj\
$(XPMDIR)\rdftoi.obj\
$(XPMDIR)\rgb.obj\
$(XPMDIR)\scan.obj\
$(XPMDIR)\simx.obj\
$(XPMDIR)\wrffrdat.obj\
$(XPMDIR)\wrffri.obj
OBJECTS = $(XPMDIR)\$D\attrib.obj\
$(XPMDIR)\$D\crbuffri.obj\
$(XPMDIR)\$D\crdatfri.obj\
$(XPMDIR)\$D\create.obj\
$(XPMDIR)\$D\crifrbuf.obj\
$(XPMDIR)\$D\crifrdat.obj\
$(XPMDIR)\$D\data.obj\
$(XPMDIR)\$D\image.obj\
$(XPMDIR)\$D\info.obj\
$(XPMDIR)\$D\hashtab.obj\
$(XPMDIR)\$D\misc.obj\
$(XPMDIR)\$D\parse.obj\
$(XPMDIR)\$D\rdftodat.obj\
$(XPMDIR)\$D\rdftoi.obj\
$(XPMDIR)\$D\rgb.obj\
$(XPMDIR)\$D\scan.obj\
$(XPMDIR)\$D\simx.obj\
$(XPMDIR)\$D\wrffrdat.obj\
$(XPMDIR)\$D\wrffri.obj
all: $(LIBTARGET)
all: $D $(LIBTARGET)
$D:
mkdir .\$D
$(LIBTARGET): $(OBJECTS)
-erase $(LIBTARGET)
@ -53,107 +60,107 @@ $(LIBTARGET): $(OBJECTS)
$(OBJECTS) $(PERIPH_LIBS)
<<
$(XPMDIR)\attrib.obj: $(XPMDIR)\attrib.c
$(XPMDIR)\$D\attrib.obj: $(XPMDIR)\attrib.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\crbuffri.obj: $(XPMDIR)\crbuffri.c
$(XPMDIR)\$D\crbuffri.obj: $(XPMDIR)\crbuffri.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\crdatfri.obj: $(XPMDIR)\crdatfri.c
$(XPMDIR)\$D\crdatfri.obj: $(XPMDIR)\crdatfri.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\create.obj: $(XPMDIR)\create.c
$(XPMDIR)\$D\create.obj: $(XPMDIR)\create.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\crifrbuf.obj: $(XPMDIR)\crifrbuf.c
$(XPMDIR)\$D\crifrbuf.obj: $(XPMDIR)\crifrbuf.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\crifrdat.obj: $(XPMDIR)\crifrdat.c
$(XPMDIR)\$D\crifrdat.obj: $(XPMDIR)\crifrdat.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\data.obj: $(XPMDIR)\data.c
$(XPMDIR)\$D\data.obj: $(XPMDIR)\data.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\image.obj: $(XPMDIR)\image.c
$(XPMDIR)\$D\image.obj: $(XPMDIR)\image.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\info.obj: $(XPMDIR)\info.c
$(XPMDIR)\$D\info.obj: $(XPMDIR)\info.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\hashtab.obj: $(XPMDIR)\hashtab.c
$(XPMDIR)\$D\hashtab.obj: $(XPMDIR)\hashtab.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\misc.obj: $(XPMDIR)\misc.c
$(XPMDIR)\$D\misc.obj: $(XPMDIR)\misc.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\parse.obj: $(XPMDIR)\parse.c
$(XPMDIR)\$D\parse.obj: $(XPMDIR)\parse.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\rdftodat.obj: $(XPMDIR)\rdftodat.c
$(XPMDIR)\$D\rdftodat.obj: $(XPMDIR)\rdftodat.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\rdftoi.obj: $(XPMDIR)\rdftoi.c
$(XPMDIR)\$D\rdftoi.obj: $(XPMDIR)\rdftoi.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\rgb.obj: $(XPMDIR)\rgb.c
$(XPMDIR)\$D\rgb.obj: $(XPMDIR)\rgb.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\scan.obj: $(XPMDIR)\scan.c
$(XPMDIR)\$D\scan.obj: $(XPMDIR)\scan.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\simx.obj: $(XPMDIR)\simx.c
$(XPMDIR)\$D\simx.obj: $(XPMDIR)\simx.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\wrffrdat.obj: $(XPMDIR)\wrffrdat.c
$(XPMDIR)\$D\wrffrdat.obj: $(XPMDIR)\wrffrdat.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
$(XPMDIR)\wrffri.obj: $(XPMDIR)\wrffri.c
$(XPMDIR)\$D\wrffri.obj: $(XPMDIR)\wrffri.c
cl @<<
$(CPPFLAGS2) /c $*.c /Fo$@
$(CPPFLAGS2) /c $(*B).c /Fo$@
<<
clean:
-erase *.obj
-erase $(LIBTARGET)
-erase *.pdb
-erase *.sbr
-erase *.pch
-$(RM) $D\*.obj
-$(RM) $(LIBTARGET)
-$(RM) *.pdb
-$(RM) *.sbr
-$(RM) *.pch
cleanall: clean

View File

@ -1,7 +1,4 @@
# Makefile for zlib
# Borland C++ ************ UNTESTED ***********
# To use, do "make -fmakefile.bor"
# WARNING: the small model is supported but only for small values of
# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
@ -9,19 +6,22 @@
# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.
# ------------- Turbo C++, Borland C++ -------------
!if "$(RM)" == ""
RM= erase
!endif
!ifndef FINAL
FINAL=0
!endif
!if "$(FINAL)" == "0"
CFLAGS=/Od $(CRTFLAG) /GX
CFLAGS=/Od $(CRTFLAG) /GX /Fo$@
_CRTFLAG=/MDd
!else if "$(FINAL)" == "hybrid"
CFLAGS=/Od $(CRTFLAG) /GX
CFLAGS=/Od $(CRTFLAG) /GX /Fo$@
_CRTFLAG=/MD
!else
CFLAGS=-O2 $(CRTFLAG) /GX
CFLAGS=-O2 $(CRTFLAG) /GX /Fo$@
_CRTFLAG=/MD
!endif
@ -33,69 +33,74 @@ CRTFLAG=$(_CRTFLAG)
CC=cl
LD=cl
LIB=tlib
# replace bcc with tcc for Turbo C++ 1.0
LDFLAGS=$(MODEL)
O=.obj
!if "$(FINAL)" == "1"
LIBTARGET=..\..\lib\zlib.lib
D=Release
!else if "$(FINAL)" == "hybrid"
LIBTARGET=..\..\lib\zlibh.lib
D=Hybrid
!else
LIBTARGET=..\..\lib\zlibd.lib
D=Debug
!endif
# variables
OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
trees$(O)
OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
infutil$(O) inffast$(O)
OBJ1 = $D\adler32$(O) $D\compress$(O) $D\crc32$(O) $D\gzio$(O) \
$D\uncompr$(O) $D\deflate$(O) $D\trees$(O)
OBJ2 = $D\zutil$(O) $D\inflate$(O) $D\infblock$(O) $D\inftrees$(O) \
$D\infcodes$(O) $D\infutil$(O) $D\inffast$(O)
all: $(LIBTARGET)
all: $D $(LIBTARGET)
adler32.obj: adler32.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D:
mkdir .\$D
compress.obj: compress.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\adler32.obj: adler32.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
crc32.obj: crc32.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\compress.obj: compress.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\crc32.obj: crc32.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
gzio.obj: gzio.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
$D\gzio.obj: gzio.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
$D\infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
infcodes.h infutil.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CFLAGS) $(*B).c
infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
$D\infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
infcodes.h inffast.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CFLAGS) $(*B).c
inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
$(CC) -c $(CFLAGS) $*.c
$D\inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
$(CC) -c $(CFLAGS) $(*B).c
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
$(CC) -c $(CFLAGS) $*.c
$D\inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
$(CC) -c $(CFLAGS) $(*B).c
infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
$(CC) -c $(CFLAGS) $*.c
$D\infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
$(CC) -c $(CFLAGS) $(*B).c
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
$(CC) -c $(CFLAGS) $*.c
$D\inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
$(CC) -c $(CFLAGS) $(*B).c
trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
uncompr.obj: uncompr.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\uncompr.obj: uncompr.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
zutil.obj: zutil.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
$D\zutil.obj: zutil.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $(*B).c
LIBOBJECTS = $(OBJ1) $(OBJ2)
@ -107,7 +112,7 @@ $(LIBOBJECTS)
<<
clean:
-erase *.obj
-erase *.exe
-erase *.sbr
-erase $(LIBTARGET)
-$(RM) $D\*.obj
-$(RM) *.exe
-$(RM) *.sbr
-$(RM) $(LIBTARGET)