summaryrefslogtreecommitdiff
path: root/old/msdos/Makefile.msc
diff options
context:
space:
mode:
Diffstat (limited to 'old/msdos/Makefile.msc')
-rw-r--r--old/msdos/Makefile.msc121
1 files changed, 0 insertions, 121 deletions
diff --git a/old/msdos/Makefile.msc b/old/msdos/Makefile.msc
deleted file mode 100644
index 562201d..0000000
--- a/old/msdos/Makefile.msc
+++ /dev/null
@@ -1,121 +0,0 @@
1# Makefile for zlib
2# Microsoft C 5.1 or later
3
4# To use, do "make makefile.msc"
5# To compile in small model, set below: MODEL=S
6
7# If you wish to reduce the memory requirements (default 256K for big
8# objects plus a few K), you can add to the LOC macro below:
9# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements.
11
12# ------------- Microsoft C 5.1 and later -------------
13
14# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
15# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
16# to the declaration of LOC here:
17LOC = $(LOCAL_ZLIB)
18
19# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
20CPU_TYP = 0
21
22# Memory model: one of S, M, C, L (small, medium, compact, large)
23MODEL=L
24
25CC=cl
26CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC)
27#-Ox generates bad code with MSC 5.1
28LIB_CFLAGS=-Zl $(CFLAGS)
29
30LD=link
31LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode
32# "/farcall/packcode" are only useful for `large code' memory models
33# but should be a "no-op" for small code models.
34
35O=.obj
36
37# variables
38OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
39 trees$(O)
40OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\
41 trees$(O)
42OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
43 infutil$(O) inffast$(O)
44OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\
45 infutil$(O)+inffast$(O)
46
47ZLIB_H = zlib.h zconf.h
48ZUTIL_H = zutil.h $(ZLIB_H)
49
50ZLIB_LIB = zlib_$(MODEL).lib
51
52all: $(ZLIB_LIB) example.exe minigzip.exe
53
54# individual dependencies and action rules:
55adler32.obj: adler32.c $(ZLIB_H)
56 $(CC) -c $(LIB_CFLAGS) $*.c
57
58compress.obj: compress.c $(ZLIB_H)
59 $(CC) -c $(LIB_CFLAGS) $*.c
60
61crc32.obj: crc32.c $(ZLIB_H)
62 $(CC) -c $(LIB_CFLAGS) $*.c
63
64deflate.obj: deflate.c deflate.h $(ZUTIL_H)
65 $(CC) -c $(LIB_CFLAGS) $*.c
66
67gzio.obj: gzio.c $(ZUTIL_H)
68 $(CC) -c $(LIB_CFLAGS) $*.c
69
70infblock.obj: infblock.c $(ZUTIL_H) infblock.h inftrees.h infcodes.h infutil.h
71 $(CC) -c $(LIB_CFLAGS) $*.c
72
73infcodes.obj: infcodes.c $(ZUTIL_H) inftrees.h infutil.h infcodes.h inffast.h
74 $(CC) -c $(LIB_CFLAGS) $*.c
75
76inflate.obj: inflate.c $(ZUTIL_H) infblock.h
77 $(CC) -c $(LIB_CFLAGS) $*.c
78
79inftrees.obj: inftrees.c $(ZUTIL_H) inftrees.h
80 $(CC) -c $(LIB_CFLAGS) $*.c
81
82infutil.obj: infutil.c $(ZUTIL_H) inftrees.h infutil.h
83 $(CC) -c $(LIB_CFLAGS) $*.c
84
85inffast.obj: inffast.c $(ZUTIL_H) inftrees.h infutil.h inffast.h
86 $(CC) -c $(LIB_CFLAGS) $*.c
87
88trees.obj: trees.c deflate.h $(ZUTIL_H)
89 $(CC) -c $(LIB_CFLAGS) $*.c
90
91uncompr.obj: uncompr.c $(ZLIB_H)
92 $(CC) -c $(LIB_CFLAGS) $*.c
93
94zutil.obj: zutil.c $(ZUTIL_H)
95 $(CC) -c $(LIB_CFLAGS) $*.c
96
97example.obj: example.c $(ZLIB_H)
98 $(CC) -c $(CFLAGS) $*.c
99
100minigzip.obj: minigzip.c $(ZLIB_H)
101 $(CC) -c $(CFLAGS) $*.c
102
103# we must cut the command line to fit in the MS/DOS 128 byte limit:
104$(ZLIB_LIB): $(OBJ1) $(OBJ2)
105 if exist $(ZLIB_LIB) del $(ZLIB_LIB)
106 lib $(ZLIB_LIB) $(OBJ1);
107 lib $(ZLIB_LIB) $(OBJ2);
108
109example.exe: example.obj $(ZLIB_LIB)
110 $(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB);
111
112minigzip.exe: minigzip.obj $(ZLIB_LIB)
113 $(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB);
114
115test: example.exe minigzip.exe
116 example
117 echo hello world | minigzip | minigzip -d
118
119#clean:
120# del *.obj
121# del *.exe