# Makefile for zlib
-# Borland C++
+# Borland C++
# This version of the zlib makefile was adapted by Chris Young for use
# with Borland C 4.5x with the Dos Power Pack for a 32-bit protected mode
# switches -WX and -DMSDOS are required.
# -- Chris Young 76702.1655@compuserve.com
+## modified further for 32 bit windows
+
# To use, do "make -fmakefile.b32"
# See zconf.h for details about the memory requirements.
# ------------- Borland C++ -------------
-MODEL=-WX
-CFLAGS= $(MODEL) -P-C -K -N- -k- -d -3 -r- -v- -f -DMSDOS
-CC=bcc32
-LD=bcc32
-LIB=tlib
-LDFLAGS= $(MODEL)
-O=.obj
-
-LIBTARGET=..\..\..\lib\zlib.lib
-
-# 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
+WXWIN=..\..
+LIBTARGET=zlib
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
- $(CC) -c $(CFLAGS) $*.c
+!include ..\makeb32.env
-infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
- infcodes.h infutil.h
- $(CC) -c $(CFLAGS) $*.c
+OBJECTS = $(OBJ_PATH)\adler32.obj \
+ $(OBJ_PATH)\compress.obj \
+ $(OBJ_PATH)\crc32.obj \
+ $(OBJ_PATH)\gzio.obj \
+ $(OBJ_PATH)\uncompr.obj \
+ $(OBJ_PATH)\deflate.obj \
+ $(OBJ_PATH)\trees.obj \
+ $(OBJ_PATH)\zutil.obj \
+ $(OBJ_PATH)\inflate.obj \
+ $(OBJ_PATH)\infblock.obj \
+ $(OBJ_PATH)\inftrees.obj \
+ $(OBJ_PATH)\infcodes.obj \
+ $(OBJ_PATH)\infutil.obj \
+ $(OBJ_PATH)\inffast.obj
-infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
- infcodes.h inffast.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\adler32.obj: adler32.c
-inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\compress.obj: compress.c
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\crc32.obj: crc32.c
-infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\gzio.obj: gzio.c
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\uncompr.obj: uncompr.c
-trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\deflate.obj: deflate.c
-uncompr.obj: uncompr.c zlib.h zconf.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\trees.obj: trees.c
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\zutil.obj: zutil.c
-example.obj: example.c zlib.h zconf.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\inflate.obj: inflate.c
-minigzip.obj: minigzip.c zlib.h zconf.h
- $(CC) -c $(CFLAGS) $*.c
+$(OBJ_PATH)\infblock.obj: infblock.c
-# we must cut the command line to fit in the MS/DOS 128 byte limit:
-$(LIBTARGET: $(OBJ1) $(OBJ2)
- del $(LIBTARGET)
- $(LIB) $(LIBTARGET) +$(OBJP1)
- $(LIB) $(LIBTARGET) +$(OBJP2)
+$(OBJ_PATH)\inftrees.obj: inftrees.c
-example.exe: example.obj $(LIBTARGET)
- $(LD) $(LDFLAGS) example.obj $(LIBTARGET)
+$(OBJ_PATH)\infcodes.obj: infcodes.c
-minigzip.exe: minigzip.obj $(LIBTARGET)
- $(LD) $(LDFLAGS) minigzip.obj $(LIBTARGET)
+$(OBJ_PATH)\infutil.obj: infutil.c
-test: example.exe minigzip.exe
- example
- echo hello world | minigzip | minigzip -d
+$(OBJ_PATH)\inffast.obj: inffast.c
-clean:
- del *.obj
- del *.exe
- del $(LIBTARGET)
+!include ..\makelib.b32