Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. # Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (5.53 or later)
  2. # using gcc 2.95.4 (or later).
  3. # You may look at <URL:http://hard-mofo.dsvr.net/gcc/> for an up-to-date
  4. # gcc port.
  5.  
  6. CC   = gcc -mlibscl
  7. BIND = $(CC)
  8. AS   = $(CC) -c
  9. ASM  = as
  10. SQUEEZE = squeeze -v
  11. E    =
  12.  
  13. # flags
  14. #   CFLAGS    flags for C compile
  15. #   LFLAGS1   flags after output file spec, before obj file list
  16. #   LFLAGS2   flags after obj file list (libraries, etc)
  17. #
  18. LIB      =
  19. CFLAGS   = -O2 -mthrowback -DNO_STRNICMP
  20. ASMFLAGS = -throwback -objasm -upper
  21. LFLAGS1  =
  22. LFLAGS2  = $(LIB)
  23.  
  24. # object file lists
  25. OBJS1 = o.unzip o.crc32 o.crypt o.envargs o.explode
  26. OBJS2 = o.extract o.fileio o.globals o.inflate o.list o.match
  27. OBJS3 = o.process o.ttyio o.unreduce o.unshrink o.zipinfo
  28. OBJS  = $(OBJS1) $(OBJS2) $(OBJS3) o.riscos o.swiven o.acorn
  29. OBJF  = o.funzip o.crc32 o.cryptf o.globalsf o.inflatef o.ttyiof \
  30.         o.riscos o.swiven
  31. OBJX  = o.unzipsfx o.crc32  o.crypt_ o.extract_ o.fileio_ o.globals_ \
  32.         o.inflate_ o.match_ o.process_ o.ttyio_ o.acorn_ o.swiven o.riscos_
  33.  
  34. UNZIP_H = h.unzip h.unzpriv h.globals acorn.h.riscos acorn.h.swiven
  35.  
  36. all:      unzip funzip unzipsfx
  37.  
  38.  
  39. install:  unzip funzip unzipsfx
  40.         $(SQUEEZE) unzip %.unzip
  41.         $(SQUEEZE) funzip %.funzip
  42.         $(SQUEEZE) unzipsfx unzipsfx
  43.         copy %.unzip %.zipinfo ~CVF
  44.  
  45. # rules for unzip and funzip
  46. o.crc32:        c.crc32 $(UNZIP_H) h.zip h.crc32
  47.         $(CC) $(CFLAGS) -c c.crc32 -o o.crc32
  48. o.crypt:        c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio
  49.         $(CC) $(CFLAGS) -c c.crypt -o o.crypt
  50. o.envargs:      c.envargs $(UNZIP_H)
  51.         $(CC) $(CFLAGS) -c c.envargs -o o.envargs
  52. o.explode:      c.explode $(UNZIP_H)
  53.         $(CC) $(CFLAGS) -c c.explode -o o.explode
  54. o.extract:      c.extract $(UNZIP_H) h.crc32 h.crypt
  55.         $(CC) $(CFLAGS) -c c.extract -o o.extract
  56. o.fileio:       c.fileio $(UNZIP_H) h.crc32 h.crypt h.ttyio h.ebcdic
  57.         $(CC) $(CFLAGS) -c c.fileio -o o.fileio
  58. o.funzip:       c.funzip $(UNZIP_H) h.crc32 h.crypt h.ttyio
  59.         $(CC) $(CFLAGS) -c c.funzip -o o.funzip
  60. o.globals:      c.globals $(UNZIP_H)
  61.         $(CC) $(CFLAGS) -c c.globals -o o.globals
  62. o.inflate:      c.inflate h.inflate $(UNZIP_H)
  63.         $(CC) $(CFLAGS) -c c.inflate -o o.inflate
  64. o.list:         c.list $(UNZIP_H)
  65.         $(CC) $(CFLAGS) -c c.list -o o.list
  66. o.match:        c.match $(UNZIP_H)
  67.         $(CC) $(CFLAGS) -c c.match -o o.match
  68. o.process:      c.process $(UNZIP_H) h.crc32
  69.         $(CC) $(CFLAGS) -c c.process -o o.process
  70. o.ttyio:        c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio
  71.         $(CC) $(CFLAGS) -c c.ttyio -o o.ttyio
  72. o.unreduce:     c.unreduce $(UNZIP_H)
  73.         $(CC) $(CFLAGS) -c c.unreduce -o o.unreduce
  74. o.unshrink:     c.unshrink $(UNZIP_H)
  75.         $(CC) $(CFLAGS) -c c.unshrink -o o.unshrink
  76. o.unzip:        c.unzip $(UNZIP_H) h.crypt h.unzvers h.consts
  77.         $(CC) $(CFLAGS) -c c.unzip -o o.unzip
  78. o.zipinfo:      c.zipinfo $(UNZIP_H)
  79.         $(CC) $(CFLAGS) -c c.zipinfo -o o.zipinfo
  80.  
  81. o.crypt_:       c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio
  82.         $(CC) $(CFLAGS) -DSFX -c c.crypt -o o.crypt_
  83. o.extract_:     c.extract $(UNZIP_H) h.crc32 h.crypt
  84.         $(CC) $(CFLAGS) -DSFX -c c.extract -o o.extract_
  85. o.fileio_:      c.fileio $(UNZIP_H) h.crc32 h.crypt h.ttyio h.ebcdic
  86.         $(CC) $(CFLAGS) -DSFX -c c.fileio -o o.fileio_
  87. o.globals_:     c.globals $(UNZIP_H)
  88.         $(CC) $(CFLAGS) -DSFX -c c.globals -o o.globals_
  89. o.inflate_:     c.inflate h.inflate $(UNZIP_H) h.crypt
  90.         $(CC) $(CFLAGS) -DSFX -c c.inflate -o o.inflate_
  91. o.match_:       c.match $(UNZIP_H)
  92.         $(CC) $(CFLAGS) -DSFX -c c.match -o o.match_
  93. o.process_:     c.process $(UNZIP_H) h.crc32
  94.         $(CC) $(CFLAGS) -DSFX -c c.process -o o.process_
  95. o.ttyio_:       c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio
  96.         $(CC) $(CFLAGS) -DSFX -c c.ttyio -o o.ttyio_
  97.  
  98. o.unzipsfx:     c.unzip $(UNZIP_H) h.crypt h.unzvers h.consts
  99.         $(CC) $(CFLAGS) -DSFX -c c.unzip -o o.unzipsfx
  100.  
  101. o.cryptf:       c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio
  102.         $(CC) $(CFLAGS) -DFUNZIP -c c.crypt -o o.cryptf
  103. o.globalsf:     c.globals $(UNZIP_H)
  104.         $(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globalsf
  105. o.inflatef:     c.inflate h.inflate $(UNZIP_H) h.crypt
  106.         $(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflatef
  107. o.ttyiof:       c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio
  108.         $(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyiof
  109.  
  110. o.acorn:        acorn.c.acorn $(UNZIP_H)
  111.         $(CC) $(CFLAGS) -I@ -c acorn.c.acorn
  112. o.acorn_:       acorn.c.acorn $(UNZIP_H)
  113.         $(CC) $(CFLAGS) -I@ -c -DSFX -DSFX_EXDIR -o o.acorn_ acorn.c.acorn
  114.  
  115. o.riscos:       acorn.c.riscos $(UNZIP_H)
  116.         $(CC) $(CFLAGS) -I@ -c acorn.c.riscos
  117. o.riscos_:      acorn.c.riscos $(UNZIP_H)
  118.         $(CC) $(CFLAGS) -I@ -c -DSFX -DSFX_EXDIR -o o.riscos_ acorn.c.riscos
  119.  
  120. o.swiven:       acorn.s.swiven
  121.         $(ASM) $(ASMFLAGS) acorn.s.swiven -o o.swiven
  122.  
  123. unzip:    $(OBJS)
  124.           $(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2)
  125. funzip:   $(OBJF)
  126.           $(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2)
  127. unzipsfx: $(OBJX)
  128.           $(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2)
  129.  
  130. clean:
  131.         remove unzip
  132.         remove funzip
  133.         remove zipinfo
  134.         remove unzipsfx
  135.         create o.!fake! 0
  136.         wipe o.* ~cf
  137.  
  138. # end of Makefile
  139.