~ubuntu-branches/ubuntu/quantal/unzip/quantal

« back to all changes in this revision

Viewing changes to unix/Makefile

  • 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
#==============================================================================
2
2
# Makefile for UnZip, UnZipSFX and fUnZip:  Unix and MS-DOS ("real" makes only)
3
 
# Version:  5.52                                                    04 Feb 2005
 
3
# Version:  6.0                                                     18 Jan 2009
4
4
#==============================================================================
5
5
 
6
6
 
45
45
CC = cc#        try using "gcc" target rather than changing this (CC and LD
46
46
LD = $(CC)#     must match, else "unresolved symbol:  ___main" is possible)
47
47
AS = as
48
 
LOC = $(LOCAL_UNZIP)
 
48
LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
49
49
AF = $(LOC)
50
 
CF = -O -I. -DUNIX $(LOC)
51
 
LF = -o unzip
 
50
CFLAGS = -O
 
51
CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC)
 
52
CF = $(CFLAGS) $(CF_NOOPT)
 
53
LFLAGS1 =
 
54
LF = -o unzip$E $(LFLAGS1)
52
55
LF2 = -s
53
56
 
54
57
# UnZipSFX flags
55
 
SL = -o unzipsfx
 
58
SL = -o unzipsfx$E $(LFLAGS1)
56
59
SL2 = $(LF2)
57
60
 
58
61
# fUnZip flags
59
 
FL = -o funzip
 
62
FL = -o funzip$E $(LFLAGS1)
60
63
FL2 = $(LF2)
61
64
 
62
65
# general-purpose stuff
72
75
O = .o
73
76
M = unix
74
77
SHELL = /bin/sh
 
78
MAKEF = -f unix/Makefile
75
79
 
76
80
# Version info for unix/unix.c
77
81
HOST_VERSINFO=-DIZ_CC_NAME='\"\$$(CC) \"' -DIZ_OS_NAME='\"`uname -a`\"'
78
82
 
79
83
# defaults for crc32 stuff and system dependent headers
80
 
CRC32 = crc32
81
 
OSDEP_H =
 
84
CRCA_O =
 
85
OSDEP_H = unix/unxcfg.h
 
86
# default for dependency on auto-configure result, is an empty symbol
 
87
# so that the static non-autoconfigure targets continue to work
 
88
ACONF_DEP =
 
89
 
 
90
# optional inclusion of bzip2 decompression
 
91
IZ_OUR_BZIP2_DIR = bzip2
 
92
IZ_BZIP2 = $(IZ_OUR_BZIP2_DIR)
 
93
## The following symbols definitions need to be set to activate bzip2 support:
 
94
#D_USE_BZ2 = -DUSE_BZIP2
 
95
#L_BZ2 = -lbz2
 
96
#LIBBZ2 = $(IZ_BZIP2)/libbz2.a
 
97
 
 
98
# defaults for unzip's "built-in" bzip2 library compilation
 
99
CC_BZ = $(CC)
 
100
CFLAGS_BZ = $(CFLAGS)
82
101
 
83
102
# object files
84
 
OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O
 
103
OBJS1 = unzip$O crc32$O $(CRCA_O) crypt$O envargs$O explode$O
85
104
OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O
86
 
OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O
 
105
OBJS3 = process$O ttyio$O ubz2err$O unreduce$O unshrink$O zipinfo$O
87
106
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O
88
107
LOBJS = $(OBJS)
89
108
OBJSDLL = $(OBJS:.o=.pic.o) api.pic.o
90
 
OBJX = unzipsfx$O $(CRC32)$O crctab_$O crypt_$O extract_$O fileio_$O \
91
 
        globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$O
 
109
OBJX = unzipsfx$O crc32_$O $(CRCA_O) crypt_$O extract_$O fileio_$O \
 
110
        globals_$O inflate_$O match_$O process_$O ttyio_$O ubz2err_$O $M_$O
92
111
LOBJX = $(OBJX)
93
 
OBJF = funzip$O $(CRC32)$O cryptf$O globalsf$O inflatef$O ttyiof$O
 
112
OBJF = funzip$O crc32$O $(CRCA_O) cryptf$O globalsf$O inflatef$O ttyiof$O
94
113
#OBJS_OS2 = $(OBJS1:.o=.obj) $(OBJS2:.o=.obj) os2.obj
95
114
#OBJF_OS2 = $(OBJF:.o=.obj)
96
 
UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)
 
115
UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) $(ACONF_DEP)
97
116
 
98
117
# installation
99
118
# (probably can change next two to `install' and `install -d' if you have it)
113
132
 
114
133
# Solaris 2.x stuff:
115
134
PKGDIR = IZunzip
116
 
VERSION = Version 5.52
 
135
VERSION = Version 6.0
117
136
 
118
137
UNZIPS = unzip$E funzip$E unzipsfx$E
119
138
# this is a little ugly...well, OK, it's a lot ugly:
121
140
DOCS = funzip.txt unzip.txt unzipsfx.txt zipgrep.txt zipinfo.txt
122
141
 
123
142
# list of supported systems/targets in this version
124
 
SYSTEMSG = generic generic2 generic3 generic_zlib generic_shlib
 
143
SYSTEMG1 = generic generic_gcc  generic_pkg generic_gccpkg
 
144
SYSTEMG2 = generic1 generic2 generic3 generic_bz2 generic_zlib generic_shlib
125
145
SYSTEMS1 = 386i 3Bx 7300 7300_gcc aix aix_rt amdahl amdahl_eft apollo aviion
126
146
SYSTEMS2 = bsd bsdi bsdi_noasm bull coherent convex cray cray_opt cyber_sgi
127
147
SYSTEMS3 = cygwin dec dnix encore eta freebsd gcc gould hk68 hp hpux
142
162
 
143
163
help:
144
164
        @echo ""
145
 
        @echo\
146
 
 "  If you're not sure about the characteristics of your system, try typing"
147
 
        @echo\
148
 
 '  "make generic".  If the compiler barfs and says something unpleasant about'
149
 
        @echo\
150
 
 '  "timezone redefined," try typing "make clean" followed by "make generic2".'
151
 
        @echo\
152
 
 '  If, on the other hand, it complains about an undefined symbol _ftime, try'
153
 
        @echo\
154
 
 '  typing "make clean" followed by "make generic3".  One of these actions'
155
 
        @echo\
156
 
 '  should produce a working copy of unzip on most Unix systems.  If you know'
157
 
        @echo\
158
 
 '  a bit more about the machine on which you work, you might try "make list"'
159
 
        @echo\
160
 
 '  for a list of the specific systems supported herein.  (Many of them do'
161
 
        @echo\
162
 
 "  exactly the same thing, so don't agonize too much over which to pick if"
163
 
        @echo\
