Fossil SCM

fossil-scm / compat / zlib / msdos / Makefile.tc
Source Blame History 100 lines
7ef7284… drh 1 # Makefile for zlib
7ef7284… drh 2 # Turbo C 2.01, Turbo C++ 1.01
7ef7284… drh 3 # Last updated: 15-Mar-2003
7ef7284… drh 4
7ef7284… drh 5 # To use, do "make -fmakefile.tc"
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 -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 CFLAGS 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 2.01, Turbo C++ 1.01 ------------
7ef7284… drh 17 MODEL=l
7ef7284… drh 18 CC=tcc
7ef7284… drh 19 LD=tcc
7ef7284… drh 20 AR=tlib
7ef7284… drh 21 # CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
7ef7284… drh 22 CFLAGS=-O2 -G -Z -m$(MODEL)
7ef7284… drh 23 LDFLAGS=-m$(MODEL) -f-
7ef7284… drh 24
7ef7284… drh 25
7ef7284… drh 26 # variables
7ef7284… drh 27 ZLIB_LIB = zlib_$(MODEL).lib
7ef7284… drh 28
7ef7284… drh 29 OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
7ef7284… drh 30 OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
7ef7284… drh 31 OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
7ef7284… drh 32 OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
7ef7284… drh 33
7ef7284… drh 34
7ef7284… drh 35 # targets
7ef7284… drh 36 all: $(ZLIB_LIB) example.exe minigzip.exe
7ef7284… drh 37
7ef7284… drh 38 .c.obj:
7ef7284… drh 39 $(CC) -c $(CFLAGS) $*.c
7ef7284… drh 40
7ef7284… drh 41 adler32.obj: adler32.c zlib.h zconf.h
7ef7284… drh 42
7ef7284… drh 43 compress.obj: compress.c zlib.h zconf.h
7ef7284… drh 44
7ef7284… drh 45 crc32.obj: crc32.c zlib.h zconf.h crc32.h
7ef7284… drh 46
7ef7284… drh 47 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
7ef7284… drh 48
7ef7284… drh 49 gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
7ef7284… drh 50
7ef7284… drh 51 gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
7ef7284… drh 52
7ef7284… drh 53 gzread.obj: gzread.c zlib.h zconf.h gzguts.h
7ef7284… drh 54
7ef7284… drh 55 gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
7ef7284… drh 56
7ef7284… drh 57 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
7ef7284… drh 58 inffast.h inffixed.h
7ef7284… drh 59
7ef7284… drh 60 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
7ef7284… drh 61 inffast.h
7ef7284… drh 62
7ef7284… drh 63 inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
7ef7284… drh 64 inffast.h inffixed.h
7ef7284… drh 65
7ef7284… drh 66 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
7ef7284… drh 67
7ef7284… drh 68 trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
7ef7284… drh 69
7ef7284… drh 70 uncompr.obj: uncompr.c zlib.h zconf.h
7ef7284… drh 71
7ef7284… drh 72 zutil.obj: zutil.c zutil.h zlib.h zconf.h
7ef7284… drh 73
7ef7284… drh 74 example.obj: test/example.c zlib.h zconf.h
7ef7284… drh 75
7ef7284… drh 76 minigzip.obj: test/minigzip.c zlib.h zconf.h
7ef7284… drh 77
7ef7284… drh 78
7ef7284… drh 79 # the command line is cut to fit in the MS-DOS 128 byte limit:
7ef7284… drh 80 $(ZLIB_LIB): $(OBJ1) $(OBJ2)
7ef7284… drh 81 -del $(ZLIB_LIB)
7ef7284… drh 82 $(AR) $(ZLIB_LIB) $(OBJP1)
7ef7284… drh 83 $(AR) $(ZLIB_LIB) $(OBJP2)
7ef7284… drh 84
7ef7284… drh 85 example.exe: example.obj $(ZLIB_LIB)
7ef7284… drh 86 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
7ef7284… drh 87
7ef7284… drh 88 minigzip.exe: minigzip.obj $(ZLIB_LIB)
7ef7284… drh 89 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
7ef7284… drh 90
7ef7284… drh 91 test: example.exe minigzip.exe
7ef7284… drh 92 example
7ef7284… drh 93 echo hello world | minigzip | minigzip -d
7ef7284… drh 94
7ef7284… drh 95 clean:
7ef7284… drh 96 -del *.obj
7ef7284… drh 97 -del *.lib
7ef7284… drh 98 -del *.exe
7ef7284… drh 99 -del zlib_*.bak
7ef7284… drh 100 -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