home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip532.zip / amiga / smakefile < prev    next >
Makefile  |  1997-04-20  |  20KB  |  571 lines

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