164
 
 '  two or more sound equally likely.)  Also check out the INSTALL file for'
165
 
        @echo\
166
 
 '  notes on compiling various targets.  As a last resort, feel free to read'
167
 
        @echo\
168
 
 '  the numerous comments within the Makefile itself.'
169
 
        @echo\
170
 
 '  Have a mostly pretty good day.'
 
165
        @echo "  If you're not sure about the characteristics of your system, try typing"
 
166
        @echo "  \"make generic\".  This is new and uses the configure script, though it is"
 
167
        @echo "  still being worked on."
 
168
        @echo ""
 
169
        @echo "  If that does not do it, try the original generic which is \"make generic1\"."
 
170
        @echo ""
 
171
        @echo "  If the compiler barfs and says something unpleasant about \"timezone redefined\","
 
172
        @echo "  try typing \"make clean\" followed by \"make generic2\".  If, on the other"
 
173
        @echo "  hand, it complains about an undefined symbol _ftime, try typing \"make clean\""
 
174
        @echo "  followed by \"make generic3\"."
 
175
        @echo ""
 
176
        @echo "  One of these actions should produce a working copy of unzip on most Unix"
 
177
        @echo "  systems.  If you know a bit more about the machine on which you work, you"
 
178
        @echo "  might try \"make list\" for a list of the specific systems supported herein."
 
179
        @echo "  (Many of them do exactly the same thing, so don't agonize too much over"
 
180
        @echo "  which to pick if two or more sound equally likely.)  Also check out the"
 
181
        @echo "  INSTALL file for notes on compiling various targets.  As a last resort,"
 
182
        @echo "  feel free to read the numerous comments within the Makefile itself."
 
183
        @echo ""
 
184
        @echo "  Have a mostly pretty good day."
171
185
        @echo ""
172
186
 
173
187
list:
175
189
        @echo\
176
190
 'Type "make <system>", where <system> is one of the following:'
177
191
        @echo ""
178
 
        @echo  "        $(SYSTEMSG)"
 
192
        @echo  "        $(SYSTEMG1)"
 
193
        @echo  "        $(SYSTEMG2)"
179
194
        @echo ""
180
195
        @echo  "        $(SYSTEMS1)"
181
196
        @echo  "        $(SYSTEMS2)"
237
252
# systems...
238
253
 
239
254
funzip.txt:     man/funzip.1
240
 
        nroff -Tascii -man man/funzip.1 | col -b | uniq | expand > $@
 
255
        nroff -Tascii -man man/funzip.1 | col -bx | uniq | expand > $@
241
256
 
242
257
unzip.txt:      man/unzip.1
243
 
        nroff -Tascii -man man/unzip.1 | col -b | uniq | expand > $@
 
258
        nroff -Tascii -man man/unzip.1 | col -bx | uniq | expand > $@
244
259
 
245
260
unzipsfx.txt:   man/unzipsfx.1
246
 
        nroff -Tascii -man man/unzipsfx.1 | col -b | uniq | expand > $@
 
261
        nroff -Tascii -man man/unzipsfx.1 | col -bx | uniq | expand > $@
247
262
 
248
263
zipgrep.txt:    man/zipgrep.1
249
 
        nroff -Tascii -man man/zipgrep.1 | col -b | uniq | expand > $@
 
264
        nroff -Tascii -man man/zipgrep.1 | col -bx | uniq | expand > $@
250
265
 
251
266
zipinfo.txt:    man/zipinfo.1
252
 
        nroff -Tascii -man man/zipinfo.1 | col -b | uniq | expand > $@
 
267
        nroff -Tascii -man man/zipinfo.1 | col -bx | uniq | expand > $@
253
268
 
254
269
 
255
270
all:            generic_msg generic
264
279
# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS
265
280
# make utilities if default:  change "unzip$E:" to "unzip$E:&"
266
281
 
267
 
unzip$E:        $(OBJS)                 # add `&' for parallel makes
268
 
        $(LD) $(LF) $(LOBJS) $(LF2)
 
282
unzip$E:        $(OBJS) $(LIBBZ2)       # add `&' for parallel makes
 
283
        $(LD) $(LF) -L$(IZ_BZIP2) $(LOBJS) $(L_BZ2) $(LF2)
269
284
 
270
285
unzipsfx$E:     $(OBJX)                 # add `&' for parallel makes
271
286
        $(LD) $(SL) $(LOBJX) $(SL2)
282
297
 '  or else invoke as "unzip -Z" (in a batch file, for example).'
283
298
        $(LN) unzip$E zipinfo$E
284
299
 
285
 
 
286
 
crc32$O:        crc32.c $(UNZIP_H) zip.h
287
 
crctab$O:       crctab.c $(UNZIP_H) zip.h
288
 
crypt$O:        crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
 
300
# when the optional bzip2 support is provided (as recommended) by sources
 
301
# in the 'bzip2' subdirectory, create/update the library:
 
302
$(IZ_OUR_BZIP2_DIR)/libbz2.a:
 
303
        @echo "Building/updating bzip2 object library..."
 
304
        ( cd $(IZ_OUR_BZIP2_DIR) ; $(MAKE) -f Makebz2.iz CC="$(CC_BZ)"\
 
305
         CFLAGS="$(CFLAGS_BZ)" RM="rm -f" )
 
306
 
 
307
 
 
308
crc32$O:        crc32.c $(UNZIP_H) zip.h crc32.h
 
309
crypt$O:        crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
289
310
envargs$O:      envargs.c $(UNZIP_H)
290
311
explode$O:      explode.c $(UNZIP_H)
291
 
extract$O:      extract.c $(UNZIP_H) crypt.h
292
 
fileio$O:       fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
293
 
funzip$O:       funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
 
312
extract$O:      extract.c $(UNZIP_H) crc32.h crypt.h
 
313
fileio$O:       fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
 
314
funzip$O:       funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h
294
315
globals$O:      globals.c $(UNZIP_H)
295
316
inflate$O:      inflate.c inflate.h $(UNZIP_H)
296
317
list$O:         list.c $(UNZIP_H)
297
318
match$O:        match.c $(UNZIP_H)
298
 
process$O:      process.c $(UNZIP_H)
 
319
process$O:      process.c $(UNZIP_H) crc32.h
299
320
ttyio$O:        ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
 
321
ubz2err$O:      ubz2err.c $(UNZIP_H)
300
322
unreduce$O:     unreduce.c $(UNZIP_H)
301
323
unshrink$O:     unshrink.c $(UNZIP_H)
302
324
unzip$O:        unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
303
325
zipinfo$O:      zipinfo.c $(UNZIP_H)
304
326
 
305
 
unzipsfx$O:     unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h   # unzipsfx only
306
 
        -$(CP) unzip.c unzipsfx.c
