Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6725 siemargl 1
#===========================================================================
2
# Makefile for UnZip, ZipInfo, fUnZip, MakeSFX      AMIGA SAS/C Version 6.58
3
# Version:  5.53                                    last revised:  25 Dec 06
4
#===========================================================================
5
# from John Bush 
6
#            or: 
7
 
8
# updated for SAS/C Version 6.56+ and AmigaDOS 3.1 (V40)
9
# by Haidinger Walter 
10
 
11
# additional supplements and maintenance by Paul Kienitz
12
 
13
# This makefile should work with at least AmigaDOS 2.04 (V37)  (not tested)
14
# and will probably not work with AmigaDOS 1.3 (V34)
15
 
16
# If you have any improvements, critics or else please feel free to mail.
17
# Any response is appreciated. Haidinger Walter 
18
 
19
# Available targets:
20
# all           builds all executables below
21
# unzip         builds unzip executable
22
# unzipsfx      builds unzipsfx executable
23
# funzip        builds funzip executable
24
# makesfx       builds makesfx executable
25
# clean         remove all files created by the compilation
26
# spotless      like clean target but removes binaries too
27
 
28
 
29
##########################
30
# USER MACRO DEFINITIONS #
31
##########################
32
 
33
# Set the processor to generate code for UnZip and fUnZip. Specify one of:
34
# ANY 68000 68010 68020 68030 68040 68060  (Default: ANY or 68000)
35
 
36
# Use of the assembly versions is not supported yet since some of the asm
37
# source file do not assemble with 68000 instructions.
38
# Any help is appreciated of course.
39
 
40
CUSECPU = ANY
41
 
42
# Uncomment both CUTIL and LUTIL to make use of utility.library of OS 2.04+
43
# The utility.library is *not* used for UnZipSFX to ensure maximum portability
44
# between the different Amiga systems (minimal config: 68000 and OS 1.2).
45
# You can change this by adding the $(LUTIL) macro in the UnZipSFX linking
46
# rules (See below: Final output targets, UnZipSFX:).
47
# WARNINGS when using the utility library:
48
# 1. All Executables will *only* work with AmigaDOS 2.04 (v37) or higher.
49
# 2. You *need not* compile/link with short-integers using the
50
#    utility.library. It will crash your machine. See Libraries below.
51
#
52
# Default: commented (not used)
53
#
54
#CUTIL = UTILLIB DEFINE=_UTILLIB
55
#LUTIL = WITH SC:LIB/utillib.with    # include necessary linker defines
56
 
57
 
58
# Choose one stack-handling method (default=faster)
59
# StackExtend: Dynamic runtime stack extension. You won't notice stack overflows.
60
# StackCheck: On a stack overflow a requester appears which allows you to exit.
61
# Note that either stack watching will slow down your executable because of the
62
# extra code run on each function entry. On the other hand, you won't crash
63
# anymore due to stack overflows. However, you should not have *any* stack
64
# problems with info-zip if you raise your stack to 20000 (which I'd
65
# recommend as a minimum default stack for all applications) or more using the
66
# shell stack command. Type 'Stack 20000' or add it to your S:Shell-Startup.
67
# BTW: Typing 'Stack' prints your current stack size.
68
#
69
CSTACK = NOSTACKCHECK STACKEXTEND     # slow, but always works
70
#CSTACK = STACKCHECK NOSTACKEXTEND    # slow, requester & graceful exit
71
#CSTACK = NOSTACKCHECK NOSTACKEXTEND  # faster but relies on larger stack (>=10K)
72
 
73
#
74
# LIBRARIES
75
# ---------
76
 
77
# Choose one DATAOPTS , SASLIB and LSTARTUP
78
# Always comment/uncomment all macros of a set.
79
 
