~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to zip/unzip/win32/Makefile.emx

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Makefile for UnZip, fUnZip and UnZipSFX
2
 
# for emx 0.9d + rsxnt 1.42 / gcc under WIN32. Derived from makefile.os2
3
 
# By E-Yen Tan and Christian Spieler. Last updated 10 February 2001.
4
 
#
5
 
# This makefile should work fine with GNU make and hopefully some others.
6
 
# Tested with Spieler's special GNU make 3.74 gnuish 16-bit version.
7
 
#
8
 
# If make does not support long command-line passing to gcc, the link step
9
 
# will fail. In this case, you have to edit the link commands to use the
10
 
# commented-out alternative that creates a link response file "by hand".
11
 
 
12
 
#ifdef NOASM
13
 
#AS_FLAGS =
14
 
#else
15
 
AS_FLAGS = -DASM_CRC
16
 
#endif
17
 
 
18
 
CP=copy
19
 
RM=del
20
 
 
21
 
CC=gcc -Zwin32 -I.
22
 
CC_OSIZ=-O1
23
 
CC_OTIM=-O2 -mpentium
24
 
CC_OPTS=-Wall -DWIN32 $(AS_FLAGS) $(LOCAL_UNZIP)
25
 
CFLAGS=$(CC_OTIM) $(CC_OPTS)
26
 
CFLAGSX=$(CC_OSIZ) $(CC_OPTS) -DSFX
27
 
CFLAGSF=$(CC_OTIM) $(CC_OPTS) -DFUNZIP
28
 
DLLFLAG=
29
 
AS=gcc
30
 
ASFLAGS=-Di386
31
 
LDFLAGS=-Zsys -o ./
32
 
LDFLAGS2=-ladvapi32 -Zsmall-conv -s
33
 
OUT=-o
34
 
OBJ=.o
35
 
 
36
 
#ifdef NOASM
37
 
#CRC32=crc32
38
 
#CRC32F=crc32f
39
 
#CRC32X=crc32_
40
 
#else
41
 
CRC32=crc_gcc
42
 
CRC32F=crc_gcc
43
 
CRC32X=crc_gcc
44
 
#endif
45
 
OBJUS=win32$(OBJ) nt$(OBJ)
46
 
OBJXS=win32_$(OBJ) nt_$(OBJ)
47
 
OBJFS=win32f$(OBJ)
48
 
OSDEP_H=win32/w32cfg.h
49
 
 
50
 
 
51
 
# default settings for target dependent macros:
52
 
DIRSEP = /
53
 
AS_DIRSEP = /
54
 
 
55
 
OBJU1 = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ)
56
 
OBJU2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ)
57
 
OBJU3 = inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ)
58
 
OBJU4 = unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ)
59
 
OBJU  = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJUS)
60
 
OBJX1 = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ)
61
 
OBJX2 = extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ)
62
 
OBJX3 = match_$(OBJ) process_$(OBJ) ttyio_$(OBJ)
63
 
OBJX  = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS)
64
 
OBJF  = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \
65
 
        globalsf$(OBJ) ttyiof$(OBJ) $(OBJFS)
66
 
 
67
 
UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)
68
 
 
69
 
# rules
70
 
 
71
 
.SUFFIXES:      .c $(OBJ)
72
 
 
73
 
.c$(OBJ):
74
 
        $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ $<
75
 
 
76
 
# targets
77
 
 
78
 
all:    unzip.exe funzip.exe unzipsfx.exe
79
 
 
80
 
# This next bit is nasty, but is needed to overcome the MS-DOS command
81
 
# line limit as response files for emx's gcc seem to only work if each
82
 
# file is on a different line. DJGPP doesn't do this (if you are at all
83
 
# interested).
84
 
 
85
 
unzip.exe: $(OBJU)
86
 
#       @ echo off
87
 
#       -@ $(RM) unzip.rsp
88
 
#       @ for %f in ($(OBJU1)) do echo %f >> unzip.rsp
89
 
#       @ for %f in ($(OBJU2)) do echo %f >> unzip.rsp
90
 
#       @ for %f in ($(OBJU3)) do echo %f >> unzip.rsp
91
 
#       @ for %f in ($(OBJU4) $(OBJUS)) do echo %f >> unzip.rsp
92
 