307
 
        $(CC) -c $(CF) -DSFX unzipsfx.c
308
 
        $(RM) unzipsfx.c
309
 
 
310
 
crctab_$O:      crctab.c $(UNZIP_H) zip.h
311
 
        -$(CP) crctab.c crctab_.c
312
 
        $(CC) -c $(CF) -DSFX crctab_.c
313
 
        $(RM) crctab_.c
314
 
 
315
 
crypt_$O:       crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h        # unzipsfx only
316
 
        -$(CP) crypt.c crypt_.c
317
 
        $(CC) -c $(CF) -DSFX crypt_.c
318
 
        $(RM) crypt_.c
319
 
 
320
 
extract_$O:     extract.c $(UNZIP_H) crypt.h                    # unzipsfx only
321
 
        -$(CP) extract.c extract_.c
322
 
        $(CC) -c $(CF) -DSFX extract_.c
323
 
        $(RM) extract_.c
324
 
 
325
 
fileio_$O:      fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
326
 
        -$(CP) fileio.c fileio_.c
327
 
        $(CC) -c $(CF) -DSFX fileio_.c
328
 
        $(RM) fileio_.c
329
 
 
330
 
globals_$O:     globals.c $(UNZIP_H)                            # unzipsfx only
331
 
        -$(CP) globals.c globals_.c
332
 
        $(CC) -c $(CF) -DSFX globals_.c
333
 
        $(RM) globals_.c
334
 
 
335
 
inflate_$O:     inflate.c inflate.h $(UNZIP_H) crypt.h          # unzipsfx only
336
 
        -$(CP) inflate.c inflate_.c
337
 
        $(CC) -c $(CF) -DSFX inflate_.c
338
 
        $(RM) inflate_.c
339
 
 
340
 
match_$O:       match.c $(UNZIP_H)                              # unzipsfx only
341
 
        -$(CP) match.c match_.c
342
 
        $(CC) -c $(CF) -DSFX match_.c
343
 
        $(RM) match_.c
344
 
 
345
 
process_$O:     process.c $(UNZIP_H)                            # unzipsfx only
346
 
        -$(CP) process.c process_.c
347
 
        $(CC) -c $(CF) -DSFX process_.c
348
 
        $(RM) process_.c
349
 
 
350
 
ttyio_$O:       ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h        # unzipsfx only
351
 
        -$(CP) ttyio.c ttyio_.c
352
 
        $(CC) -c $(CF) -DSFX ttyio_.c
353
 
        $(RM) ttyio_.c
354
 
 
355
 
 
356
 
cryptf$O:       crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h        # funzip only
357
 
        -$(CP) crypt.c cryptf.c
358
 
        $(CC) -c $(CF) -DFUNZIP cryptf.c
359
 
        $(RM) cryptf.c
360
 
 
361
 
globalsf$O:     globals.c $(UNZIP_H)                            # funzip only
362
 
        -$(CP) globals.c globalsf.c
363
 
        $(CC) -c $(CF) -DFUNZIP globalsf.c
364
 
        $(RM) globalsf.c
365
 
 
366
 
inflatef$O:     inflate.c inflate.h $(UNZIP_H) crypt.h          # funzip only
367
 
        -$(CP) inflate.c inflatef.c
368
 
        $(CC) -c $(CF) -DFUNZIP inflatef.c
369
 
        $(RM) inflatef.c
370
 
 
371
 
ttyiof$O:       ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h        # funzip only
372
 
        -$(CP) ttyio.c ttyiof.c
373
 
        $(CC) -c $(CF) -DFUNZIP ttyiof.c
374
 
        $(RM) ttyiof.c
 
327
# unzipsfx compilation section
 
328
unzipsfx$O:     unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
 
329
        $(CC) -c $(CF) -DSFX -o $@ unzip.c
 
330
 
 
331
crc32_$O:       crc32.c $(UNZIP_H) zip.h crc32.h
 
332
        $(CC) -c $(CF) -DSFX -o $@ crc32.c
 
333
 
 
334
crypt_$O:       crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
 
335
        $(CC) -c $(CF) -DSFX -o $@ crypt.c
 
336
 
 
337
extract_$O:     extract.c $(UNZIP_H) crc32.h crypt.h
 
338
        $(CC) -c $(CF) -DSFX -o $@ extract.c
 
339
 
 
340
fileio_$O:      fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
 
341
        $(CC) -c $(CF) -DSFX -o $@ fileio.c
 
342
 
 
343
globals_$O:     globals.c $(UNZIP_H)
 
344
        $(CC) -c $(CF) -DSFX -o $@ globals.c
 
345
 
 
346
inflate_$O:     inflate.c inflate.h $(UNZIP_H) crypt.h
 
347
        $(CC) -c $(CF) -DSFX -o $@ inflate.c
 
348
 
 
349
match_$O:       match.c $(UNZIP_H)
 
350
        $(CC) -c $(CF) -DSFX -o $@ match.c
 
351
 
 
352
process_$O:     process.c $(UNZIP_H) crc32.h
 
353
        $(CC) -c $(CF) -DSFX -o $@ process.c
 
354
 
 
355
ttyio_$O:       ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
 
356
        $(CC) -c $(CF) -DSFX -o $@ ttyio.c
 
357
 
 
358
ubz2err_$O:     ubz2err.c $(UNZIP_H)
 
359
        $(CC) -c $(CF) -DSFX -o $@ ubz2err.c
 
360
 
 
361
 
 
362
# funzip compilation section
 
363
cryptf$O:       crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
 
364
        $(CC) -c $(CF) -DFUNZIP -o $@ crypt.c
 
365
 
 
366
globalsf$O:     globals.c $(UNZIP_H)
 
367
        $(CC) -c $(CF) -DFUNZIP -o $@ globals.c
 
368
 
 
369
inflatef$O:     inflate.c inflate.h $(UNZIP_H) crypt.h
 
370
        $(CC) -c $(CF) -DFUNZIP -o $@ inflate.c
 
371
 
 
372
ttyiof$O:       ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
 
373
        $(CC) -c $(CF) -DFUNZIP -o $@ ttyio.c
375
374
 
376
375
 
377
376
# optional assembler replacements
378
377
crc_i86$O:      msdos/crc_i86.asm                               # 16bit only
379
378
        $(AS) $(AF) msdos/crc_i86.asm $(ASEOL)
380
379
 
381
 
crc_gcc$O:      crc_i386.S                                      # 32bit, GNU AS
382
 
        $(AS) $(AF) -x assembler-with-cpp -c -o $@ crc_i386.S
383
 
 
384
 
crc_gcc.pic.o:  crc_i386.S                                      # 32bit, GNU AS
385
 
        $(AS) $(AF) -x assembler-with-cpp -c -o $@ crc_i386.S
