diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:21:47 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:21:47 -0700 |
commit | 7c2a874e50b871d04fbd19501f7b42cff55e5abc (patch) | |
tree | 1879cd29182ababb17cde77cee5ce74505db4006 /old/msdos/Makefile.tc | |
parent | a383133c4e7b93113cee912f213cf9502d785fa7 (diff) | |
download | zlib-1.2.0.tar.gz zlib-1.2.0.tar.bz2 zlib-1.2.0.zip |
zlib 1.2.0v1.2.0
Diffstat (limited to 'old/msdos/Makefile.tc')
-rw-r--r-- | old/msdos/Makefile.tc | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/old/msdos/Makefile.tc b/old/msdos/Makefile.tc new file mode 100644 index 0000000..63e0550 --- /dev/null +++ b/old/msdos/Makefile.tc | |||
@@ -0,0 +1,108 @@ | |||
1 | # Makefile for zlib | ||
2 | # TurboC 2.0 | ||
3 | |||
4 | # To use, do "make -fmakefile.tc" | ||
5 | # To compile in small model, set below: MODEL=-ms | ||
6 | |||
7 | # WARNING: the small model is supported but only for small values of | ||
8 | # MAX_WBITS and MAX_MEM_LEVEL. For example: | ||
9 | # -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 | ||
10 | # If you wish to reduce the memory requirements (default 256K for big | ||
11 | # objects plus a few K), you can add to CFLAGS below: | ||
12 | # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | ||
13 | # See zconf.h for details about the memory requirements. | ||
14 | |||
15 | # ------------- Turbo C 2.0 ------------- | ||
16 | MODEL=l | ||
17 | # CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 | ||
18 | CFLAGS=-O2 -G -Z -m$(MODEL) | ||
19 | CC=tcc -I\tc\include | ||
20 | LD=tcc -L\tc\lib | ||
21 | AR=tlib | ||
22 | LDFLAGS=-m$(MODEL) -f- | ||
23 | O=.obj | ||
24 | |||
25 | # variables | ||
26 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | ||
27 | trees$(O) | ||
28 | OBJP1 = adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)+\ | ||
29 | trees$(O) | ||
30 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ | ||
31 | infutil$(O) inffast$(O) | ||
32 | OBJP2 = zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)+\ | ||
33 | infutil$(O)+inffast$(O) | ||
34 | |||
35 | ZLIB_H = zlib.h zconf.h | ||
36 | ZUTIL_H = zutil.h $(ZLIB_H) | ||
37 | |||
38 | ZLIB_LIB = zlib_$(MODEL).lib | ||
39 | |||
40 | all: test | ||
41 | |||
42 | adler32.obj: adler32.c $(ZLIB_H) | ||
43 | $(CC) -c $(CFLAGS) $*.c | ||
44 | |||
45 | compress.obj: compress.c $(ZLIB_H) | ||
46 | $(CC) -c $(CFLAGS) $*.c | ||
47 | |||
48 | crc32.obj: crc32.c $(ZLIB_H) | ||
49 | $(CC) -c $(CFLAGS) $*.c | ||
50 | |||
51 | deflate.obj: deflate.c deflate.h $(ZUTIL_H) | ||
52 | $(CC) -c $(CFLAGS) $*.c | ||
53 | |||
54 | gzio.obj: gzio.c $(ZUTIL_H) | ||
55 | $(CC) -c $(CFLAGS) $*.c | ||
56 | |||
57 | infblock.obj: infblock.c $(ZUTIL_H) infblock.h inftrees.h infcodes.h infutil.h | ||
58 | $(CC) -c $(CFLAGS) $*.c | ||
59 | |||
60 | infcodes.obj: infcodes.c $(ZUTIL_H) inftrees.h infutil.h infcodes.h inffast.h | ||
61 | $(CC) -c $(CFLAGS) $*.c | ||
62 | |||
63 | inflate.obj: inflate.c $(ZUTIL_H) infblock.h | ||
64 | $(CC) -c $(CFLAGS) $*.c | ||
65 | |||
66 | inftrees.obj: inftrees.c $(ZUTIL_H) inftrees.h | ||
67 | $(CC) -c $(CFLAGS) $*.c | ||
68 | |||
69 | infutil.obj: infutil.c $(ZUTIL_H) inftrees.h infutil.h | ||
70 | $(CC) -c $(CFLAGS) $*.c | ||
71 | |||
72 | inffast.obj: inffast.c $(ZUTIL_H) inftrees.h infutil.h inffast.h | ||
73 | $(CC) -c $(CFLAGS) $*.c | ||
74 | |||
75 | trees.obj: trees.c deflate.h $(ZUTIL_H) | ||
76 | $(CC) -c $(CFLAGS) $*.c | ||
77 | |||
78 | uncompr.obj: uncompr.c $(ZLIB_H) | ||
79 | $(CC) -c $(CFLAGS) $*.c | ||
80 | |||
81 | zutil.obj: zutil.c $(ZUTIL_H) | ||
82 | $(CC) -c $(CFLAGS) $*.c | ||
83 | |||
84 | example.obj: example.c $(ZLIB_H) | ||
85 | $(CC) -c $(CFLAGS) $*.c | ||
86 | |||
87 | minigzip.obj: minigzip.c $(ZLIB_H) | ||
88 | $(CC) -c $(CFLAGS) $*.c | ||
89 | |||
90 | # we must cut the command line to fit in the MS/DOS 128 byte limit: | ||
91 | $(ZLIB_LIB): $(OBJ1) $(OBJ2) | ||
92 | del $(ZLIB_LIB) | ||
93 | $(AR) $(ZLIB_LIB) +$(OBJP1) | ||
94 | $(AR) $(ZLIB_LIB) +$(OBJP2) | ||
95 | |||
96 | example.exe: example.obj $(ZLIB_LIB) | ||
97 | $(LD) $(LDFLAGS) -eexample.exe example.obj $(ZLIB_LIB) | ||
98 | |||
99 | minigzip.exe: minigzip.obj $(ZLIB_LIB) | ||
100 | $(LD) $(LDFLAGS) -eminigzip.exe minigzip.obj $(ZLIB_LIB) | ||
101 | |||
102 | test: example.exe minigzip.exe | ||
103 | example | ||
104 | echo hello world | minigzip | minigzip -d | ||
105 | |||
106 | #clean: | ||
107 | # del *.obj | ||
108 | # del *.exe | ||