home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip201.zip / amiga / SMakeFile < prev    next >
Makefile  |  1993-09-02  |  6KB  |  181 lines

  1. # Amiga sMakefile for Zip, ZipNote, ZipCloak and ZipSplit
  2. # Updated for SAS/c 6.3  July 1, 1993
  3. #
  4. # NOTE: Optimizer problems under SASC 6.2 have been fixed
  5. #       for SASC 6.3.  If you are using version 6.2, either
  6. #       upgrade (for free), or turn off optimization.
  7. #
  8. # -John Bush, <John.Bush@East.Sun.COM>
  9. #         or: <JBush@Bix.COM>
  10.  
  11. # See the master Makefile under the top level Zip/Unzip source directory
  12. # for more information on compiler macros and flags for this version.
  13.  
  14. #######################
  15. # MACROBE DEFINITIONS #
  16. #######################
  17.  
  18. # Do not set any DEBUG flags  when building production version.
  19. # CDBG = DEBUG=L                   # line table only
  20. # CDBG = DEBUG=S                  # with symbol flush
  21. # CDBG = $(CDBG) DEF=DEBUG       # program debug statements
  22. # LDBG = ADDSYM
  23. # MAP = MAP amiga/ZIP.MAP
  24.  
  25. # Optimizer flags
  26. OPT = OPT OPTTIME OPTINL OPTINLOCAL OPTCOMP=5 OPTDEP=5 OPTRDEP=5
  27.  
  28. # Essential compiler flags.  You can also change CPU=ANY to
  29. # CPU=68020 when selecting the 68020 version of longest_match.
  30. #
  31. CC = sc
  32. CFLAGS = VERBOSE NOSTKCHK NMINC UNSCHAR STRMERGE NOICONS
  33. CFLAGS = $(CFLAGS) DATA=FAR CODE=NEAR MEMSIZE=HUGE CPU=ANY
  34. DEFINES = DEF=NO_MKTEMP DEF=PROTO DEF=ECHOFF_UNNECCESSARY
  35.  
  36. # Define AMIGA_BETA to print "Beta Notice" up front.  See tailor.h.
  37. # Undefine AMIGA_BETA when building a released version.
  38. # DEFINES = $(DEFINES) DEF=AMIGA_BETA
  39.  
  40. # Define MEDIUM_MEM for production release (per Paul Kienitz).
  41. # This reduces runtime memory requirement but not speed or compression.
  42. DEFINES = $(DEFINES) DEF=MEDIUM_MEM
  43.  
  44. # Linker flags
  45. LD = slink
  46. PSTRT = LIB:c.o
  47. LFLGS = LIB LIB:sc.lib+LIB:amiga.lib NOICONS
  48.  
  49. # Temporary filename for namelists (to prevent command line overflow).
  50. TMPF = ram:MakeZip.tmp
  51.  
  52. # ------------------------------------------------------------
  53. # Assembler longest_match selection stuff  (new 7/3/93)
  54. # ------------------------------------------------------------
  55. # Define ASMV to externalize longest_match() in deflate.c.
  56. # Without this, a C language equivalent is compiled within deflate.c,
  57. # and all remaining assmbly selections below become irrelevant.
  58. # If disabling ASMV, be sure to undefine the MATCHOBJ macro too.
  59. #
  60. SELECTASM = DEF=ASMV
  61. DEFINES = $(DEFINES) $(SELECTASM)
  62. MATCHOBJ = match.o
  63.  
  64. # Compiler and flags selections.  Note:  "ATSIGN" is only used
  65. # if match_68.a source is selected (see below), but it's presence
  66. # doesn't alter the compilation of the default code, so leave it.
  67. #
  68. ASM = asm
  69. AFLAGS = -m2 -iINCLUDE: -dAMIGA -dATSIGN
  70.  
  71. # Selecton of longest_match() source filename.
  72. # Can be passed from command line via MATCHSRC=XXXXXX.a
  73. # The GNU gzip version is standard and default.
  74. #
  75. # match.a    -- GNU gzip version (by Carsten Steger).
  76. # match_68.a -- Amiga specific version (by Paul Kienitz)
  77. #
  78. MATCHSRC = match.a
  79.  
  80. # OPTIONS, can be passed from command line via MATCHOPTS=-dXXXXXX
  81. # The default is no system-dependent code that runs on all 68k systems.
  82. #
  83. # For match.a:
  84. #
  85. # -dUNALIGNED_OK -- selects faster 68020 word-based comparisons
  86. #
  87. # For match_68.a:
  88. #
  89. # -dCPUTEST      -- perform CPU model test at runtime.
  90. # -dCPU020       -- force 68020 code generation (override CPUTEST)
  91. #           ** If neither is specified, code is all-68000 compatible.
  92. #
  93. MATCHOPTS = 
  94.  
  95. # ------------------------------------------------------------
  96. # End of longest_match assembler selection stuff
  97. # ------------------------------------------------------------
  98.  
  99. ###############################################
  100. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  101. ###############################################
  102.  
  103. # default C rules
  104. #
  105. .c.o:
  106.       $(CC) $(DEFINES) $(CFLAGS) $(OPT) $(CDBG) OBJNAME=$@ $*.c
  107.  
  108. # Alternate rules for routines compiled with utilities
  109. #
  110. .c.oo:
  111.       $(CC) DEF=UTIL $(DEFINES) $(CFLAGS) $(OPT) $(CDBG) OBJNAME=$*.oo $*.c
  112.  
  113. # object file macro lists
  114. #
  115. HFILES = zip.h ziperr.h tailor.h revision.h crypt.h
  116.  
  117. OBJA = zipfile.o zipup.o fileio.o util.o globals.o crypt.o amiga.o
  118. OBJI = deflate.o trees.o bits.o $(MATCHOBJ)
  119. OBJU = zipfile.oo zipup.oo fileio.oo util.oo globals.o
  120.  
  121. OBJZ = zip.o $(OBJA) $(OBJI)
  122.  
  123. OBJN = zipnote.o  $(OBJU)
  124. OBJC = zipcloak.o $(OBJU) crypt.oo amiga.o
  125. OBJS = zipsplit.o $(OBJU)
  126.  
  127. ZIPS = zip zipnote zipcloak zipsplit 
  128.  
  129. # -----------------------------------------------------------------
  130.  
  131. all:      $(ZIPS)
  132.  
  133. zip: $(OBJZ) $(HFILES)
  134.         -echo "$(OBJZ)" > $(TMPF)
  135.     $(LD) TO Zip      FROM $(PSTRT) WITH $(TMPF) $(LFLGS) $(LDBG) $(MAP)
  136.         
  137. zipnote: $(OBJN) $(HFILES)
  138.         -echo "$(OBJN)" > $(TMPF)
  139.     $(LD) TO ZipNote  FROM $(PSTRT) WITH $(TMPF) $(LFLGS) $(LDBG)
  140.  
  141. zipcloak: $(OBJC) $(HFILES)
  142.         -echo "$(OBJC)" > $(TMPF)
  143.     $(LD) TO ZipCloak FROM $(PSTRT) WITH $(TMPF) $(LFLGS) $(LDBG)
  144.  
  145. zipsplit: $(OBJS) $(HFILES)
  146.         -echo "$(OBJS)" > $(TMPF)
  147.     $(LD) TO ZipSplit FROM $(PSTRT) WITH $(TMPF) $(LFLGS) $(LDBG)
  148.  
  149. clean:
  150.        -delete $(OBJZ) quiet force >nil:
  151.        -delete $(OBJU) quiet force >nil:
  152.        -delete $(OBJA) quiet force >nil:
  153.        -delete $(OBJI) quiet force >nil:
  154.        -delete $(OBJN) quiet force >nil:
  155.        -delete $(OBJC) quiet force >nil:
  156.        -delete $(OBJS) quiet force >nil:
  157.        -delete $(ZIPS) quiet force >nil:
  158.  
  159. zip.o:      zip.c      $(HFILES)
  160. zipup.o:    zipup.c    $(HFILES)
  161. zipnote.o:  zipnote.c  $(HFILES)
  162. zipcloak.o: zipcloak.c $(HFILES)
  163. crypt.o:    crypt.c    $(HFILES)
  164. zipsplit.o: zipsplit.c $(HFILES)
  165. deflate.o:  deflate.c  $(HFILES)
  166. trees.o:    trees.c    $(HFILES)
  167. bits.o:     bits.c     $(HFILES)
  168. zipfile.o:  zipfile.c  $(HFILES)
  169. fileio.o:   fileio.c   $(HFILES)
  170. util.o:     util.c     $(HFILES)
  171. globals.o:  globals.c  $(HFILES)
  172.  
  173. # Amiga specific objects
  174. amiga.o: amiga/amiga.c $(HFILES)
  175.  
  176. # Allow selection of ASM version via MATCHSRC
  177. match.o:    amiga/$(MATCHSRC)
  178.         $(ASM) $(AFLAGS) $(MATCHOPTS) -o$@ amiga/$(MATCHSRC)
  179.  
  180. # end of Makefile
  181.