386
 
 
387
 
crc_sysv$O:     crc_i386.S                                      # 32bit, SysV AS
 
380
crc_gcc$O:      crc_i386.S $(ACONF_DEP)                         # 32bit, GNU AS
 
381
        $(AS) $(AF) -x assembler-with-cpp -c -o $@ crc_i386.S
 
382
 
 
383
crc_gcc.pic.o:  crc_i386.S $(ACONF_DEP)                         # 32bit, GNU AS
 
384
        $(AS) $(AF) -x assembler-with-cpp -c -o $@ crc_i386.S
 
385
 
 
386
crc_sysv$O:     crc_i386.S $(ACONF_DEP)                         # 32bit, SysV AS
388
387
        $(CC) -E $(AF) crc_i386.S > crc_i386s.s
389
388
        $(AS) -o $@ crc_i386s.s
390
389
        $(RM) crc_i386s.s
404
403
        $(CC) -c $(CF) unix/unix.c
405
404
 
406
405
unix_$O:        unix/unix.c $(UNZIP_H)                          # Unix unzipsfx
407
 
        -$(CP) unix/unix.c unix_.c
408
 
        $(CC) -c $(CF) -DSFX unix_.c
409
 
        $(RM) unix_.c
 
406
        $(CC) -c $(CF) -DSFX -o $@ unix/unix.c
410
407
 
411
408
unix.pic.o:     unix/unix.c $(UNZIP_H) unzvers.h                # Unix shlib
412
409
        $(CC) -c $(CF) -o $@ unix/unix.c
422
419
        @echo ""
423
420
        @echo '         This is a Unix-specific target.  (Just so you know.)'
424
421
        @echo ""
 
422
        -( cd $(IZ_OUR_BZIP2_DIR); $(MAKE) -f Makebz2.iz RM="rm -f" clean )
425
423
        rm -f $(UNZIPS) $(OBJS) $(OBJF) $(OBJX) api$O apihelp$O crc_gcc$O \
426
424
          crc_sysv$O unzipstb$O crypt_.c extract_.c globals_.c inflate_.c \
427
425
          ttyio_.c crc_i386s.s msdos_.c process_.c unix_.c unzipsfx.c
 
426
        rm -f flags
428
427
        rm -rf ./$(PKGDIR)
429
428
 
430
429
# Package generation interface (by J.Bush).  Originally tested under Sun
466
465
uninstall:
467
466
        $(RM) $(INSTALLEDBIN) $(INSTALLEDMAN)
468
467
 
 
468
# added 10/28/04 EG
 
469
flags:  unix/configure
 
470
        sh unix/configure "${CC}" "${CF_NOOPT}" "${IZ_BZIP2}"
469
471
 
470
472
# the test zipfile
471
473
TESTZIP = testmake.zip
534
536
################################
535
537
 
536
538
#----------------------------------------------------------------------------
537
 
#  Generic targets (can't assume make utility groks "$(MAKE)")
538
 
#----------------------------------------------------------------------------
539
 
 
540
 
generic:        unzips     # first try if unknown
 
539
#  Generic targets using the configure script to determine configuration.
 
540
#----------------------------------------------------------------------------
 
541
 
 
542
# Well, try MAKE and see.  By now everyone may be happy.  10/28/04 EG
 
543
generic:        flags      # now try autoconfigure first
 
544
        eval $(MAKE) $(MAKEF) unzips ACONF_DEP=flags `cat flags`
 
545
#       make $(MAKEF) unzips CF="${CF} `cat flags`"
 
546
 
 
547
generic_gcc:
 
548
        $(MAKE) $(MAKEF) generic CC=gcc IZ_BZIP2="$(IZ_BZIP2)"
 
549
 
 
550
# extensions to perform SVR4 package-creation after compilation
 
551
generic_pkg:    generic svr4package
 
552
generic_gccpkg: generic_gcc svr4package
 
553
 
 
554
#----------------------------------------------------------------------------
 
555
#  Old static generic targets (can't assume make utility groks "$(MAKE)")
 
556
#----------------------------------------------------------------------------
 
557
 
 
558
generic1:       unzips     # first try if unknown
541
559
 
542
560
generic2:       unix_make  # second try if unknown:  hope make is called "make"
543
 
        make -f unix/Makefile unzips CF="$(CF) -DBSD"
 
561
        make $(MAKEF) unzips CF="$(CF) -DBSD"
544
562
 
545
563
generic3:       unix_make  # third try if unknown:  hope make is called "make"
546
 
        make -f unix/Makefile unzips CF="$(CF) -DSYSV"
 
564
        make $(MAKEF) unzips CF="$(CF) -DSYSV"
 
565
 
 
566
# Generic build including bzip2 decompression support for unzip.
 
567
# Requires presence of the bzip2 sources in subdirectory bzip2.
 
568
 
 
569
generic_bz2:    unix_make
 
570
        @echo\
 
571
 "This target assumes bzip2 sources are available in subfolder bzip2/."
 
572
        $(MAKE) $(MAKEF) unzips D_USE_BZ2="-DUSE_BZIP2"\
 
573
         L_BZ2="-lbz2" LIBBZ2="$(IZ_OUR_BZIP2_DIR)/libbz2.a" \
 
574
         CC_BZ="$(CC)" CFLAGS_BZ="$(CFLAGS)"
547
575
 
548
576
# Generic unzip and funzip target using either shared or static zlib for
549
577
# inflate rather than the original UnZip version.  (libz was libgz prior
566
594
        @echo\
567
595
 'which is UnZip linked with the DLL).  This target is an example only.'
568
596
        @echo ""
569
 
        $(MAKE) objsdll CC=gcc CF="-O3 -Wall -I. -fPIC -DDLL -DUNIX $(LOC)"
 
597
        $(MAKE) objsdll CC=gcc CFLAGS="-O3 -Wall -fPIC -DDLL"
570
598
        gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.4 $(OBJSDLL)
571
599
        $(RM) libunzip.so.0 libunzip.so
572
600
        $(LN) -s libunzip.so.0.4 libunzip.so.0
575
603
        gcc -o unzip_shlib unzipstb.o -L. -lunzip
576
604
 
577
605
#----------------------------------------------------------------------------
 
606
#  "Autoconfig" group, aliases for the generic targets using configure:
 
607
#----------------------------------------------------------------------------
 
608
 
 
609
# Solaris:  generic, plus generation of installable package.
 
610
solaris_pkg:    generic_pkg
 
611
 
 
612
# Solaris: forcing usage of GCC, plus generation of installable package.
 
613
solaris_gccpkg: generic_gcc_pkg
 
614
 
 
615
#----------------------------------------------------------------------------
578
616
#  "Normal" group (BSD vs. SysV may be set in unzip.h via predefined macros):
579
617
#----------------------------------------------------------------------------
580
618
 