80
# Library to use with near data and 2-byte integers
81
# Notes: o  slower than 4-byte integers with 68000 cpu
82
#        o  *not* recommended due to poor overall performance
83
#        o  see comment in amiga/osdep.h
84
#DATAOPTS = DATA=NEAR SHORTINTEGERS DEF=_NEAR_DATA
85
#SASLIB   = scs
86
#LSTARTUP = cres.o
87
 
88
# Library to use with near data and 4-byte integers (DEFAULT)
89
# *** use this with the utility.library ***
90
DATAOPTS = DATA=NEAR DEF=_NEAR_DATA
91
SASLIB   = sc
92
LSTARTUP = cres.o
93
 
94
# Library to use with far data and 2-byte integers
95
# use if DYN_ALLOC is not defined
96
# old default - far data always works but is slower
97
#DATAOPTS = DATA=FAR SHORTINTEGERS DEF=_FAR_DATA
98
#SASLIB   = scsnb
99
#LSTARTUP = c.o
100
 
101
# Library to use with far data and 4-byte integers
102
# if everything else fails: try this
103
#DATAOPTS = DATA=FAR DEF=_FAR_DATA
104
#SASLIB   = scnb
105
#LSTARTUP = c.o
106
 
107
 
108
#
109
# DEBUGGING
110
# ---------
111
 
112
# Default: No debugging information added.
113
# The two macros below will be overwritten if you choose to add
114
# debug info, therefore need to comment.
115
CDBG = NODEBUG NOPROFILE NOCOVERAGE    # default: no debug info
116
LDBG = STRIPDEBUG                      # default: no debug info
117
 
118
# Compiler and loader debug flags.  Uncomment as needed.  Recomment when done.
119
# Optimization disabled for faster compilation (by using NOOPT)
120
#CDBG1 = DEF=DEBUG DEF=DEBUG_TIME     # enables Info-ZIP's debug output
121
 
122
# Enable profiling and coverage when desired. Option COVERAGE commented
123
# seperately because running coverage may corrupt your drive in case of a
124
# system crash since a file 'cover.dat' is created in your working directory.
125
# Note that the use of COVERAGE forces the use of the c.o startup module.
126
#CDBG2 = PROFILE
127
#CDBG3 = COVERAGE        # must use c.o startup code:
128
#LSTARTUP = c.o          # Uncomment *only* when you use COVERAGE
129
 
130
# *Uncomment* _HERE_ macros CDBG and LDBG to include debugging information
131
#CDBG = $(CDBG1) $(CDBG2) $(CDBG3) ADDSYM DEBUG=FULLFLUSH STACKCHECK NOOPT
132
#LDBG = ADDSYM
133
# Optional use of memwatch.library which can be found in your
134
# sc:extras/memlib directory. Please read the short docs (memlib.doc).
135
# Note that memlib has a small bug: MWTerm() displays always the first entry.
136
# Get the latest version from aminet (dev/debug/memlib.lha) or
137
# contact me to get the patch. Uncomment all macros to use.
138
#CMEMLIB  = DEFINE=MWDEBUG=1       # define to enable library
139
#LMEMLIB  = SC:LIB/memwatch.lib    # path to library
140
#LSTARTUP = c.o                    # must use c.o with memlib!
141
 
142
 
143
#
144
# MAPPING
145
# -------
146
 
147
# Map filenames used when mapping (no need to comment)
148
#
149
MAPFS = unzip.map               # UnZip    map filename
150
MAPFX = unzipsfx.map            # UnZipSFX map filename
151
MAPFF = funzip.map              # fUnZip   map filename
152
MAPFM = makesfx.map             # MakeSFX  map filename
153
 
154
# Map file output: Uncomment to highlight and bold headings.
155
#
156
#MAPFSTYLE = FANCY
157
 
