zlib/msdos/Makefile.tc

106 lines
2.8 KiB
Makefile
Raw Normal View History

2011-09-10 10:06:52 +04:00
# Makefile for zlib
# TurboC 2.0
# To use, do "make -fmakefile.tc"
2011-09-10 10:10:21 +04:00
# To compile in small model, set below: MODEL=-ms
2011-09-10 10:06:52 +04:00
# WARNING: the small model is supported but only for small values of
2011-09-10 10:09:18 +04:00
# MAX_WBITS and MAX_MEM_LEVEL. For example:
2011-09-10 10:10:21 +04:00
# -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
2011-09-10 10:09:18 +04:00
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to CFLAGS below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
2011-09-10 10:07:35 +04:00
# See zconf.h for details about the memory requirements.
2011-09-10 10:06:52 +04:00
# ------------- Turbo C 2.0 -------------
MODEL=-ml
2011-09-10 10:10:21 +04:00
# CFLAGS=-O2 -G -Z $(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
2011-09-10 10:09:18 +04:00
CFLAGS=-O2 -G -Z $(MODEL)
CC=tcc -I\tc\include
LD=tcc -L\tc\lib
2011-09-10 10:06:52 +04:00
LIB=tlib
2011-09-10 10:09:18 +04:00
LDFLAGS=$(MODEL) -f-
2011-09-10 10:06:52 +04:00
O=.obj
# variables
OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
trees$(O)
OBJP1 = 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)
OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
infutil$(O)+inffast$(O)
all: test
adler32.obj: adler32.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
compress.obj: compress.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
crc32.obj: crc32.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
gzio.obj: gzio.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
infcodes.h infutil.h
$(CC) -c $(CFLAGS) $*.c
infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
infcodes.h inffast.h
$(CC) -c $(CFLAGS) $*.c
inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
$(CC) -c $(CFLAGS) $*.c
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
$(CC) -c $(CFLAGS) $*.c
infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
$(CC) -c $(CFLAGS) $*.c
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
$(CC) -c $(CFLAGS) $*.c
trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
uncompr.obj: uncompr.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
zutil.obj: zutil.c zutil.h zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
example.obj: example.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
minigzip.obj: minigzip.c zlib.h zconf.h
$(CC) -c $(CFLAGS) $*.c
# we must cut the command line to fit in the MS/DOS 128 byte limit:
zlib.lib: $(OBJ1) $(OBJ2)
2011-09-10 10:09:18 +04:00
del zlib.lib
2011-09-10 10:06:52 +04:00
$(LIB) zlib +$(OBJP1)
$(LIB) zlib +$(OBJP2)
example.exe: example.obj zlib.lib
$(LD) $(LDFLAGS) -eexample.exe example.obj zlib.lib
minigzip.exe: minigzip.obj zlib.lib
$(LD) $(LDFLAGS) -eminigzip.exe minigzip.obj zlib.lib
test: example.exe minigzip.exe
example
echo hello world | minigzip | minigzip -d
#clean:
# del *.obj
# del *.exe