622
660
aix_rt:         _sysv   # IBM RT 6150 under AIX 2.2.1
623
661
aviion:         _sysv   # Data General AViiONs, DG/UX 4.3x
624
662
pyr_att:        _sysv   # Pyramids running AT&T (SysV) universe by default
625
 
solaris:        _sysv   # Sun SPARC & x86, Solaris 2.x
626
 
solaris_pkg:    _sysvp  # Sun SPARC & x86, Solaris 2.x; make package when done
627
663
stardent:       _sysv   # Stardent ...
628
664
sysv:           _sysv   # generic System V Unix (Xenix handled in unzip.h)
629
665
xos:            _sysv   # Olivetti LSX-3005..3045, X/OS 2.3 and 2.4
642
678
v7:             _v7     # generic Unix Version 7 box (prob. only Pixel...)
643
679
 
644
680
_v7:
645
 
        make -f unix/Makefile unzips \
646
 
         CF="$(CF) -DV7 -DNO_PARAM_H -DSHORT_NAMES -DBSD -DZMEM"
 
681
        make $(MAKEF) unzips \
 
682
         CF="$(CF) -DV7 -DNO_PARAM_H -DSHORT_NAMES -DBSD -DZMEM -DNO_LCHOWN -DNO_LCHMOD"
647
683
 
648
684
#----------------------------------------------------------------------------
649
685
#  "Unique" group (require non-standard options):
655
691
 
656
692
# AT&T 7300 (M68000/SysV.3) (add -DSYSV? -DNO_LIMITS?)
657
693
7300:           unix_make
658
 
        $(MAKE) unzips CF="$(CF) -DNO_DIR -DNO_MKDIR -DNO_STRNICMP -DNO_UID_GID -DCBREAK=2"
 
694
        $(MAKE) unzips CF="$(CF) -DNO_DIR -DNO_MKDIR -DNO_STRNICMP -DNO_UID_GID -DNO_FCHMOD -DNO_LCHOWN -DNO_LCHMOD -DCBREAK=2"
659
695
 
660
696
7300_gcc:       unix_make
661
 
        $(MAKE) unzips CC=gcc LD=gcc LF2="" \
662
 
         CF="-O2 -I. -DNO_DIR -DNO_MKDIR -DNO_STDLIB_H -DNO_STRNICMP -DNO_UID_GID -DCBREAK=2 $(LOC)"
 
697
        $(MAKE) unzips CC=gcc LD=gcc LF2="" CFLAGS="-O2" \
 
698
         LOC="-DNO_DIR -DNO_MKDIR -DNO_STDLIB_H -DNO_STRNICMP -DNO_UID_GID -DNO_FCHMOD -DNO_LCHOWN -DNO_LCHMOD -DCBREAK=2 $(LOC)"
663
699
        $(STRIP) $(UNZIPS)
664
700
 
665
701
# IBM AIX 3.x on an RS/6000:  see rs6000 target below
667
703
 
668
704
# Amdahl (IBMish) mainframe, UTS (SysV) 1.2.4, 2.0.1, 3.x
669
705
amdahl:         unix_make
670
 
        $(MAKE) unzips CF="$(CF) -DSYSV -DNO_UID_GID"
 
706
        $(MAKE) unzips CF="$(CF) -DSYSV -DNO_UID_GID -DNO_LCHOWN -DNO_LCHMOD"
671
707
 
672
708
# Amdahl UTS 2.1.4 with "extended file types" filesystem (aarrrggghhhh...)
673
709
amdahl_eft:     unix_make
674
 
        $(MAKE) unzips CF="$(CF) -eft -DSYSV -DNO_UID_GID"
 
710
        $(MAKE) unzips CF="$(CF) -eft -DSYSV -DNO_UID_GID -DNO_LCHOWN -DNO_LCHMOD"
675
711
 
676
712
# Apollo Domain/OS machines (added -D...SOURCE options) [Gordon Fox, 960810]
677
713
apollo:         unix_make
678
 
        $(MAKE) unzips CF="$(CF) -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE"
 
714
        $(MAKE) unzips CF="$(CF) -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE -DNO_LCHOWN -DNO_LCHMOD"
679
715
 
680
716
# BSDI BSD/OS on 386 platform, using the assembler replacement for crc32.c
681
717
bsdi:           unix_make
682
718
        @echo 'NOTE:  use bsdi_noasm target for non-Intel BSD/OS compiles.'
683
719
        $(MAKE) unzips CC=gcc2 LD=shlicc2 AS=gcc2\
684
 
         CF="-O3 -Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)" CRC32=crc_gcc
 
720
         CFLAGS="-O3 -Wall -DASM_CRC -DBSD" CRCA_O=crc_gcc$O
685
721
 
686
722
# BSDI BSD/OS
687
723
bsdi_noasm:     unix_make
688
724
#       @echo 'NOTE:  use bsd target for non-Intel BSD/OS compiles.'
689
725
        $(MAKE) unzips CC=gcc2 LD=shlicc2 AS=gcc2\
690
 
         CF="-O3 -Wall -I. -DUNIX -DBSD $(LOC)"
 
726
         CFLAGS="-O3 -Wall -DBSD"
691
727
 
692
728
# Coherent 3.x/4.x, Mark Williams C.  ``For Coherent's CC, it needs either
693
729
# -T0 or -T150000 (or bigger) added to the CFLAGS, otherwise the compiler
694
730
# runs out of memory and dies in zipinfo.c.'' [Fred "Fredex" Smith, 940719]
695
731
coherent:       unix_make
696
 
        $(MAKE) unzips CF="$(CF) -T0"
 
732
        $(MAKE) unzips CFLAGS="$(CFLAGS) -T0 -DNO_LCHOWN -DNO_LCHMOD"
697
733
 
698
734
# Cray-2, Y-MP or C90, running Unicos 5.x to 8.x (SysV + BSD enhancements)
699
735
# and Standard (ANSI) C compiler 3.0 or later.
700
736
cray_opt:       unix_make
701
 
        $(MAKE) unzips CF="$(CF) -h scalar3 -h vector3"
 
737
        $(MAKE) unzips CFLAGS="$(CFLAGS) -h scalar3 -h vector3 -DNO_LCHOWN -DNO_LCHMOD"
702
738
 
703
739
# The unzip41 build on a Cyber 910/SGI running Irix v3.3.3 was successful
704
740
# with the following change to Makefile:
705
741
cyber_sgi:      unix_make
706
 
        $(MAKE) unzips CF="$(CF) -I/usr/include/bsd"\
 
742
        $(MAKE) unzips CFLAGS="$(CFLAGS) -I/usr/include/bsd -DNO_LCHOWN -DNO_LCHMOD"\