#       $(CC) $(LDFLAGS)$@ $(DEF) @unzip.rsp $(LDFLAGS2)
93
 
        $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(LDFLAGS2)
94
 
#       @ $(RM) unzip.rsp
95
 
 
96
 
funzip.exe: $(OBJF)
97
 
        $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(LDFLAGS2)
98
 
 
99
 
unzipsfx.exe:   $(OBJX)
100
 
#       @ echo off
101
 
#       -@ $(RM) unzipsfx.rsp
102
 
#       @ for %f in ($(OBJX1)) do echo %f >> unzipsfx.rsp
103
 
#       @ for %f in ($(OBJX2)) do echo %f >> unzipsfx.rsp
104
 
#       @ for %f in ($(OBJX3)) do echo %f >> unzipsfx.rsp
105
 
#       @ for %f in ($(OBJXS)) do echo %f >> unzipsfx.rsp
106
 
#       $(CC) $(LDFLAGS)$@ $(DEF) @unzipsfx.rsp $(LDFLAGS2)
107
 
        $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(LDFLAGS2)
108
 
#       @ $(RM) unzipsfx.rsp
109
 
 
110
 
uzexampl.exe:   uzexampl$(OBJ)
111
 
        $(CC) $(LDFLAGS)$@ $(DEF) uzexampl$(OBJ) -lversion $(LDFLAGS2)
112
 
 
113
 
# dependencies
114
 
 
115
 
apihelp$(OBJ):  apihelp.c $(UNZIP_H) unzvers.h
116
 
crc32$(OBJ):    crc32.c $(UNZIP_H) zip.h
117
 
crctab$(OBJ):   crctab.c $(UNZIP_H) zip.h
118
 
envargs$(OBJ):  envargs.c $(UNZIP_H)
119
 
explode$(OBJ):  explode.c $(UNZIP_H)
120
 
extract$(OBJ):  extract.c $(UNZIP_H) crypt.h
121
 
fileio$(OBJ):   fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
122
 
globals$(OBJ):  globals.c $(UNZIP_H)
123
 
inflate$(OBJ):  inflate.c $(UNZIP_H)
124
 
list$(OBJ):     list.c $(UNZIP_H)
125
 
match$(OBJ):    match.c $(UNZIP_H)
126
 
process$(OBJ):  process.c $(UNZIP_H)
127
 
ttyio$(OBJ):    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
128
 
unreduce$(OBJ): unreduce.c $(UNZIP_H)
129
 
unshrink$(OBJ): unshrink.c $(UNZIP_H)
130
 
unzip$(OBJ):    unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
131
 
api$(OBJ):      api.c $(UNZIP_H) unzvers.h
132
 
zipinfo$(OBJ):  zipinfo.c $(UNZIP_H)
133
 
 
134
 
funzip$(OBJ):   funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h    # funzip only
135
 
        $(CC) -c $(CFLAGS) $(OUT)$@ funzip.c
136
 
 
137
 
unzipstb$(OBJ): unzipstb.c                                      # DLL version
138
 
        $(CC) -c $(CFLAGS) $(OUT)$@ unzipstb.c
139
 
 
140
 
uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h             # WINDLL example
141
 
        $(CC) -c $(CFLAGS) $(OUT)$@ windll/uzexampl.c
142
 
 
143
 
win32$(OBJ):    win32/win32.c $(UNZIP_H) win32/nt.h unzvers.h   # win32 only
144
 
        $(CC) -c $(CFLAGS) $(OUT)$@ win32$(DIRSEP)win32.c
145
 
 
146
 
win32f$(OBJ):   win32/win32.c $(UNZIP_H) win32/nt.h             # win32 funzip
147
 
        $(CC) -c $(CFLAGSF) $(OUT)$@ win32$(DIRSEP)win32.c
148
 
 
149
 
win32_$(OBJ):   win32/win32.c $(UNZIP_H) win32/nt.h             # win32 unzipsfx
150
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ win32$(DIRSEP)win32.c
151
 
 
152
 
nt$(OBJ):       win32/nt.c $(UNZIP_H) win32/nt.h                # win32 only
153
 
        $(CC) -c $(CFLAGS) $(OUT)$@ win32$(DIRSEP)nt.c
