Fossil SCM

fossil-scm / compat / zlib / msdos / Makefile.bor
Source Blame History 115 lines
7ef7284… drh 1 # Makefile for zlib
7ef7284… drh 2 # Borland C++
7ef7284… drh 3 # Last updated: 15-Mar-2003
7ef7284… drh 4
7ef7284… drh 5 # To use, do "make -fmakefile.bor"
7ef7284… drh 6 # To compile in small model, set below: MODEL=s
7ef7284… drh 7
7ef7284… drh 8 # WARNING: the small model is supported but only for small values of
7ef7284… drh 9 # MAX_WBITS and MAX_MEM_LEVEL. For example:
7ef7284… drh 10 # -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
7ef7284… drh 11 # If you wish to reduce the memory requirements (default 256K for big
7ef7284… drh 12 # objects plus a few K), you can add to the LOC macro below:
7ef7284… drh 13 # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
7ef7284… drh 14 # See zconf.h for details about the memory requirements.
7ef7284… drh 15
7ef7284… drh 16 # ------------ Turbo C++, Borland C++ ------------
7ef7284… drh 17
7ef7284… drh 18 # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
7ef7284… drh 19 # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
7ef7284… drh 20 # to the declaration of LOC here:
7ef7284… drh 21 LOC = $(LOCAL_ZLIB)
7ef7284… drh 22
7ef7284… drh 23 # type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
7ef7284… drh 24 CPU_TYP = 0
7ef7284… drh 25
7ef7284… drh 26 # memory model: one of s, m, c, l (small, medium, compact, large)
7ef7284… drh 27 MODEL=l
7ef7284… drh 28
7ef7284… drh 29 # replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version
7ef7284… drh 30 CC=bcc
7ef7284… drh 31 LD=bcc
7ef7284… drh 32 AR=tlib
7ef7284… drh 33
7ef7284… drh 34 # compiler flags
7ef7284… drh 35 # replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0
7ef7284… drh 36 CFLAGS=-O2 -Z -m$(MODEL) $(LOC)
7ef7284… drh 37
7ef7284… drh 38 LDFLAGS=-m$(MODEL) -f-
7ef7284… drh 39
7ef7284… drh 40
7ef7284… drh 41 # variables
7ef7284… drh 42 ZLIB_LIB = zlib_$(MODEL).lib
7ef7284… drh 43
7ef7284… drh 44 OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
7ef7284… drh 45 OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
7ef7284… drh 46 OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
7ef7284… drh 47 OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
7ef7284… drh 48
7ef7284… drh 49
7ef7284… drh 50 # targets
7ef7284… drh 51 all: $(ZLIB_LIB) example.exe minigzip.exe
7ef7284… drh 52
7ef7284… drh 53 .c.obj:
7ef7284… drh 54 $(CC) -c $(CFLAGS) $*.c
7ef7284… drh 55
7ef7284… drh 56 adler32.obj: adler32.c zlib.h zconf.h
7ef7284… drh 57
7ef7284… drh 58 compress.obj: compress.c zlib.h zconf.h
7ef7284… drh 59
7ef7284… drh 60 crc32.obj: crc32.c zlib.h zconf.h crc32.h
7ef7284… drh 61
7ef7284… drh 62 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
7ef7284… drh 63
7ef7284… drh 64 gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
7ef7284… drh 65
7ef7284… drh 66 gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
7ef7284… drh 67
7ef7284… drh 68 gzread.obj: gzread.c zlib.h zconf.h gzguts.h
7ef7284… drh 69
7ef7284… drh 70 gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
7ef7284… drh 71
7ef7284… drh 72 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
7ef7284… drh 73 inffast.h inffixed.h
7ef7284… drh 74
7ef7284… drh 75 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
7ef7284… drh 76 inffast.h
7ef7284… drh 77
7ef7284… drh 78 inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
7ef7284… drh 79 inffast.h inffixed.h
7ef7284… drh 80
7ef7284… drh 81 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
7ef7284… drh 82
7ef7284… drh 83 trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
7ef7284… drh 84
7ef7284… drh 85 uncompr.obj: uncompr.c zlib.h zconf.h
7ef7284… drh 86
7ef7284… drh 87 zutil.obj: zutil.c zutil.h zlib.h zconf.h
7ef7284… drh 88
7ef7284… drh 89 example.obj: test/example.c zlib.h zconf.h
7ef7284… drh 90
7ef7284… drh 91 minigzip.obj: test/minigzip.c zlib.h zconf.h
7ef7284… drh 92
7ef7284… drh 93
7ef7284… drh 94 # the command line is cut to fit in the MS-DOS 128 byte limit:
7ef7284… drh 95 $(ZLIB_LIB): $(OBJ1) $(OBJ2)
7ef7284… drh 96 -del $(ZLIB_LIB)
7ef7284… drh 97 $(AR) $(ZLIB_LIB) $(OBJP1)
7ef7284… drh 98 $(AR) $(ZLIB_LIB) $(OBJP2)
7ef7284… drh 99
7ef7284… drh 100 example.exe: example.obj $(ZLIB_LIB)
7ef7284… drh 101 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
7ef7284… drh 102
7ef7284… drh 103 minigzip.exe: minigzip.obj $(ZLIB_LIB)
7ef7284… drh 104 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
7ef7284… drh 105
7ef7284… drh 106 test: example.exe minigzip.exe
7ef7284… drh 107 example
7ef7284… drh 108 echo hello world | minigzip | minigzip -d
7ef7284… drh 109
7ef7284… drh 110 clean:
7ef7284… drh 111 -del *.obj
7ef7284… drh 112 -del *.lib
7ef7284… drh 113 -del *.exe
7ef7284… drh 114 -del zlib_*.bak
7ef7284… drh 115 -del foo.gz

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button