707
743
         LF="-lbsd $(LF)" SL="-lbsd $(SL)"
708
744
 
709
745
# The Cygwin environment on a Win32 system, treated as an UNIX emulator.
711
747
# Info-ZIP recommends using "win32/Makefile.gcc" instead.
712
748
cygwin:         unix_make
713
749
        $(MAKE) unzips CC=gcc LD=gcc AS=gcc\
714
 
         CF="-O3 -I. -DUNIX -DASM_CRC $(LOC)"\
715
 
         AF="-Di386 $(AF)" CRC32=crc_gcc\
 
750
         CFLAGS="-O3 -DASM_CRC -DNO_LCHOWN -DNO_LCHMOD"\
 
751
         AF="-Di386 $(AF)" CRCA_O=crc_gcc$O\
716
752
         E=".exe" CP="cp" LN="ln -s"
717
753
 
718
754
# 680x0, DIAB dnix 5.2/5.3 (a Swedish System V clone)
722
758
#  -X9 = warnings if a function is used without a declaration
723
759
#
724
760
dnix:           unix_make
725
 
        $(MAKE) unzips CF="$(CF) -X7 -X9 -DDNIX"
 
761
        $(MAKE) unzips CFLAGS="$(CFLAGS) -X7 -X9 -DDNIX"
726
762
 
727
763
# FreeBSD on Intel:
728
764
freebsd:                unix_make
729
765
        @echo 'NOTE:  use bsd target for non-Intel FreeBSD compiles (if any).'
730
766
        $(MAKE) unzips CC=gcc LD=gcc AS=gcc\
731
 
         CF="-O3 -Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)"\
732
 
         AF="-Di386 $(AF)" CRC32=crc_gcc
 
767
         CFLAGS="-O3 -Wall -DASM_CRC -DBSD"\
 
768
         AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
733
769
 
734
770
# Generic BSDish Unix gcc.  ``The -O3 only works with later versions of gcc;
735
771
# you may have to use -O2 or -O for earlier versions.  I have no idea why
739
775
# with "echo" instead).
740
776
#
741
777
gcc:            unix_make
742
 
        $(MAKE) unzips CC=gcc LD=gcc CF="-O3 -I. $(LOC)" LF2=""
 
778
        $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O3" LF2=""
743
779
        $(STRIP) $(UNZIPS)
744
780
 
745
781
# Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000
746
782
hk68:           unix_make
747
783
        $(MAKE) unzips CC="gcc" LD="gcc"\
748
784
         LF="-n $(LF)" SL="-n $(SL)" FL="-n $(FL)"\
749
 
         CF="-ga -X138 -I. $(LOC) -Dlocaltime=localti -Dtimezone=timezon"
 
785
         CFLAGS="-ga -X138 -Dlocaltime=localti -Dtimezone=timezon"
750
786
 
751
787
# ISC Unix on 386 platform
752
788
isc:            unix_make
753
 
        $(MAKE) unzips LF2="-lc_s $(LF2)" CRC32=crc_sysv \
754
 
         CF="-O -I. -DASM_CRC -DSYSV -DNO_UID_GID -DNEED_PTEM $(LOC)" \
 
789
        $(MAKE) unzips LF2="-lc_s $(LF2)" CRCA_O=crc_sysv$O \
 
790
         CFLAGS="-O" LOC="-DASM_CRC -DSYSV -DNO_UID_GID -DNEED_PTEM -DNO_LCHOWN -DNO_LCHMOD $(LOC)" \
755
791
         AF="-DNO_UNDERLINE -Djecxz=jcxz -DALIGNMENT='.align 16' $(AF)"
756
792
 
757
793
isc_gcc:        unix_make
758
 
        $(MAKE) unzips AS=gcc CC=gcc LD=gcc CRC32=crc_gcc LF="-shlib $(LF)" \
759
 
         SL="-shlib $(SL)" FL="-shlib $(FL)" \
760
 
         LF2="" CF="-O3 -I. -DSYSV -DASM_CRC -DNO_UID_GID -DNEED_PTEM $(LOC)" \
 
794
        $(MAKE) unzips AS=gcc CC=gcc LD=gcc CRCA_O=crc_gcc$O \
 
795
         LF="-shlib $(LF)" SL="-shlib $(SL)" FL="-shlib $(FL)" LF2="" \
 
796
         CFLAGS="-O3" LOC="-DSYSV -DASM_CRC -DNO_UID_GID -DNEED_PTEM -DNO_LCHOWN -DNO_LCHMOD $(LOC)" \
761
797
         AF="-DNO_UNDERLINE -Djecxz=jcxz -DALIGNMENT='.align 16' $(AF)"
762
798
        $(STRIP) $(UNZIPS)
763
799
 
764
800
# "ISI machine (68025 CPU)" (based on e-mail from Rob White <rsw@tfs.com>;
765
801
# no further information).  May also need DIRENT defined.
766
802
isi:            unix_make
767
 
        $(MAKE) unzips CF="$(CF) -DDECLARE_ERRNO"
 
803
        $(MAKE) unzips CF="$(CF) -DDECLARE_ERRNO -DNO_LCHOWN -DNO_LCHMOD"
768
804
 
769
805
# Linux on 386 platform, using the assembler replacement for crc32.c. (-O4 and
770
806
# -fno-strength-reduce have virtually no effect beyond -O3.  Add "-m486
773
809
linux:          unix_make
774
810
        @echo 'NOTE:  use linux_noasm target for non-Intel Linux compiles.'
775
811
        $(MAKE) unzips CC=gcc LD=gcc AS=gcc\
776
 
         CF="-O3 -Wall -I. -DASM_CRC $(LOC)"\
777
 
         AF="-Di386 $(AF)" CRC32=crc_gcc
 
812
         CFLAGS="-O3 -Wall -DASM_CRC"\
 
813
         AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
778
814
# GRR:  this echo is pointless; if user gets this far, no difference to install
779
815
#       @echo 'Be sure to use the install_asm target rather than the install target'
780
816
 
783
819
# Linux (Posix, approximately SysV):  virtually any version since before 0.96,
784
820
# for any platform.  Change "-O" to "-O3" or whatever, as desired...
785
821
linux_noasm:    unix_make
786
 
        $(MAKE) unzips CC=gcc LD=gcc CF="-O -Wall -I. $(LOC)"
 
822
        $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall"
787
823
 
788
824
# Linux with lcc compiler:  __inline__ (stat.h) not recognized, and must edit
789
825
# /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined.  -O3
790
826
# (or -O2 or -O) is ignored.  [GRR 960828: test target only]
791
827
#
792
828
linux_lcc:      unix_make
793
 
        $(MAKE) unzips CC=lcc LD=lcc CF="-O3 -Wall -I. -D__inline__= $(LOC)"
 
