home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip51.zip / amiga / SMakeFile < prev    next >
Makefile  |  1994-02-06  |  4KB  |  127 lines

  1. #===========================================================================
  2. # Makefile for UnZip, ZipInfo & fUnZip:  AMIGA SAS/C Version 6.x
  3. # Version:  5.1                                                  9 July 1993
  4. #===========================================================================
  5. # John Bush <john.bush@east.sun.com>                last modified:  6 Feb 94
  6. #---------------------------------------------------------------------------
  7.  
  8. #####################
  9. # MACRO DEFINITIONS #
  10. #####################
  11.  
  12. # Compiler and loader debug flags.  Uncomment as needed.  Recomment when done.
  13. # CDBG = DEBUG=L DEF=DEBUG
  14. # LDBG = ADDSYM
  15. # LMAP = MAP AMIGA/UNZIP.MAP
  16.  
  17. # Compiler definitions
  18. #
  19. CC = sc
  20. #
  21. OPT = OPT OPTINL OPTINLOCAL OPTTIME OPTCOMP=5 OPTDEP=5 OPTRDEP=5
  22. #
  23. # Choose one DATAOPTS & SASLIB.  NOTE!  only DATA=FAR is known to work!
  24. #
  25. DATAOPTS = DATA=FAR         # link with SCNB.lib
  26. SASLIB = scnb
  27. # DATAOPTS = DATA=FAR SINT  # link with SCSNB.lib  [not working yet!]
  28. # SASLIB = scsnb
  29. # DATAOPTS = DATA=NEAR      # link with SC.lib
  30. # SASLIB = sc
  31. #
  32. CDEFINES = DEF=AMIGA DEF=PROTO
  33. COPTIONS = $(DATAOPTS) NOSTKCHK STRMERGE CPU=ANY CODE=NEAR NMINC UNSCHAR
  34. COPTIONS = $(COPTIONS) ERRORREXX NOERRORCONSOLE NOICONS
  35. #
  36. CFLAGS = $(CDEFINES) $(COPTIONS) $(CDBG) $(OPT)
  37.  
  38. # Linker definitions
  39. #  See SASLIB definition above
  40. #
  41. LD = slink
  42. LDFLAGS =  FROM LIB:c.o
  43. LDFLAGS2 = NOICONS $(LDBG) $(LMAP)
  44. LIBFLAGS = LIB LIB:$(SASLIB).lib+LIB:amiga.lib
  45.  
  46. # UnZip Objects
  47. #
  48. OBJS1 = unzip.o crypt.o envargs.o explode.o extract.o file_io.o
  49. OBJS2 = inflate.o match.o unreduce.o unshrink.o zipinfo.o
  50. OBJSA = amiga.o
  51. OBJS  = $(OBJS1) $(OBJS2) $(OBJSA)
  52. LOBJS = $(OBJS)
  53.  
  54. # fUnZip Objects
  55. OBJF = funzip.o crypt_f.o inflate_f.o
  56.  
  57. # Output targets
  58. UNZIPS = unzip funzip
  59.  
  60. # Temp filename for object lists to load using linker "WITH" command.
  61. OBJLIST = ram:OBJLIST.TMP
  62.  
  63. #######################################
  64. # DEFAULT TARGET AND PROCESSING RULES #
  65. #######################################
  66.  
  67. all: $(UNZIPS)
  68.  
  69. .c.o :
  70.         $(CC) $(CFLAGS) OBJNAME=$@ $*.c
  71.  
  72.  
  73. #########################
  74. # Final output targets. #
  75. #########################
  76.  
  77. # NOTE:  When generating MAP files, don't make "all" because only the last 
  78. #        map generated will be the one that remains after this is finished.
  79. #        Or, put specific MAP statements in below for each.  
  80.  
  81. unzip:  $(OBJS)
  82.         echo "$(OBJS)" >$(OBJLIST)
  83.         $(LD) TO UnZip $(LDFLAGS) WITH $(OBJLIST) $(LIBFLAGS) $(LDFLAGS2)
  84.  
  85. funzip: $(OBJF)
  86.         echo "$(OBJF)" >$(OBJLIST)
  87.         $(LD) TO fUnZip $(LDFLAGS) WITH $(OBJLIST) $(LIBFLAGS) $(LDFLAGS2)
  88.  
  89. clean:
  90.         -delete >nil: $(OBJS1)
  91.         -delete >nil: $(OBJS2)
  92.         -delete >nil: $(OBJSA)
  93.         -delete >nil: $(OBJF)
  94.  
  95. spotless: clean
  96.         -delete >nil: UnZip FunZip
  97.  
  98. # special rules for crypt binary used in FunZip
  99. #
  100. crypt_f.o:     crypt.c unzip.h zip.h crypt.h
  101.                 $(CC) DEF=FUNZIP $(CFLAGS) OBJNAME=crypt_f.o crypt.c
  102.  
  103. inflate_f.o:   inflate.c inflate.h unzip.h crypt.h
  104.                 $(CC) DEF=FUNZIP $(CFLAGS) OBJNAME=inflate_f.o inflate.c
  105.  
  106. # objects common to all revisions/ports:
  107. #
  108. crypt.o:        crypt.c unzip.h zip.h crypt.h
  109. envargs.o:      envargs.c unzip.h
  110. explode.o:      explode.c unzip.h
  111. extract.o:      extract.c unzip.h crypt.h
  112. file_io.o:      file_io.c unzip.h crypt.h tables.h
  113. funzip.o:       funzip.c unzip.h crypt.h tables.h
  114. inflate.o:      inflate.c inflate.h unzip.h
  115. match.o:        match.c unzip.h
  116. shared.o:       shared.c unzip.h
  117. unreduce.o:     unreduce.c unzip.h
  118. unshrink.o:     unshrink.c unzip.h
  119. unzip.o:        unzip.c unzip.h
  120. zipinfo.o:      zipinfo.c unzip.h
  121.  
  122.  
  123. # objects specific to Amiga
  124. amiga.o:        amiga/amiga.c amiga/amiga.h
  125.  
  126.