158
# Map flags for each EXECUTABLE. Uncomment to enable mapping.
159
# For map options please refer to:
160
# SAS/C v6 manual, volume 1: user's guide, chapter 8, page 136: map
161
# Default: all options enabled: f,h,l,o,s,x
162
#                                 |-> options start here
163
#LMAPS = $(MAPFSTYLE) MAP $(MAPFS) f,h,l,o,s,x   # UnZip    maps
164
#LMAPX = $(MAPFSTYLE) MAP $(MAPFX) f,h,l,o,s,x   # UnZipSFX maps
165
#LMAPF = $(MAPFSTYLE) MAP $(MAPFF) f,h,l,o,s,x   # fUnZip   maps
166
#LMAPM = $(MAPFSTYLE) MAP $(MAPFM) f,h,l,o,s,x   # MakeSFX  maps
167
 
168
 
169
#
170
# LISTINGS
171
# --------
172
 
173
# Listfile-extensions for each executable (enter *with* dot)
174
#
175
LISTEXTS = .lst         # extension for UnZip and MakeSFX listfiles
176
LISTEXTX = .xlst        # extension for UnZipSFX listfiles
177
LISTEXTF = .flst        # extension for fUnZip listfiles
178
 
179
 
180
# List files and cross references for each OBJECT.
181
# Add/remove flags as needed. All listed by default.
182
# Use LISTINCLUDES only to determine the dependencies for smake
183
#
184
CLISTOPT = LISTHEADERS LISTMACROS # LISTSYSTEM LISTINCLUDES
185
CXREFOPT = XHEAD XSYS
186
#
187
# Uncomment to enable listing (default: commented)
188
# *** WARNING: List files require *lots* of disk space!
189
#
190
#CLIST = LIST $(CLISTOPT)
191
#CXREF = XREF $(CXREFOPT)
192
 
193
 
194
#
195
# SUPPRESSED COMPILER WARNINGS
196
# ----------------------------
197
 
198
# Compiler warnings to ignore
199
#
200
# Warning 105 : module does not define any externally-known symbols
201
# Warning 304 : Dead assignment eliminated...
202
# Note    306 : ...function inlined...
203
# Warning 317 : possibly uninitialized variable...
204
# Comment to enable.
205
#
206
CIGNORE = IGNORE=105,304,306,317
207
 
208
 
209
#
210
# OBJECT EXTENSIONS
211
#
212
 
213
# Extensions used for objects of each executeable.
214
# Transformation rules require unique extensions.
215
# Enter *with* dot.
216
#
217
O  = .o         # general extension for objects
218
OX = .xo        # extension for special UnZipSFX objects
219
OF = .fo        # extension for special fUnZip objects
220
 
221
 
222
# Filename used to store converted options from environment variable
223
# LOCAL_UNZIP. Default: scoptions_local_unzip
224
#
225
CWITHOPT = scoptions_local_unzip
226
 
227
 
228
# Filenames to store compiler options to prevent command line overflow
229
#
230
# Options file for UnZip and fUnZip
231
CFILEC = scoptions-unzip
232
# Options file for UnZipSFX
233
CFILEX = scoptions-unzipsfx
234
# Special options for MakeSFX
235
CFILEM = scoptions-makesfx
236
 
237
 
238
# Temp filenames for object lists to load using linker "WITH" command.
239
#
240
OBJLISTS = unzip_objlist.with            # UnZip    object list
241
OBJLISTX = unzipsfx_objlist.with         # UnZipSFX object list
242
OBJLISTF = funzip_objlist.with           # fUnZip   object list
243
OBJLISTM = makesfx_objlist.with          # MakeSFX  object list
244
 
245
 
246
# Filenames to store linker options
247
#
248
LWITHS = unzip.lnk                       # UnZip    linker options
249
LWITHX = unzipsfx.lnk                    # UnZipSFX linker options
250
LWITHF = funzip.lnk                      # fUnZip   linker options
251
LWITHM = makesfx.lnk                     # MakeSFX  linker options
252
 
253
 
254
######################################
255
#  NOTHING TO CHANGE BEYOND HERE ... #
256
######################################
257
 
258
 
