GMakefile 4.7 KB

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