154
 
 
155
 
nt_$(OBJ):      win32/nt.c $(UNZIP_H) win32/nt.h                # win32 only
156
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ win32$(DIRSEP)nt.c
157
 
 
158
 
os2$(OBJ):      os2/os2.c $(UNZIP_H) unzvers.h                  # OS/2 only
159
 
        $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)os2.c
160
 
 
161
 
os2_$(OBJ):     os2/os2.c $(UNZIP_H)                            # OS/2 unzipsfx
162
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ os2$(DIRSEP)os2.c
163
 
 
164
 
os2acl$(OBJ):   os2/os2acl.c $(UNZIP_H) unzvers.h               # OS/2 only
165
 
        $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)os2acl.c
166
 
 
167
 
rexxhelp$(OBJ): os2/rexxhelp.c                                  # OS/2 DLL only
168
 
        $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)rexxhelp.c
169
 
 
170
 
rexxapi$(OBJ):  os2/rexxapi.c                                   # OS/2 DLL only
171
 
        $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ os2$(DIRSEP)rexxapi.c
172
 
 
173
 
crc_i86$(OBJ):  msdos/crc_i86.asm                               # 16bit only
174
 
        $(AS) $(ASFLAGS) msdos$(AS_DIRSEP)crc_i86.asm $(ASEOL)
175
 
 
176
 
crc_i386$(OBJ): win32/crc_i386.asm                              # 32bit, MASM
177
 
        $(AS) $(ASFLAGS) win32$(AS_DIRSEP)crc_i386.asm $(ASEOL)
178
 
 
179
 
crc_gcc$(OBJ):  crc_i386.S                                      # 32bit, GNU AS
180
 
        $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S
181
 
 
182
 
crypt$(OBJ):    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
183
 
        $(CC) -c $(CFLAGS) $(DLLFLAG) $(OUT)$@ crypt.c
184
 
 
185
 
cryptf$(OBJ):   crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h        # funzip only
186
 
        $(CC) -c $(CFLAGSF) $(OUT)$@ crypt.c
187
 
 
188
 
crc32f$(OBJ):   crc32.c $(UNZIP_H) zip.h                        # funzip only
189
 
        $(CC) -c $(CFLAGSF) $(OUT)$@ crc32.c
190
 
 
191
 
globalsf$(OBJ): globals.c $(UNZIP_H)                            # funzip only
192
 
        $(CC) -c $(CFLAGSF) $(OUT)$@ globals.c
193
 
 
194
 
inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h          # funzip only
195
 
        $(CC) -c $(CFLAGSF) $(OUT)$@ inflate.c
196
 
 
197
 
ttyiof$(OBJ):   ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h        # funzip only
198
 
        $(CC) -c $(CFLAGSF) $(OUT)$@ ttyio.c
199
 
 
200
 
crc32_$(OBJ):   crc32.c $(UNZIP_H) zip.h                        # unzipsfx only
201
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ crc32.c
202
 
 
203
 
crctab_$(OBJ):  crctab.c $(UNZIP_H) zip.h                       # unzipsfx only
204
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ crctab.c
205
 
 
206
 
crypt_$(OBJ):   crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h        # unzipsfx only
207
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ crypt.c
208
 
 
209
 
extract_$(OBJ): extract.c $(UNZIP_H) crypt.h                    # unzipsfx only
210
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ extract.c
211
 
 
212
 
fileio_$(OBJ):  fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h    # unzipsfx only
213
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ fileio.c
214
 
 
215
 
globals_$(OBJ): globals.c $(UNZIP_H)                            # unzipsfx only
216
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ globals.c
217
 
 
218
 
inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h          # unzipsfx only
219
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ inflate.c
220
 
 
221
 
match_$(OBJ):   match.c $(UNZIP_H)                              # unzipsfx only
222
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ match.c
223
 
 
224
 
process_$(OBJ): process.c $(UNZIP_H)                            # unzipsfx only
225
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ process.c
226
 
 
227
 
ttyio_$(OBJ):   ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h        # unzipsfx only
228
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ ttyio.c
229
 
 
230
 
unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h   # unzipsfx only
231
 
        $(CC) -c $(CFLAGSX) $(OUT)$@ unzip.c