259
# Compiler definitions
260
#
261
CC = sc
262
#
263
# Optimizer flags
264
#
265
OPTPASSES = 6     # set number of global optimizer passes
266
#
267
OPT1 = OPT OPTINL OPTINLOCAL OPTTIME OPTLOOP OPTSCHED
268
OPT2 = OPTCOMP=$(OPTPASSES) OPTDEP=$(OPTPASSES) OPTRDEP=$(OPTPASSES)
269
OPT  = $(OPT1) $(OPT2)
270
 
271
# Compiler flags
272
#
273
# cpu flags for UnZip and fUnZip
274
CCPUOPTSF = CPU=$(CUSECPU) $(CUTIL)
275
# cpu flags for UnzipSFX and MakeSFX (ensures portability to all Amigas)
276
CCPUOPTXM = CPU=ANY
277
 
278
CDEFINES = $(CMEMLIB) $(CDEFINES) DEF=AMIGA DEF=PROTO
279
COPTIONS = CODE=NEAR NMINC VERBOSE STRINGMERGE PARAMETERS=BOTH
280
COPTIONS = $(COPTIONS) ERRORREXX NOERRORCONSOLE MEMSIZE=HUGE $(CLIST) $(CXREF)
281
COPTIONS = $(COPTIONS) $(CSTACK) STRICT UNSCHAR NOICONS
282
COPTIONS = $(COPTIONS) $(CIGNORE) $(OPT) $(CDBG)
283
# common compiler flags
284
CFLAGSC  = $(CDEFINES) $(DATAOPTS) $(COPTIONS)
285
# special compiler flags with $(DATAOPTS) excluded
286
CFLAGSS  = $(CDEFINES) $(COPTIONS)
287
 
288
# Linker definitions
289
#  See SASLIB definition above
290
#
291
LD = slink
292
# special linker flags for UnZip to create pure (i.e. resident) binary.
293
LDFLAGSS = FROM SC:LIB/$(LSTARTUP)
294
# common linker flags for all other executeables
295
LDFLAGSC = FROM SC:LIB/c.o
296
 
297
LDFLAGS2 = NOICONS $(LDBG)
298
# special linker flags to select library set above
299
LIBFLAGSS = LIB $(LMEMLIB) SC:LIB/$(SASLIB).lib SC:LIB/amiga.lib
300
# common linker flags
301
LIBFLAGSC = LIB $(LMEMLIB) SC:LIB/sc.lib SC:LIB/amiga.lib
302
 
303
 
304
##################
305
# TARGET OBJECTS #
306
##################
307
 
308
 
309
# UnZip Objects
310
OBJS1 = unzip$(O) crc32$(O) crypt$(O) envargs$(O) explode$(O)
311
OBJS2 = extract$(O) fileio$(O) globals$(O) list$(O) inflate$(O) match$(O)
312
OBJS3 = process$(O) ttyio$(O) ubz2err$(O) unreduce$(O) unshrink$(O) zipinfo$(O)
313
OBJSA = amiga$(O) timezone$(O)
314
OBJS  = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJSA)
315
 
316
# UnZipSFX Objects
317
OBJX1 = unzip$(OX) extract$(OX) inflate$(OX) match$(OX) process$(OX)
318
OBJXI = crypt$(OX) crc32$(OX) fileio$(OX) globals$(OX) ttyio$(OX) ubz2err$(OX)
319
OBJXA = amiga$(OX) timezone$(OX)
320
OBJX  = $(OBJX1) $(OBJXI) $(OBJXA)
321
 
322
# fUnZip Objects
323
OBJF1 = funzip$(O)
324
OBJF2 = crc32$(OF) crypt$(OF) globals$(OF) inflate$(OF) ttyio$(OF)
325
OBJFA = filedate$(OF) stat$(O)
326
OBJF  = $(OBJF1) $(OBJF2) $(OBJFA)
327
 
328
# MakeSFX Objects
329
OBJM = makesfx$(O)
330
 
