zlib/win32/Makefile.bor

105 lines
2.3 KiB
Makefile
Raw Normal View History

2011-09-10 02:21:57 -04:00
# Makefile for zlib
# Borland C++ for Win32
2011-09-10 02:22:37 -04:00
#
# Usage:
# make -f win32/Makefile.bor
# make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
# ------------ Borland C++ ------------
# 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:
2011-09-10 02:21:57 -04:00
LOC = $(LOCAL_ZLIB)
CC = bcc32
2011-09-10 02:22:37 -04:00
AS = bcc32
2011-09-10 02:21:57 -04:00
LD = bcc32
AR = tlib
2011-09-10 02:22:37 -04:00
CFLAGS = -a -d -k- -O2 $(LOC)
ASFLAGS = $(LOC)
2011-09-10 02:21:57 -04:00
LDFLAGS = $(LOC)
# variables
ZLIB_LIB = zlib.lib
2011-09-10 02:22:37 -04:00
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
#OBJA =
2011-09-10 02:21:57 -04:00
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
2011-09-10 02:22:37 -04:00
#OBJPA=
2011-09-10 02:21:57 -04:00
# targets
all: $(ZLIB_LIB) example.exe minigzip.exe
.c.obj:
2011-09-10 02:22:37 -04:00
$(CC) -c $(CFLAGS) $<
.asm.obj:
$(AS) -c $(ASFLAGS) $<
2011-09-10 02:21:57 -04:00
adler32.obj: adler32.c zlib.h zconf.h
compress.obj: compress.c zlib.h zconf.h
crc32.obj: crc32.c zlib.h zconf.h crc32.h
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
gzio.obj: gzio.c zutil.h zlib.h zconf.h
infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h
inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
uncompr.obj: uncompr.c zlib.h zconf.h
zutil.obj: zutil.c zutil.h zlib.h zconf.h
example.obj: example.c zlib.h zconf.h
minigzip.obj: minigzip.c zlib.h zconf.h
# For the sake of the old Borland make,
# the command line is cut to fit in the MS-DOS 128 byte limit:
2011-09-10 02:22:37 -04:00
$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
2011-09-10 02:21:57 -04:00
-del $(ZLIB_LIB)
$(AR) $(ZLIB_LIB) $(OBJP1)
$(AR) $(ZLIB_LIB) $(OBJP2)
2011-09-10 02:22:37 -04:00
$(AR) $(ZLIB_LIB) $(OBJPA)
# testing
test: example.exe minigzip.exe
example
echo hello world | minigzip | minigzip -d
2011-09-10 02:21:57 -04: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)
2011-09-10 02:22:37 -04:00
# cleanup
2011-09-10 02:21:57 -04:00
clean:
2011-09-10 02:25:27 -04:00
-del $(ZLIB_LIB)
2011-09-10 02:21:57 -04:00
-del *.obj
2011-09-10 02:22:37 -04:00
-del *.exe
2011-09-10 02:21:57 -04:00
-del *.tds
-del zlib.bak
-del foo.gz