829
        $(MAKE) unzips CC=lcc LD=lcc CFLAGS="-O3 -Wall -D__inline__= "
794
830
 
795
831
# Linux host with go32 (djgpp) cross-compiler (go32crs.tgz) for 32-bit DOS.
796
832
linux_dos:      unix_make
797
 
        $(MAKE) unzips CC=go32gcc LD=go32gcc M=msdos CF="-O2 -Wall -I. $(LOC)"
 
833
        $(MAKE) unzips CC=go32gcc LD=go32gcc M=msdos OSDEP_H="msdos/doscfg.h" \
 
834
         CFLAGS="-O2 -Wall"
798
835
#       go32-strip unzip
799
836
#       Due to limitations of the cross-compiling package, this has to be
800
837
#       done manually:
808
845
# library).
809
846
#
810
847
linux_shlib:    unix_make
811
 
#       $(MAKE) objsdll CC=gcc CF="-O3 -Wall -I. -fPIC -DDLL $(LOC)"
812
 
        $(MAKE) objsdll CC=gcc CF="-O3 -Wall -I. -fPIC -DDLL -DASM_CRC $(LOC)"\
813
 
         AS=gcc AF="-fPIC -Di386 $(AF)" CRC32=crc_gcc
814
 
        ln -sf crc_gcc.pic.o crc32.pic.o
815
 
        gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.4 $(OBJSDLL)
 
848
        $(MAKE) objsdll CC=gcc CFLAGS="-O3 -Wall -fPIC"\
 
849
         LOC="-DDLL -DASM_CRC $(LOC)"\
 
850
         AS=gcc AF="-fPIC -Di386 $(AF)" CRCA_O=crc_gcc$O
 
851
        gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.4 $(OBJSDLL)\
 
852
         crc_gcc.pic.o
816
853
        ln -sf libunzip.so.0.4 libunzip.so.0
817
854
        ln -sf libunzip.so.0 libunzip.so
818
855
        gcc -c -O unzipstb.c
821
858
# Linux ELF shared library, as above, but using inflate() from zlib (libz.so)
822
859
# instead of the original UnZip version.  (libz was libgz prior to 0.94)
823
860
linux_shlibz:   unix_make
824
 
#       $(MAKE) objsdll CC=gcc CF="-O3 -Wall -I. -fPIC -DDLL -DUSE_ZLIB $(LOC)"
825
 
        $(MAKE) objsdll CC=gcc AS=gcc AF="-fPIC -Di386 $(AF)" CRC32=crc_gcc\
826
 
         CF="-O3 -Wall -I. -fPIC -DDLL -DUSE_ZLIB -DASM_CRC $(LOC)"
827
 
        ln -sf crc_gcc.pic.o crc32.pic.o
828
 
        gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.4 $(OBJSDLL)
 
861
        $(MAKE) objsdll CC=gcc AS=gcc AF="-fPIC -Di386 $(AF)" CRCA_O=crc_gcc$O\
 
862
         CFLAGS="-O3 -Wall -fPIC" LOC="-DDLL -DUSE_ZLIB -DASM_CRC $(LOC)"
 
863
        gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.4 $(OBJSDLL)\
 
864
         crc_gcc.pic.o
829
865
        ln -sf libunzip.so.0.4 libunzip.so.0
830
866
        gcc -c -O unzipstb.c
831
867
        gcc -o unzip unzipstb.o -L. -lunzip -lz
836
872
 
837
873
# Macintosh MacOS X (Unix-compatible enviroment), using standard compiler
838
874
macosx: unix_make
839
 
        $(MAKE) unzips CF="-O3 -Wall -I. -DBSD -DUNIX $(LOC)" LF2=""
 
875
        $(MAKE) unzips CFLAGS="-O3 -Wall -DBSD" LF2=""
840
876
        $(STRIP) $(UNZIPS)
841
877
 
842
878
# Macintosh MacOS X (Unix-compatible enviroment), using gcc
843
879
macosx_gcc:     unix_make
844
 
        $(MAKE) unzips CC=gcc CF="-O3 -Wall -I. -DBSD -DUNIX $(LOC)" LF2=""
 
880
        $(MAKE) unzips CC=gcc CFLAGS="-O3 -Wall -DBSD" LF2=""
845
881
        $(STRIP) $(UNZIPS)
846
882
 
847
883
# Minix 1.5 PC for the 386.  Invoke as is to use default cc, or as "make
848
884
# minix CC=gcc" to use gcc.  Try "make linux" if you have a working termios.h.
849
885
minix:          unix_make
850
 
        $(MAKE) unzips CF="$(CF) -DMINIX -DSHORT_NAMES" CC=$(CC) LD=$(CC)
 
886
        $(MAKE) unzips CF="$(CF) -DMINIX -DSHORT_NAMES -DNO_LCHOWN -DNO_LCHMOD" CC=$(CC) LD=$(CC)
851
887
 
852
888
# MPE/iX, the Unix variant for HP 3000 systems.
853
889
mpeix:          unix_make
854
890
        $(MAKE) unzips CC=c89\
855
 
         CF="$(CF) -DUNIX -D_POSIX_SOURCE -DHAVE_TERMIOS_H -DPASSWD_FROM_STDIN -DNO_PARAM_H"\
 
891
         CF="$(CF) -DUNIX -D_POSIX_SOURCE -DHAVE_TERMIOS_H -DPASSWD_FROM_STDIN -DNO_PARAM_H -DNO_LCHOWN -DNO_LCHMOD"\
856
892
         LF2=-lbsd CP=cp LN="ln -s"
857
893
 
858
894
# NeXT info.
878
914
 
879
915
# NeXT 3.x: as above, plus better optimization.
880
916
next3x:         unix_make
881
 
        $(MAKE) unzips CF="-O2 -I. $(LOC)" LF2="-object -s"
 
917
        $(MAKE) unzips CFLAGS="-O2" LF2="-object -s"
882
918
 
883
919
# NeXT 3.1+: make the executable fat (multi-architecture binary [MAB],
884
920
# for "black" [NeXT] and "white" [x86] hardware, so far).
885
921
nextfat:        unix_make
886
 
        $(MAKE) unzips CF="-O2 -I. $(LOC) -arch i386 -arch m68k" \
 
922
        $(MAKE) unzips CFLAGS="-O2 -arch i386 -arch m68k" \
887
923
         LF2="-arch i386 -arch m68k -object -s"
888
924
 
889
925
# IBM OS/390 (formerly MVS) compiled under "OpenEdition" shell
890
926
os390:          unix_make
891
927
        set -x; \
892
 
        $(MAKE) -f unix/Makefile unzips \
 
928
        $(MAKE) $(MAKEF) unzips \