331
# Common header files
332
UNZIP_H1 = unzip.h unzpriv.h globals.h
333
UNZIP_HA = amiga/amiga.h amiga/z-stat.h
334
UNZIP_H  = $(UNZIP_H1) $(UNZIP_HA)
335
 
336
# Output targets
337
UNZIPS = UnZip UnZipSFX fUnZip MakeSFX
338
 
339
 
340
#######################################
341
# DEFAULT TARGET AND PROCESSING RULES #
342
#######################################
343
 
344
all: request flush $(UNZIPS)
345
 
346
# UnZip transformation rules
347
#
348
.c$(O) :
349
        $(CC) WITH=$(CFILEC) LISTFILE=$>$(LISTEXTS) OBJNAME=$@ $*.c
350
 
351
# UnZipSFX transformation rules
352
#
353
.c$(OX):
354
        $(CC) DEF=SFX WITH=$(CFILEC) LISTFILE=$>$(LISTEXTX) OBJNAME=$@ $*.c
355
 
356
# fUnZip transformation rules
357
#
358
.c$(OF):
359
        $(CC) DEF=FUNZIP WITH=$(CFILEC) LISTFILE=$>$(LISTEXTF) OBJNAME=$@ $*.c
360
 
361
 
362
#########################
363
# Final output targets. #
364
#########################
365
 
366
unzip:    local_unzip CommonFlags $(OBJS)
367
          @Echo "$(OBJS)" >$(OBJLISTS)
368
          Type $(OBJLISTS)
369
# -----
370
# Note:   Change $(LDFLAGSS) to $(LDFLAGSC) if DYN_ALLOC is *not* defined.
371
# -----
372
          @Echo "$(LDFLAGSS) $(LUTIL) WITH $(OBJLISTS) $(LIBFLAGSS) " \
373
                "$(LDFLAGS2) $(LMAPS)" >$(LWITHS)
374
          Type $(LWITHS)
375
          $(LD) TO UnZip    WITH $(LWITHS)
376
 
377
funzip:   local_unzip CommonFlags $(OBJF)
378
          @Echo "$(OBJF)" >$(OBJLISTF)
379
          Type $(OBJLISTF)
380
          @Echo "$(LDFLAGSC) $(LUTIL) WITH $(OBJLISTF) $(LIBFLAGSS) " \
381
                "$(LDFLAGS2) $(LMAPF)" >$(LWITHF)
382
          Type $(LWITHF)
383
          $(LD) TO fUnZip   WITH $(LWITHF)
384
 
385
unzipsfx: local_unzip SFXFlags $(OBJX)
386
          @Echo "$(OBJX)" >$(OBJLISTX)
387
          Type $(OBJLISTX)
388
# ----
389
# Note:   Insert $(LUTIL) here, to use utility library with UnZipSFX.
390
# -----                      vvvvvvv
391
          @Echo "$(LDFLAGSC)          WITH $(OBJLISTX) $(LIBFLAGSS) " \
392
                "$(LDFLAGS2) $(LMAPX)" >$(LWITHX)
393
          Type $(LWITHX)
394
          $(LD) TO UnZipSFX WITH $(LWITHX)
395
 
396
 
397
makesfx:  MakeSFXFlags $(OBJM)
398
          @Echo "$(OBJM)" >$(OBJLISTM)
399
          Type $(OBJLISTM)
400
          @Echo "$(LDFLAGSC) $(LUTIL) WITH $(OBJLISTM) $(LIBFLAGSC) " \
401
                "$(LDFLAGS2) $(LMAPM)" >$(LWITHM)
402
          Type $(LWITHM)
403
          # never use short-integers with MakeSFX !
404
          $(LD) TO MakeSFX  WITH $(LWITHM)
405
 
406
clean:
407
        -Delete >nil: $(OBJS) quiet
408
        -Delete >nil: $(OBJX) quiet
409
        -Delete >nil: $(OBJF) quiet
410
        -Delete >nil: $(OBJM) quiet
