~ubuntu-branches/ubuntu/edgy/unzip/edgy-security

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#------------------------------------------------------------------------------
# Makefile for UnZip 5.5 and later                             Derek Fawcus
# Version:  MetaWare High C with PAMAKE                        13 Feb 2001

#
###########################################################################
#
#  Alter the first two macros to change the model
#

MODEL		= big
M		= b

#
###########################################################################
#
#  These two sets of prefixes are changed when swapping between the master
#  and my machine.
#

FL_PREFIX	= d:/flexos		# Where FlexOS is rooted
#FL_PREFIX	= c:/.

#
###########################################################################
#
#  The following should not have to be changed - they should be automatic
#  given correct values for the above.
#

HC_LIB		= $(FL_PREFIX)/highc/$(MODEL)/hc$(M)e.l86
PORT_LIB	= $(FL_PREFIX)/usr/portlib/$(MODEL)/prtlbhc$(M).l86
PORT_OBJ	= $(FL_PREFIX)/usr/portlib/$(MODEL)/prtlbhc$(M).obj

HC_INC		= $(FL_PREFIX)/highc/inc
PORT_INC	= $(FL_PREFIX)/usr/portlib/inc
FLEX_INC	= $(FL_PREFIX)/usr/inc

+IPATH		= $(PORT_INC)/;$(FLEX_INC)/;
#+IPATH		= $(PORT_INC)/;$(HC_INC)/;$(FLEX_INC)/;

#
###########################################################################
#
#  The programs to do the work.
#

CC		= hc
AS		= rasm86
LD		= link86

#HCOPTS=-mm $(MODEL) -debug -pr flexos/hc.pro
HCOPTS=-mm $(MODEL) -pr flexos/hc.pro

#
###########################################################################
#
#  The file extensions to build from
#

.SUFFIXES:
.SUFFIXES: .c .h .a86

#
###########################################################################
#

# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
CPU_TYP = 2

# Uncomment the following three macros to use the optimized CRC32 assembler
# routine in UnZip and UnZipSFX:
#ASMFLG = -DASM_CRC
#ASMOBJS = crc_i86.obj
#ASMOBJF = crc_i86_.obj

ASCPUFLAG = __$(CPU_TYP)86

UNZIP_H = unzip.h unzpriv.h globals.h flexos/flxcfg.h

default:        unzip.286
#default:        unzip.286 funzip.286 unzipsfx.286

clean:
	del *.ob?
	del unzip.286
	del funzip.286
	del unzipsfx.*
	del *.map
	del *.lin
	del *.sym
	del *.dbg

#
###########################################################################
#

.asm.obj:
	$(AS) $(ASFLAGS) -D$(ASUNMODEL) $*.asm

.c.obj:
	$(CC) $< $(HCOPTS) -ob $@

.c.obf:
	$(CC) $< $(HCOPTS) -def FUNZIP -ob $@

.c.obs:
	$(CC) $< $(HCOPTS) -def SFX -ob $@

#
###########################################################################
#

crc_i86.obj: flexos/crc_i86.a86
	$(AS) $(ASFLAGS) -D$(ASUNMODEL) flexos/crc_i86.a86, $*.obj ;

#
#########################################################################
#
#  The objects to build from
#

UNZIP_OBJS =	unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj \
		explode.obj extract.obj fileio.obj globals.obj inflate.obj \
		list.obj match.obj process.obj ttyio.obj unreduce.obj \
		unshrink.obj zipinfo.obj flexos.obj $(ASMOBJS)

unzip.286: $(UNZIP_OBJS)
	$(LD) $@[st[add[17e]]] = $-[input]
$(PORT_OBJ),
$+(${UNZIP_OBJS}),
$(PORT_LIB),
$(HC_LIB)
<

UNZIPSFX_OBJS =	unzip.obs crc32.obs crctab.obs crypt.obs extract.obs \
		fileio.obs globals.obs inflate.obs match.obs process.obs \
		ttyio.obs flexos.obs $(ASMOBJS)

unzipsfx.286: $(UNZIPSFX_OBJS)
	$(LD) $@[dbi,map[all],st[add[17e]]] = $-[input]
$(PORT_OBJ),
$+(${UNZIPSFX_OBJS}),
$(PORT_LIB),
$(HC_LIB)
<

FUNZIP_OBJS =	funzip.obj crc32.obf crypt.obf globals.obf inflate.obf \
		ttyio.obf $(ASMOBJF)

funzip.286: $(FUNZIP_OBJS)
	$(LD) $@[dbi,map[all],st[add[17e]]] = $-[input]
$(PORT_OBJ),
$+(${FUNZIP_OBJS}),
$(PORT_LIB),
$(HC_LIB)
<

#
###########################################################################
#

unreduce.obj:	unreduce.c $(UNZIP_H)
unshrink.obj:	unshrink.c $(UNZIP_H)
unzip.obj:	unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
zipinfo.obj:	zipinfo.c $(UNZIP_H)
process.obj:	process.c $(UNZIP_H)
list.obj:	list.c $(UNZIP_H)
match.obj:	match.c $(UNZIP_H)
fileio.obj:	fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
envargs.obj:	envargs.c $(UNZIP_H)
explode.obj:	explode.c $(UNZIP_H)
extract.obj:	extract.c $(UNZIP_H) crypt.h
crctab.obj:	crctab.c $(UNZIP_H) zip.h

flexos.obj:	flexos/flexos.c $(UNZIP_H)
crc32.obj:	crc32.c $(UNZIP_H) zip.h
crypt.obj:	crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h
globals.obj:	globals.c $(UNZIP_H)
inflate.obj:	inflate.c inflate.h $(UNZIP_H)
ttyio.obj:	ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h

funzip.obj:	funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
crc32.obf:	crc32.c $(UNZIP_H) zip.h
crypt.obf:	crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h
globals.obf:	globals.c $(UNZIP_H)
inflate.obf:	inflate.c inflate.h $(UNZIP_H) crypt.h
ttyio.obf:	ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h

flexos.obs:	flexos/flexos.c $(UNZIP_H)
crc32.obs:	crc32.c $(UNZIP_H) zip.h
crctab.obs:	crctab.c $(UNZIP_H) zip.h
extract.obs:	extract.c $(UNZIP_H) crypt.h
fileio.obs:	fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
globals.obs:	globals.c $(UNZIP_H)
inflate.obs:	inflate.c inflate.h $(UNZIP_H) crypt.h
match.obs:	match.c $(UNZIP_H)
process.obs:	process.c $(UNZIP_H)
ttyio.obs:	ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h
unzip.obs:	unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h