Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6725 | siemargl | 1 | #------------------------------------------------------------------------------ |
2 | # Makefile for UnZip 5.53 and later Jean-loup Gailly |
||
3 | # Version: Turbo C (edit and use makefile.bc for Turbo C++) 29 Dec 05 |
||
4 | #------------------------------------------------------------------------------ |
||
5 | |||
6 | # GNU make doesn't like the return value from "rem" |
||
7 | #STRIP=rem |
||
8 | STRIP=echo Ignore this line. :-) |
||
9 | # If you don't have LZEXE or PKLITE, get one of them. Then define: |
||
10 | #STRIP=lzexe |
||
11 | # or |
||
12 | #STRIP=pklite |
||
13 | # This makes a big difference in .exe size (and possibly load time). |
||
14 | |||
15 | # Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) |
||
16 | # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added |
||
17 | # to the declaration of LOC here: |
||
18 | LOC = $(LOCAL_UNZIP) |
||
19 | |||
20 | # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. |
||
21 | CPU_TYP = 0 |
||
22 | |||
23 | # memory model for UnZip (conflicting reports on whether Turbo C can or |
||
24 | # cannot put strings into far memory; for now assume it can and use small |
||
25 | # model *with* ZipInfo enabled...if fails, either define NO_ZIPINFO or |
||
26 | # use large model) [GRR 940712: sigh, no go--inflate fails. Back to |
||
27 | # large model...] |
||
28 | #UNMODEL = s |
||
29 | UNMODEL = l |
||
30 | # funzip can use small-model (compact-model when including Deflate64 support) |
||
31 | FUMODEL = c |
||
32 | |||
33 | # name of Flag to select memory model for assembler compiles, supported |
||
34 | # values are __SMALL__ , __MEDIUM__ , __COMPACT__ , __LARGE__ : |
||
35 | ASUNMODEL=__LARGE__ # keep in sync with UNMODEL definition !! |
||
36 | ASFUMODEL=__COMPACT__ # keep in sync with FUMODEL definition !! |
||
37 | |||
38 | # Uncomment the following three macros to use the optimized CRC32 assembler |
||
39 | # routine in UnZip and UnZipSFX: |
||
40 | ASMFLG = -DASM_CRC |
||
41 | ASMOBJS = crc_i86.obj |
||
42 | ASMOBJF = crc_i86_.obj |
||
43 | |||
44 | CC = tcc |
||
45 | |||
46 | AS = tasm |
||
47 | |||
48 | ASCPUFLAG = __$(CPU_TYP)86 |
||
49 | ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC) |
||
50 | CFLAGS = -O -Z -I. -DFar= $(ASMFLG) $(LOC) |
||
51 | UCFLAGS = -m$(UNMODEL) $(CFLAGS) |
||
52 | ULDFLAGS = -m$(UNMODEL) |
||
53 | FCFLAGS = -m$(FUMODEL) $(CFLAGS) |
||
54 | FLDFLAGS = -m$(FUMODEL) |
||
55 | |||
56 | LDFLAGS2 = |
||
57 | |||
58 | OBJS = unzip.obj crc32.obj crypt.obj envargs.obj explode.obj \ |
||
59 | extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj \ |
||
60 | process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj \ |
||
61 | msdos.obj $(ASMOBJS) |
||
62 | |||
63 | OBJX = unzipsfx.obj crc32x.obj cryptx.obj extractx.obj \ |
||
64 | fileiox.obj globalsx.obj inflatex.obj matchx.obj processx.obj \ |
||
65 | ttyiox.obj \ |
||
66 | msdosx.obj $(ASMOBJS) |
||
67 | |||
68 | OBJF = funzip.obj crc32_.obj crypt_.obj globals_.obj inflate_.obj ttyio_.obj \ |
||
69 | msdos_.obj $(ASMOBJF) |
||
70 | |||
71 | UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h |
||
72 | |||
73 | |||
74 | default: unzip.exe unzipsfx.exe funzip.exe |
||
75 | |||
76 | clean: |
||
77 | rem Ignore any errors in the following... |
||
78 | del *.ob |
||
79 | del *.obu |
||
80 | del *.obj |
||
81 | del unzip.exe |
||
82 | del funzip.exe |
||
83 | del unzipsfx.exe |
||
84 | |||
85 | .asm.obj: |
||
86 | $(AS) $(ASFLAGS) -D$(ASUNMODEL) $*.asm |
||
87 | |||
88 | .c.obj: |
||
89 | $(CC) -c $(UCFLAGS) $*.c |
||
90 | |||
91 | crc_i86.obj: msdos/crc_i86.asm |
||
92 | $(AS) $(ASFLAGS) -D$(ASUNMODEL) msdos\crc_i86.asm, $*.obj ; |
||
93 | |||
94 | crc_i86_.obj: msdos/crc_i86.asm |
||
95 | $(AS) $(ASFLAGS) -D$(ASFUMODEL) msdos\crc_i86.asm, $*.obj ; |
||
96 | |||
97 | crc32.obj: crc32.c $(UNZIP_H) zip.h crc32.h |
||
98 | |||
99 | crc32_.obj: crc32.c $(UNZIP_H) zip.h crc32.h |
||
100 | $(CC) -c $(FCFLAGS) -DFUNZIP -ocrc32_.obj crc32.c |
||
101 | |||
102 | crypt.obj: crypt.c $(UNZIP_H) crypt.h crc32.h ttyio.h zip.h |
||
103 | |||
104 | crypt_.obj: crypt.c $(UNZIP_H) crypt.h crc32.h ttyio.h zip.h |
||
105 | $(CC) -c $(FCFLAGS) -DFUNZIP -ocrypt_.obj crypt.c |
||
106 | |||
107 | envargs.obj: envargs.c $(UNZIP_H) |
||
108 | |||
109 | explode.obj: explode.c $(UNZIP_H) |
||
110 | |||
111 | extract.obj: extract.c $(UNZIP_H) crc32.h crypt.h |
||
112 | |||
113 | extractx.obj: extract.c $(UNZIP_H) crc32.h crypt.h |
||
114 | $(CC) -c $(UCFLAGS) -DSFX -oextractx.obj extract.c |
||
115 | |||
116 | fileio.obj: fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h |
||
117 | |||
118 | funzip.obj: funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h |
||
119 | $(CC) -c $(FCFLAGS) funzip.c |
||
120 | |||
121 | globals.obj: globals.c $(UNZIP_H) |
||
122 | |||
123 | globals_.obj: globals.c $(UNZIP_H) |
||
124 | $(CC) -c $(FCFLAGS) -DFUNZIP -oglobals_.obj globals.c |
||
125 | |||
126 | inflate.obj: inflate.c inflate.h $(UNZIP_H) |
||
127 | |||
128 | inflate_.obj: inflate.c inflate.h $(UNZIP_H) crypt.h |
||
129 | $(CC) -c $(FCFLAGS) -DFUNZIP -oinflate_.obj inflate.c |
||
130 | |||
131 | list.obj: list.c $(UNZIP_H) |
||
132 | |||
133 | match.obj: match.c $(UNZIP_H) |
||
134 | |||
135 | msdos.obj: msdos/msdos.c $(UNZIP_H) |
||
136 | $(CC) -c $(UCFLAGS) msdos/msdos.c |
||
137 | |||
138 | msdos_.obj: msdos/msdos.c $(UNZIP_H) |
||
139 | $(CC) -c $(FCFLAGS) -DFUNZIP -omsdos_.obj msdos/msdos.c |
||
140 | |||
141 | msdosx.obj: msdos/msdos.c $(UNZIP_H) |
||
142 | $(CC) -c $(UCFLAGS) -DSFX -omsdos_.obj msdos/msdos.c |
||
143 | |||
144 | process.obj: process.c $(UNZIP_H) crc32.h |
||
145 | |||
146 | processx.obj: process.c $(UNZIP_H) crc32.h |
||
147 | $(CC) -c $(UCFLAGS) -DSFX -oprocess_.obj process.c |
||
148 | |||
149 | ttyio.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h |
||
150 | |||
151 | ttyio_.obj: ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h |
||
152 | $(CC) -c $(FCFLAGS) -DFUNZIP -ottyio_.obj ttyio.c |
||
153 | |||
154 | unreduce.obj: unreduce.c $(UNZIP_H) |
||
155 | |||
156 | unshrink.obj: unshrink.c $(UNZIP_H) |
||
157 | |||
158 | unzip.obj: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h |
||
159 | |||
160 | unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h |
||
161 | $(CC) -c $(UCFLAGS) -DSFX -ounzipsfx.obj unzip.c |
||
162 | |||
163 | zipinfo.obj: zipinfo.c $(UNZIP_H) |
||
164 | |||
165 | |||
166 | # Turbo Make, which cannot deal with the MS-DOS 128-byte limit: |
||
167 | # ------------------------------------------------------------ |
||
168 | unzip.exe: $(OBJS) |
||
169 | rem Ignore any warnings in the following commands: |
||
170 | del *.ob |
||
171 | ren crc32_.obj *.ob |
||
172 | ren crc_i86_.obj *.ob |
||
173 | ren crypt_.obj *.ob |
||
174 | ren extract_.obj *.ob |
||
175 | ren funzip.obj *.ob |
||
176 | ren globals_.obj *.ob |
||
177 | ren inflate_.obj *.ob |
||
178 | ren msdos_.obj *.ob |
||
179 | ren process_.obj *.ob |
||
180 | ren ttyio_.obj *.ob |
||
181 | ren unzipsfx.obj *.ob |
||
182 | $(CC) $(ULDFLAGS) -eunzip.exe *.obj |
||
183 | ren *.ob *.obj |
||
184 | @$(STRIP) unzip.exe |
||
185 | |||
186 | # GRR 970901 |
||
187 | unzipsfx.exe: $(OBJX) |
||
188 | rem Ignore any warnings in the following commands: |
||
189 | del *.ob |
||
190 | ren crc32_.obj *.ob |
||
191 | ren crc_i86_.obj *.ob |
||
192 | ren crypt_.obj *.ob |
||
193 | ren envargs.obj *.ob |
||
194 | ren explode.obj *.ob |
||
195 | ren extract.obj *.ob |
||
196 | ren funzip.obj *.ob |
||
197 | ren globals_.obj *.ob |
||
198 | ren inflate_.obj *.ob |
||
199 | ren list.obj *.ob |
||
200 | ren msdos.obj *.ob |
||
201 | ren process.obj *.ob |
||
202 | ren ttyio_.obj *.ob |
||
203 | ren unreduce.obj *.ob |
||
204 | ren unshrink.obj *.ob |
||
205 | ren unzip.obj *.ob |
||
206 | ren zipinfo.obj *.ob |
||
207 | $(CC) $(ULDFLAGS) -eunzipsfx.exe *.obj |
||
208 | ren *.ob *.obj |
||
209 | @$(STRIP) unzipsfx.exe |
||
210 | |||
211 | # better makes that know how to deal with 128-char limit on command line: |
||
212 | # ---------------------------------------------------------------------- |
||
213 | #unzip.exe: $(OBJS) |
||
214 | # $(CC) $(ULDFLAGS) $(OBJS) $(LDFLAGS2) |
||
215 | # @$(STRIP) unzip.exe |
||
216 | # |
||
217 | #unzipsfx.exe: $(OBJX) |
||
218 | # $(CC) $(ULDFLAGS) $(OBJX) $(LDFLAGS2) |
||
219 | # @$(STRIP) unzipsfx.exe |
||
220 | |||
221 | # both makes: |
||
222 | # ---------- |
||
223 | funzip.exe: $(OBJF) |
||
224 | $(CC) $(FLDFLAGS) $(OBJF) $(LDFLAGS2) |
||
225 | @$(STRIP) funzip.exe |