411
        -Delete >nil: $(OBJLISTS) $(OBJLISTX) $(OBJLISTF) $(OBJLISTM) quiet
412
        -Delete >nil: $(MAPFS) $(MAPFX) $(MAPFF) $(MAPFM) quiet
413
        -Delete >nil: \#?$(LISTEXTS) \#?$(LISTEXTX) \#?$(LISTEXTF) quiet
414
        -Delete >nil: $(CWITHOPT) $(CFILEC) $(CFILEX) $(CFILEM) quiet
415
        -Delete >nil: SCOPTIONS SASCOPTS quiet
416
        -Delete >nil: $(LWITHS) $(LWITHX) $(LWITHF) $(LWITHM) quiet
417
        -Delete >nil: \#?.q.?? \#?.tmp \#?.cov quiet
418
 
419
spotless: clean
420
        -Delete >nil: $(UNZIPS) quiet
421
 
422
 
423
# UnZip dependencies:
424
# (objects not needed by Amiga port are commented)
425
 
426
# special rule for adding Amiga internal version number to UnZip
427
amiga$(O):          amiga/amiga.c amiga/filedate.c amiga/stat.c $(UNZIP_H) crypt.h timezone.h env:Workbench
428
stat$(O):           amiga/stat.c     amiga/z-stat.h
429
filedate$(O):       amiga/filedate.c crypt.h timezone.h
430
api$(O):            api.c      $(UNZIP_H) unzvers.h #zlib.h
431
apihelp$(O):        apihelp.c  $(UNZIP_H) unzvers.h
432
crc32$(O):          crc32.c    $(UNZIP_H) zip.h crc32.h
433
crypt$(O):          crypt.c    $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
434
envargs$(O):        envargs.c  $(UNZIP_H)
435
explode$(O):        explode.c  $(UNZIP_H)
436
extract$(O):        extract.c  $(UNZIP_H) crc32.h crypt.h
437
fileio$(O):         fileio.c   $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
438
globals$(O):        globals.c  $(UNZIP_H)
439
inflate$(O):        inflate.c  $(UNZIP_H) inflate.h #zlib.h
440
list$(O):           list.c     $(UNZIP_H)
441
match$(O):          match.c    $(UNZIP_H)
442
process$(O):        process.c  $(UNZIP_H) crc32.h
443
timezone$(O):       timezone.c $(UNZIP_H) zip.h timezone.h
444
ttyio$(O):          ttyio.c    $(UNZIP_H) zip.h crypt.h ttyio.h
445
ubz2err$(O):        ubz2err.c  $(UNZIP_H)
446
unreduce$(O):       unreduce.c $(UNZIP_H)
447
unshrink$(O):       unshrink.c $(UNZIP_H)
448
unzip$(O):          unzip.c    $(UNZIP_H) crypt.h unzvers.h consts.h #zlib.h
449
#unzipstb$(O):       unzipstb.c $(UNZIP_H) unzvers.h
450
zipinfo$(O):        zipinfo.c  $(UNZIP_H)
451
 
452
 
453
# UnZipSFX dependencies:
454
#
455
# special rule for adding Amiga internal version number to UnZipSFX
456
amiga$(OX):      amiga/amiga.c amiga/filedate.c amiga/stat.c $(UNZIP_H) crypt.h timezone.h
457
unzip$(OX):      unzip.c    $(UNZIP_H) crypt.h unzvers.h consts.h
458
crc32$(OX):      crc32.c    $(UNZIP_H) zip.h crc32.h
459
crypt$(OX):      crypt.c    $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
460
extract$(OX):    extract.c  $(UNZIP_H) crc32.h crypt.h
461
fileio$(OX):     fileio.c   $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
462
globals$(OX):    globals.c  $(UNZIP_H)
463
inflate$(OX):    inflate.c  $(UNZIP_H) inflate.h #zlib.h
464
match$(OX):      match.c    $(UNZIP_H)
465
process$(OX):    process.c  $(UNZIP_H) crc32.h
466
timezone$(OX):   timezone.c $(UNZIP_H) zip.h timezone.h
467
ttyio$(OX):      ttyio.c    $(UNZIP_H) zip.h crypt.h ttyio.h
468
ubz2err$(OX):    ubz2err.c  $(UNZIP_H)
469
 