893
929
         CC=c89 LD="\$$(CC) -Wl,EDIT=NO" \
894
930
         CF="$(CF) -DSYSV -DUNIX -DOS390 -DEBCDIC -DNO_PARAM_H \
 
931
         -DNO_LCHOWN -DNO_LCHMOD \
895
932
         -D_ALL_SOURCE $(HOST_VERSINFO)" LF2=""
896
933
 
897
934
# Sequent Symmetry running Dynix/ptx (sort of SysV.3):  needs to link
898
935
# with libseq to get symlink().
899
936
ptx:            unix_make
900
 
        $(MAKE) unzips CF="$(CF) -DSYSV -DTERMIO -DPTX" LF2="$(LF2) -lseq"
 
937
        $(MAKE) unzips CF="$(CF) -DSYSV -DTERMIO -DPTX -DNO_LCHOWN -DNO_LCHMOD" LF2="$(LF2) -lseq"
901
938
 
902
939
# Pyramid 90X (probably all) under >= OSx4.1, either universe.  (This is an
903
940
# experimental target!  If it fails, use either pyr_ucb or pyr_att instead.)
904
941
# The make in the BSD half is too stupid to understand $(MAKE), sigh...
905
942
pyramid:        unix_make
906
 
        -make -f unix/Makefile pyr_`universe`
 
943
        -make $(MAKEF) pyr_`universe`
907
944
 
908
945
# QNX/Neutrino is "special" because you don't have any native development
909
946
# tools yet.  Set ARCH to "x86", "ppcbe", "ppcle", "mipsbe", or "mipsle"
913
950
        @if [ "$(ARCH)" = "" ] ; then \
914
951
                echo "You didn't set ARCH; I'll assume you meant ARCH=x86..." ; \
915
952
                echo "" ; \
916
 
                $(MAKE) -f unix/Makefile CC="qcc -Vgcc_ntox86" unzips ; \
 
953
                $(MAKE) $(MAKEF) CC="qcc -Vgcc_ntox86" unzips ; \
917
954
        else \
918
955
                echo "Making unzip for $(ARCH)..." ; \
919
956
                echo "" ; \
920
 
                $(MAKE) -f unix/Makefile CC="qcc -Vgcc_nto$(ARCH)" unzips ; \
 
957
                $(MAKE) $(MAKEF) CC="qcc -Vgcc_nto$(ARCH)" unzips ; \
921
958
        fi
922
959
 
923
960
# REGULUS:  68040-based, "real-time" SysV.3 mutant; uses gcc, with "REGULUS"
924
961
# predefined.
925
962
regulus:        unix_make
926
 
        $(MAKE) unzips CF="$(CF) -traditional -DSYSV -DNO_MKDIR"
 
963
        $(MAKE) unzips CF="$(CF) -traditional -DSYSV -DNO_MKDIR -DNO_LCHOWN -DNO_LCHMOD"
927
964
 
928
965
# IBM RS/6000 under AIX 3.2
929
966
rs6000:         unix_make
935
972
# recognize the -M0 flag that forces 8086 code.)  (GRR:  may need to reduce
936
973
# stack to 0c00h if using 286/small-model code...?)
937
974
sco_dos:        unix_make
938
 
        $(MAKE) unzips CF="-O -I. $(LOC) -dos -M0" M=msdos \
 
975
        $(MAKE) unzips CFLAGS="-O -dos -M0" M=msdos OSDEP_H="msdos/doscfg.h" \
939
976
         LF="-dos -F 2000" LF2="-o unzip.exe" \
940
977
         FL="-dos" FL2="-o funzip.exe" SL="-dos" SL2="-o unzipsfx.exe"
941
978
 
948
985
 
949
986
# SCO Xenix/286 2.2.3 or later with development system 2.2.1 or later
950
987
sco_x286:       unix_make
951
 
        $(MAKE) unzips CF="$(CF) -Mel2 -LARGE -DNO_MKDIR" \
 
988
        $(MAKE) unzips CF="$(CF) -Mel2 -LARGE -DNO_MKDIR -DNO_LCHOWN -DNO_LCHMOD" \
952
989
         LF="$(LF) -Mel2 -LARGE -lx" SL="$(SL) -Mel2 -LARGE" \
953
990
         FL="$(FL) -Mel2 -LARGE"
954
991
 
955
992
# Sequent Symmetry with Dynix.  (386, but needs -DZMEM)
956
993
# This should also work on Balance but I can't test it just yet.
957
994
sequent:        unix_make
958
 
        $(MAKE) unzips CF="$(CF) -DBSD -DZMEM"
 
995
        $(MAKE) unzips CF="$(CF) -DBSD -DZMEM -DNO_LCHOWN -DNO_LCHMOD"
959
996
 
960
997
# Sun 2, 3, 4 running SunOS 3.x
961
998
sunos3:         unix_make
962
 
        $(MAKE) unzips CF="$(CF) -DNO_UID_GID -DUID_USHORT"
 
999
        $(MAKE) unzips CF="$(CF) -DNO_UID_GID -DUID_USHORT -DNO_LCHOWN -DNO_LCHMOD"
963
1000
 
964
1001
# Generic System V + GNU C
965
1002
sysv_gcc:       unix_make
966
 
        $(MAKE) unzips CC=gcc LD=gcc CF="-O2 -I. -DUNIX -DSYSV $(LOC)" LF2=""
 
1003
        $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O2 -DSYSV" LF2=""
967
1004
        $(STRIP) $(UNZIPS)
968
1005
 
969
1006
# AT&T 6300+, System V.2 Unix:  run-time out-of-memory error if don't use -Ml;
970
1007
# also compile-time error if work arrays dimensioned at HSIZE+2 (>32K)
971
1008
sysv6300:       unix_make
972
 
        $(MAKE) unzips CF="$(CF) -Ml -DSYSV" LF="$(LF) -Ml"\
 
1009
        $(MAKE) unzips CF="$(CF) -Ml -DSYSV -DNO_LCHOWN -DNO_LCHMOD" LF="$(LF) -Ml"\
973
1010
         SL="$(SL) -Ml" FL="$(FL) -Ml"
974
1011
 
975
1012
# Texas Instruments System V.3 (running on HP 9000-1500)
976
1013
ti_sysv:        unix_make
977
 
        $(MAKE) unzips CF="$(CF) -DSYSV -DNO_UID_GID -DUID_USHORT"
 
1014
        $(MAKE) unzips CF="$(CF) -DSYSV -DNO_UID_GID -DUID_USHORT -DNO_LCHOWN -DNO_LCHMOD"
978
1015
 
979
1016
# SCO Xenix (Joe Foster 950508:  "unzip needs to be linked with -lx [for the
980
1017
# opendir(), readdir(), telldir(), rewinddir(), and closedir() calls]")