gcc/zlib/msdos/Makefile.bor

110 lines
2.8 KiB
Makefile
Raw Normal View History

1999-05-04 21:30:25 +02:00
# Makefile for zlib
# Borland C++
# Last updated: 15-Mar-2003
1999-05-04 21:30:25 +02:00
# To use, do "make -fmakefile.bor"
# To compile in small model, set below: MODEL=s
# WARNING: the small model is supported but only for small values of
# MAX_WBITS and MAX_MEM_LEVEL. For example:
# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to the LOC macro below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.
# ------------ Turbo C++, Borland C++ ------------
1999-05-04 21:30:25 +02:00
# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
# to the declaration of LOC here:
LOC = $(LOCAL_ZLIB)
# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
1999-05-04 21:30:25 +02:00
CPU_TYP = 0
# memory model: one of s, m, c, l (small, medium, compact, large)
1999-05-04 21:30:25 +02:00
MODEL=l
# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version
1999-05-04 21:30:25 +02:00
CC=bcc
LD=bcc
1999-05-04 21:30:25 +02:00
AR=tlib
# compiler flags
# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0
1999-05-04 21:30:25 +02:00
CFLAGS=-O2 -Z -m$(MODEL) $(LOC)
LDFLAGS=-m$(MODEL) -f-
1999-05-04 21:30:25 +02:00
# variables
ZLIB_LIB = zlib_$(MODEL).lib
OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
1999-05-04 21:30:25 +02:00
# targets
all: $(ZLIB_LIB) example.exe minigzip.exe
1999-05-04 21:30:25 +02:00
.c.obj:
1999-05-04 21:30:25 +02:00
$(CC) -c $(CFLAGS) $*.c
adler32.obj: adler32.c zlib.h zconf.h
1999-05-04 21:30:25 +02:00
compress.obj: compress.c zlib.h zconf.h
1999-05-04 21:30:25 +02:00
crc32.obj: crc32.c zlib.h zconf.h crc32.h
1999-05-04 21:30:25 +02:00
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
1999-05-04 21:30:25 +02:00
gzio.obj: gzio.c zutil.h zlib.h zconf.h
1999-05-04 21:30:25 +02:00
infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
1999-05-04 21:30:25 +02:00
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h
1999-05-04 21:30:25 +02:00
inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
1999-05-04 21:30:25 +02:00
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
1999-05-04 21:30:25 +02:00
trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
1999-05-04 21:30:25 +02:00
uncompr.obj: uncompr.c zlib.h zconf.h
1999-05-04 21:30:25 +02:00
zutil.obj: zutil.c zutil.h zlib.h zconf.h
1999-05-04 21:30:25 +02:00
example.obj: example.c zlib.h zconf.h
minigzip.obj: minigzip.c zlib.h zconf.h
1999-05-04 21:30:25 +02:00
# the command line is cut to fit in the MS-DOS 128 byte limit:
1999-05-04 21:30:25 +02:00
$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-del $(ZLIB_LIB)
$(AR) $(ZLIB_LIB) $(OBJP1)
$(AR) $(ZLIB_LIB) $(OBJP2)
1999-05-04 21:30:25 +02:00
example.exe: example.obj $(ZLIB_LIB)
$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
minigzip.exe: minigzip.obj $(ZLIB_LIB)
$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
test: example.exe minigzip.exe
example
echo hello world | minigzip | minigzip -d
clean:
-del *.obj
-del *.lib
-del *.exe
-del zlib_*.bak
-del foo.gz