470
 
471
# fUnZip dependencies:
472
#
473
funzip$(O):      funzip.c   $(UNZIP_H) crc32.h crypt.h ttyio.h
474
crc32$(OF):      crc32.c    $(UNZIP_H) zip.h crc32.h
475
crypt$(OF):      crypt.c    $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
476
globals$(OF):    globals.c  $(UNZIP_H)
477
inflate$(OF):    inflate.c  $(UNZIP_H) inflate.h crypt.h #zlib.h
478
ttyio$(OF):      ttyio.c    $(UNZIP_H) zip.h crypt.h ttyio.h
479
filedate$(OF):   amiga/filedate.c crypt.h
480
 
481
 
482
# MakeSFX dependencies
483
#
484
# special transformation rules to never use shortintegers:
485
makesfx$(O):      amiga/makesfx.c
486
        $(CC) WITH=$(CFILEM) LISTFILE=$>$(LISTEXTS) OBJNAME=$@ $*.c
487
 
488
 
489
########################
490
# DEPENDECIES END HERE #
491
########################
492
 
493
# flush all libraries to provide more mem for compilation
494
flush:
495
        @Avail flush >nil:
496
 
497
# write common compiler flags to file and echo to user
498
CommonFlags:
499
        @Echo "$(CFLAGSC)" "$(CCPUOPTSF)" >$(CFILEC)
500
        @Type "$(CWITHOPT)"              >>$(CFILEC)
501
        -Type $(CFILEC)
502
 
503
SFXFlags:
504
        @Echo "$(CFLAGSC)" "$(CCPUOPTXM)" >$(CFILEX)
505
        @Type "$(CWITHOPT)"              >>$(CFILEX)
506
        -Type $(CFILEX)
507
 
508
# write special MakeSFX flags
509
MakeSFXFlags:
510
        @Echo "$(CFLAGSS) $(CCPUOPTXM) DATA=NEAR NOSHORTINTEGERS" >$(CFILEM)
511
        # not really needed but if someday used:
512
        @Type "$(CWITHOPT)" >>$(CFILEM)
513
        -Type $(CFILEM)
514
 
515
 
516
# special rule for adding Amiga internal version number to amiga.c
517
amiga$(O):
518
        rx > env:VersionDate "say '""'translate(date('E'),'.','/')'""'"
519
        $(CC) WITH=$(CFILEC) LISTFILE=$>$(LISTEXTS) OBJNAME=$@ $*.c
520
        -Delete env:VersionDate
521
 
522
 
523
# needed in amiga/amiga.c
524
# should be set in startup-sequence, but just in case:
525
# (only works with OS 2.04 and above)
526
 
527
env\:WorkBench:
528
        @Execute < < (Workbench_smk.tmp)
529
           FailAt 21
530
           If not exists ENV:Workbench
531
              Version >nil:
532
              SetEnv Workbench $$Workbench
533
           Endif
534
        <
535
 
536
 
