home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip531.zip / atari / Makefile.old < prev    next >
Makefile  |  1996-02-11  |  6KB  |  192 lines

  1. #==============================================================================
  2. # Makefile for UnZip, UnZipSFX & fUnZip:  Atari ST               Chris Herborth
  3. # Version:  UnZip 5.20+, MiNT, GNU C                           11 February 1996
  4. #==============================================================================
  5.  
  6. # Based on the original unix Makefile and modified by Chris Herborth
  7. # (cherborth@semprini.waterloo-rdp.on.ca), Nov.13/93.
  8.  
  9. # Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful com-
  10. # pilation does not always imply a working program.
  11.  
  12.  
  13. #####################
  14. # MACRO DEFINITIONS #
  15. #####################
  16.  
  17. # Defaults most systems use (use LOCAL_UNZIP in environment to add flags, 
  18. # such as -DDOSWILD).
  19.  
  20. # UnZip flags
  21. # NOTE: 'cgcc' is my cross-compiler; you'll probably use 'gcc' instead.
  22. CC = cgcc
  23. LD = cgcc
  24. LOC = $(LOCAL_UNZIP) -ansi -D__MINT__ -U__STRICT_ANSI__
  25.  
  26. CF = -mbaserel -mpcrel -O2 -fomit-frame-pointer -I. $(LOC)
  27. # CF = -O -I. $(LOC)
  28. # CF = -mbaserel -O -I. $(LOC)
  29. LF = -mbaserel -mpcrel -o unzip.ttp
  30. LF2 = -s -lbiio
  31.  
  32. # UnZipSFX flags
  33. XC = -DSFX
  34. XL = -mbaserel -mpcrel -o unzipsfx.ttp
  35. XL2 = $(LF2)
  36.  
  37. # fUnZip flags
  38. FC = -DFUNZIP
  39. FL = -mbaserel -mpcrel -o funzip.ttp
  40. FL2 = $(LF2)
  41.  
  42. # general-purpose stuff
  43. CP = cp
  44. LN = ln -s
  45. RM = rm -f
  46. E = .ttp
  47. O = .o
  48. M = atari
  49. SHELL = /bin/sh
  50.  
  51. # object files
  52. OBJS1 = unzip$O crc32$O crctab$O crypt$O envargs$O explode$O
  53. OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O
  54. OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O
  55. OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O
  56. LOBJS = $(OBJS)
  57. OBJX = unzipsfx$O crc32$O crctab$O crypt$O extract_$O fileio$O globals$O \
  58.     inflate$O match$O process_$O ttyio$O $M_$O
  59. OBJF = funzip$O crc32$O crypt_$O globals_$O inflate_$O ttyio_$O
  60.  
  61. UNZIP_H = unzip.h unzpriv.h globals.h
  62.  
  63. # installation
  64. INSTALL = cp#    probably can change this to 'install' if you have it
  65. # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate
  66. manext = 1
  67. MANDIR = /usr/local/man/man$(manext)#    where to install man pages
  68. BINDIR = /usr/local/bin#        where to install executables
  69. #
  70. UNZIPS = unzip$E funzip$E unzipsfx$E zipinfo$E
  71. MANS = unzip.$(manext) unzipsfx.$(manext) zipinfo.$(manext) funzip.$(manext)
  72. DOCS = unzip.doc unzipsfx.doc zipinfo.doc funzip.doc
  73. # this is a little ugly...
  74. INSTALLED = $(BINDIR)/unzip$E $(BINDIR)/zipinfo$E $(BINDIR)/funzip$E \
  75.     $(BINDIR)/unzipsfx$E $(MANDIR)/unzipsfx.$(manext) \
  76.     $(MANDIR)/unzip.$(manext) $(MANDIR)/zipinfo.$(manext) \
  77.     $(MANDIR)/funzip.$(manext)
  78.  
  79. ###############################################
  80. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  81. ###############################################
  82.  
  83. .c$O:
  84.     $(CC) -c $(CF) $*.c
  85.  
  86.  
  87. all:        unzips
  88. unzips:        $(UNZIPS)
  89. docs:        $(DOCS)
  90. unzipsman:    unzips docs
  91. unzipsdocs:    unzips docs
  92.  
  93.  
  94. clean:
  95.     rm -f $(OBJS) $(OBJF) $(OBJX) $(UNZIPS)
  96.  
  97. install:    $(UNZIPS) $(MANS)
  98.     $(INSTALL) $(UNZIPS) $(BINDIR)
  99.     $(LN) $(BINDIR)/unzip$E $(BINDIR)/zipinfo$E
  100.     $(INSTALL) unix/unzip.1 $(MANDIR)/unzip.$(manext)
  101.     $(INSTALL) unix/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)
  102.     $(INSTALL) unix/zipinfo.1 $(MANDIR)/zipinfo.$(manext)
  103.     $(INSTALL) unix/funzip.1 $(MANDIR)/funzip.$(manext)
  104.  
  105. # alternatively, could use zip method:  -cd $(BINDIR); rm -f $(UNZIPS)  [etc.]
  106. uninstall:
  107.     rm -f $(INSTALLED)
  108.  
  109.  
  110. unzip$E:    $(OBJS)            # add `&' if parallel makes supported
  111.     $(LD) $(LF) $(LOBJS) $(LF2)
  112.  
  113. unzipsfx$E:    $(OBJX)            # add `&' if parallel makes supported
  114.     $(LD) $(XL) $(OBJX) $(XL2)
  115.  
  116. funzip$E:    $(OBJF)            # add `&' if parallel makes supported
  117.     $(LD) $(FL) $(OBJF) $(FL2)
  118.  
  119. zipinfo$E:    unzip$E
  120.     @echo\
  121.  '  This is a Unix-inspired target.  If your filesystem does not support'
  122.     @echo\
  123.  '  symbolic links, copy unzip.ttp to zipinfo.ttp rather than linking it,'
  124.     @echo\
  125.  '  or else invoke as "unzip -Z".'
  126.     $(LN) unzip$E zipinfo$E
  127.  
  128.  
  129. crc32$O:    crc32.c $(UNZIP_H) zip.h
  130. crctab$O:    crctab.c $(UNZIP_H) zip.h
  131. crypt$O:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
  132. envargs$O:    envargs.c $(UNZIP_H)
  133. explode$O:    explode.c $(UNZIP_H)
  134. extract$O:    extract.c $(UNZIP_H) crypt.h
  135. fileio$O:    fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  136. funzip$O:    funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
  137. globals$O:    globals.c $(UNZIP_H)
  138. inflate$O:    inflate.c inflate.h $(UNZIP_H)
  139. list$O:        list.c $(UNZIP_H)
  140. match$O:    match.c $(UNZIP_H)
  141. process$O:    process.c $(UNZIP_H)
  142. ttyio$O:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  143. unreduce$O:    unreduce.c $(UNZIP_H)
  144. unshrink$O:    unshrink.c $(UNZIP_H)
  145. unzip$O:    unzip.c $(UNZIP_H) crypt.h version.h consts.h
  146. zipinfo$O:    zipinfo.c $(UNZIP_H)
  147.  
  148. crypt_$O:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  149.     $(CP) crypt.c crypt_.c
  150.     $(CC) -c $(CF) $(FC) crypt_.c
  151.     $(RM) crypt_.c
  152.  
  153. globals_$O:    globals.c $(UNZIP_H)
  154.     $(CP) globals.c globals_.c
  155.     $(CC) -c $(CF) $(FC) globals_.c
  156.     $(RM) globals_.c
  157.  
  158. inflate_$O:    inflate.c inflate.h $(UNZIP_H) crypt.h    # funzip only
  159.     $(CP) inflate.c inflate_.c
  160.     $(CC) -c $(CF) $(FC) inflate_.c
  161.     $(RM) inflate_.c
  162.  
  163. ttyio_$O:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  164.     $(CP) ttyio.c ttyio_.c
  165.     $(CC) -c $(CF) $(FC) ttyio_.c
  166.     $(RM) ttyio_.c
  167.  
  168. unzipsfx$O:    unzip.c $(UNZIP_H) crypt.h version.h consts.h    # unzipsfx only
  169.     $(CP) unzip.c unzip_.c
  170.     $(CC) -c $(CF) $(XC) unzip_.c
  171.     $(RM) unzip_.c
  172.  
  173. extract_$O:    extract.c $(UNZIP_H) crypt.h        # unzipsfx only
  174.     $(CP) extract.c extract_.c
  175.     $(CC) -c $(CF) $(XC) extract_.c
  176.     $(RM) extract_.c
  177.  
  178. process_$O:    process.c $(UNZIP_H)            # unzipsfx only
  179.     $(CP) process.c process_.c
  180.     $(CC) -c $(CF) $(XC) process_.c
  181.     $(RM) process_.c
  182.  
  183. # atari$O:    atari/atari.c $(UNZIP_H)        # Atari only
  184. #    $(CC) -c $(CF) atari/atari.c
  185.  
  186. atari$O:    atari.c $(UNZIP_H)
  187.  
  188. atari_$O:    atari.c $(UNZIP_H)            # unzipsfx only
  189.     $(CP) atari.c atari_.c
  190.     $(CC) -c $(CF) $(XC) atari_.c
  191.     $(RM) atari_.c
  192.