~ubuntu-branches/ubuntu/utopic/unzip/utopic-proposed

« back to all changes in this revision

Viewing changes to msdos/makefile.dj2

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2009-05-08 20:02:40 UTC
  • mfrom: (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090508200240-rk23wg0jdoyc6caj
Tags: 6.0-1
* New upstream release. Closes: #496989.
* Enabled new Unicode support. Closes: #197427. This may or may not work
  for your already created zipfiles, but it's not a bug unless they were
  created using the Unicode feature present in zip 3.0.
* Built using DATE_FORMAT=DF_YMD so that unzip -l show dates in ISO format,
  as that's the only available one which makes sense. Closes: #312886.
* Enabled new bzip2 support. Closes: #426798.
* Exit code for zipgrep should now be the right one. Closes: #441997.
* The reason why a file may not be created is now shown. Closes: #478791.
* Summary of changes in this version not being the debian/* files:
- Manpages in section 1, not 1L.
- Branding patch. UnZip by Debian. Original by Info-ZIP.
- Always #include <unistd.h>. Debian GNU/kFreeBSD needs it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Makefile for Info-ZIP's UnZip, UnZipSFX and fUnZip using DJGPP v2.01 or
2
 
# higher, by Frank Donahoe.                      Last updated: 17 Feb 02
 
2
# higher, by Frank Donahoe.                      Last updated: 21 Jul 2008
3
3
 
4
4
# This Makefile is specifically tailored for GNU make and GNU C and
5
5
# may not work with a generic Unix-compatible make utility.  The latest
9
9
# Features used:
10
10
# - pattern rules (%.o : %.c, etc.)
11
11
# - GNU-specific conditionals and functions  (ifeq, $(patsubst,,),...)
 
12
# - simply expanded variables (VAR := text)
12
13
#
13
14
# The stand-alone executable requires DPMI services to run.  If running
14
15
# in a DOS window under Windows 3.1 or later, the dpmi server is auto-
64
65
LOC=
65
66
CC=gcc
66
67
LD=$(CC)
67
 
CPPFLAGS=-I. -DDOS -DUSE_VFAT $(ASMFLG) $(LOCAL_UNZIP) $(LOC)
 
68
CPPFLAGS=-I. $(INC_BZ2LIB) -DDOS -DUSE_VFAT $(ASMFLG) $(LOCAL_UNZIP) $(LOC)
68
69
ASFLAGS=$(CPPFLAGS)
69
70
CFLAGS=-Wall -O2 $(BUTT) $(CPPFLAGS)
70
71
 
111
112
# defaults for crc32 stuff and system dependent headers
112
113
ifdef USE_ASMCRC
113
114
ASMFLG = -DASM_CRC
114
 
CRC32 = crc_gcc
 
115
CRCA_O = crc_gcc$O
115
116
else
116
117
ASMFLG =
117
 
CRC32 = crc32
 
118
CRCA_O =
 
119
endif
 
120
 
 
121
# optional inclusion of bzip2 decompression
 
122
IZ_BZIP2 = bzip2
 
123
ifdef USEBZ2
 
124
INC_BZ2LIB = -I$(IZ_BZIP2)
 
125
LOCAL_UNZIP:=-DUSE_BZIP2 $(LOCAL_UNZIP)
 
126
LD_BZ2LIB = -L$(IZ_BZIP2) -lbz2
 
127
LIBBZIP2 = $(IZ_BZIP2)/libbz2.a
 
128
else
 
129
INC_BZ2LIB =
 
130
LD_BZ2LIB =
 
131
LIBBZIP2 =
118
132
endif
119
133
 
120
134
# object files
121
 
OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O
 
135
OBJS1 = unzip$O crc32$O $(CRCA_O) crypt$O envargs$O explode$O
122
136
OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O
123
 
OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O
 
137
OBJS3 = process$O ttyio$O ubz2err$O unreduce$O unshrink$O zipinfo$O
124
138
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O
125
139
 
126
 
OBJX = unzipsfx$O $(CRC32)$O crctab_$O crypt_$O extract_$O fileio_$O \
127
 
        globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$O
128
 
 
129
 
OBJF = funzip$O $(CRC32)$O crypt-$O globals-$O inflate-$O ttyio-$O
130
 
 
131
 
OBJECTS_ALL = $(sort $(OBJS) $(OBJX) $(OBJF) crc32$O crc_gcc$O)
 
140
OBJX = unzipsfx$O crc32_$O $(CRCA_O) crypt_$O extract_$O fileio_$O \
 
141
        globals_$O inflate_$O match_$O process_$O ttyio_$O ubz2err_$O $M_$O
 
142
 
 
143
OBJF = funzip$O crc32-$O $(CRCA_O) crypt-$O globals-$O inflate-$O ttyio-$O
 
144
 
 
145
OBJECTS_ALL = $(sort $(OBJS) $(OBJX) $(OBJF) crc_gcc$O)
132
146
 
133
147
# Common header files included by all C sources:
134
148
UNZIP_H = unzip.h unzpriv.h globals.h msdos/doscfg.h
153
167
 
154
168
unzips: unzip$E zipinfo$E funzip$E unzipsfx$E
155
169
 
156
 
unzip$E: $(OBJS)
157
 
        $(LD) $(LDFLAGS) $(OBJS) -o $@
 
170
unzip$E: $(OBJS) $(LIBBZIP2)
 
171
        $(LD) $(LDFLAGS) $(OBJS) $(LD_BZ2LIB) -o $@
158
172
#       $(DJP) $@
159
173
 
160
174
zipinfo$E: unzip$E
169
183
        $(LD) $(LDFLAGS) $(OBJX) -o $@
170
184
#       $(DJPSX) $@
171
185
 
 
186
# create/update the library for the optional bzip2 support:
 
187
$(IZ_BZIP2)/libbz2.a:
 
188
        $(MAKE) -C $(IZ_BZIP2) -f Makebz2.iz CC="$(CC)" RM="$(RM)"
 
189
 
172
190
# explicit compilation instructions:
173
191
 
174
192
crc_gcc$O: crc_i386.S           # 32bit, GNU AS
175
 
        $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S
 
193
        $(CC) $(ASFLAGS) -x assembler-with-cpp -c -o $@ $<
176
194
 
177
195
# BIN_PATH may be defined in djgpp.env [make] or defined below.  If the
178
196
# installation is to the directory containing gcc.exe etc. place the
192
210
        command.com /c for %f in ($(UNZIPS)) do $(RM) $(BIN_PATH)\%f > NUL
193
211
 
194
212
clean:
 
213
        $(MAKE) -C $(IZ_BZIP2) -f Makebz2.iz CC="$(CC)" RM="$(RM)" clean
195
214
ifeq ($(firstword $(RM)), del)
196
215
        $(RM) *$O
197
216
        $(RM) *.~
202
221
 
203
222
# Source dependencies:
204
223
crc_gcc$O:      crc_i386.S
205
 
crc32$O:        crc32.c $(UNZIP_H) zip.h
206
 
crctab$O:       crctab.c $(UNZIP_H) zip.h
207
 
crctab_$O:       crctab.c $(UNZIP_H) zip.h
208
 
crypt$O:        crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
209
 
crypt-$O:       crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
210
 
crypt_$O:       crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
 
224
crc32$O:        crc32.c $(UNZIP_H) zip.h crc32.h
 
225
crc32-$O:       crc32.c $(UNZIP_H) zip.h crc32.h
 
226
crc32_$O:       crc32.c $(UNZIP_H) zip.h crc32.h
 
227
crypt$O:        crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
 
228
crypt-$O:       crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
 
229
crypt_$O:       crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
211
230
envargs$O:      envargs.c $(UNZIP_H)
212
231
explode$O:      explode.c $(UNZIP_H)
213
 
extract$O:      extract.c $(UNZIP_H) crypt.h
214
 
extract_$O:     extract.c $(UNZIP_H) crypt.h
215
 
fileio$O:       fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
216
 
fileio_$O:      fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
217
 
funzip$O:       funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
 
232
extract$O:      extract.c $(UNZIP_H) crc32.h crypt.h
 
233
extract_$O:     extract.c $(UNZIP_H) crc32.h crypt.h
 
234
fileio$O:       fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
 
235
fileio_$O:      fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
 
236
funzip$O:       funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h
218
237
globals$O:      globals.c $(UNZIP_H)
219
238
globals-$O:     globals.c $(UNZIP_H)
220
239
globals_$O:     globals.c $(UNZIP_H)
226
245
match_$O:       match.c $(UNZIP_H)
227
246
msdos$O:        msdos/msdos.c $(UNZIP_H)
228
247
msdos_$O:       msdos/msdos.c $(UNZIP_H)
229
 
process$O:      process.c $(UNZIP_H)
230
 
process_$O:     process.c $(UNZIP_H)
 
248
process$O:      process.c $(UNZIP_H) crc32.h
 
249
process_$O:     process.c $(UNZIP_H) crc32.h
231
250
ttyio$O:        ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
232
251
ttyio-$O:       ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
233
252
ttyio_$O:       ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
 
253
ubz2err$O:      ubz2err.c $(UNZIP_H)
 
254
ubz2err_$O:     ubz2err.c $(UNZIP_H)
234
255
unreduce$O:     unreduce.c $(UNZIP_H)
235
256
unshrink$O:     unshrink.c $(UNZIP_H)
236
257
unzip$O:        unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h