537
# #################
538
# ### LOCAL_UNZIP ###
539
# #################
540
#
541
# Read environment variable LOCAL_UNZIP and convert options from old Lattice
542
# v5 to new SAS/C v6 format. You may also use the new DEFINE= syntax but
543
# be sure not to mix v5 and v6 options, otherwise lctosc will be confused.
544
#
545
# e.g.: to define FOO_ONE and FOO_TWO enter:
546
#
547
# SetEnv LOCAL_UNZIP "-DFOO_ONE -DFOO_TWO"
548
#
549
# To make this permanent, i.e. survive an reboot, put the statement into
550
# your startup-sequence or (for AmigaDOS 2.0 or higher only) make sure
551
# LOCAL_UNZIP is stored in the ENVARC: directory too. To do this, simply
552
# copy the file from ENV: to ENVARC:
553
#   Copy ENV:LOCAL_UNZIP ENVARC:
554
#
555
# For a list of all valid non-standard compilation options see the INSTALL
556
# file in the root zip tree. Please read the notes there before using the
557
# non-standard options.
558
#
559
# e.g.: To use the non-standard timezone environment variable "INFOZIP_TZ"
560
#	(or another arbitary name) instead of "TZ", type in your shell:
561
#
562
#	Setenv LOCAL_UNZIP "-DTZ_ENVVAR=*"INFOZIP_TZ*""
563
#
564
# Note that you need to escape the quotes of INFOZIP_TZ with leading stars.
565
# To verify that LOCAL_UNZIP has been saved correctly, use the Getenv command:
566
#
567
#	Getenv LOCAL_UNZIP
568
#
569
# ...should display:
570
#
571
#	-DTZ_ENVVAR="INFOZIP_TZ"
572
#
573
 
574
local_unzip:
575
        @Execute < < (Local_UnZip_smk.tmp)
576
           Failat 21
577
           Echo ""
578
           If exists ENV:LOCAL_UNZIP
579
              Echo "Using environment variable LOCAL_UNZIP !"
580
              Echo "LOCAL_UNZIP: " NOLINE
581
              GetEnv LOCAL_UNZIP
582
              Copy >NIL: ENV:LOCAL_UNZIP SASCOPTS
583
           Else
584
              Echo "You could use envvar LOCAL_UNZIP to set your special compilation options."
585
              Echo "See the makefile for more information (LOCAL_UNZIP section)."
586
              Delete >nil: SASCOPTS quiet
587
           Endif
588
           Echo ""
589
           ; Do not remove the lctosc command! If LOCAL_UNZIP is unset, an
590
           ; empty file is created which needed by CommonFlags !
591
           ; Moreover, lctosc also accepts new v6 options, i.e. only changes
592
           ; known v5 options. Try `lctosc -Dfoo' and `lctosc DEFINE=foo'.
593
           ; However, you *must not* mix v5 and v6 options!
594
           lctosc > $(CWITHOPT)
595
           ; Now make sure that env:sc/scoptions are NOT used
596
           ; we just create an empty file. The options are stored elsewhere.
597
           Echo > SCOPTIONS "" NOLINE
598
        <
599
 
600
 
601
 
602
# Echo request to the user
603
#
604
request:
605
        @Echo ""
606
        @Echo " This makefile is for use with SAS/C version 6.58."
607
        @Echo " If you still have an older version, please upgrade!"
608
        @Echo " Patches are available on the Aminet under biz/patch/sc\#?."
609
        @Echo ""
610
        @Echo " Just a simple request..."
611
        @Echo " Please give me a mail that you compiled whether you encounter any errors"
612
        @Echo " or not. I'd just like to know how many Amiga users actually make use of"
613
        @Echo " this makefile."
614
        @Echo " If you mail me, I'll put you on my mailing-list and notify you whenever"
615
        @Echo " new versions of Info-Zip are released."
616
        @Echo " Have a look at the makefile for changes like CPU type, UtilLib, Stack, etc."
617
        @Echo " Feel free to mail comments, suggestions, critics..."
618
        @Echo " Enjoy Info-Zip !"
619
        @Echo " Haidinger Walter, "
620
        @Echo ""
621
 
622
# Echo help in case of an error
623
#
624
.ONERROR:
625
        @Echo ""
626
        @Echo "[sigh] An error running this makefile was detected."
627
        @Echo "This message may also appear if you interrupted smake by pressing CTRL-C."
628
        @Echo "Contact Info-ZIP authors at Zip-Bugs@lists.wku.edu or me for help."
629
        @Echo "Haidinger Walter, "