home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip512.zip / atari / Makefile < prev    next >
Makefile  |  1994-07-14  |  5KB  |  169 lines

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