Makefile.gcc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. # Makefile for UnZip, fUnZip and UnZipSFX for native Win32-Intel ports of gcc.
  2. # Currently supported implementations: Cygnus/Win32 and MinGW32.
  3. #
  4. # First version: Cosmin Truta, Dec 1997.
  5. # Last revision: Christian Spieler, 09-Aug-2008.
  6. #
  7. # To use, do "make -f win32/makefile.gcc".
  8. # configuration switches supported:
  9. # NOASM=1 disable assembler crc32 code, the generic C source code
  10. # is used instead.
  11. # NOCRC_OPT=1 disable "unfolding CRC tables" optimization.
  12. # OPT_P6=1 add "modern gcc" tuning option for PentiumPro family CPU.
  13. # USEBZ2=1 activate integrated compilation of bzip2 compression support,
  14. # this requires the bzip2 sources present in the bzip2 subfolder.
  15. # USEZLIB=1 replace internal deflate code by externally provided zlib.
  16. # USE_POSIX=1 build posix-style binaries targeted for the CygWin unix
  17. # emulation environment.
  18. ### Optional section
  19. # The following options allow to override the default assembler code usage
  20. ifdef NOASM
  21. APPLY_ASMCRC=0
  22. endif
  23. ifdef USEASM
  24. APPLY_ASMCRC=1
  25. endif
  26. # The external zlib library supplies its own crc32 implementation...
  27. ifdef USEZLIB
  28. APPLY_ASMCRC=0
  29. endif
  30. # default is ASM CRC code (from .S source) for now...
  31. ifndef APPLY_ASMCRC
  32. APPLY_ASMCRC=1
  33. endif
  34. # optional inclusion of bzip2 decompression
  35. IZ_BZIP2 = bzip2
  36. ifdef USEBZ2
  37. INC_BZ2LIB = -I$(IZ_BZIP2)
  38. LOCFLAGS = $(INC_BZ2LIB) -DUSE_BZIP2
  39. LD_BZ2LIB = -L$(IZ_BZIP2) -lbz2
  40. LIBBZIP2 = $(IZ_BZIP2)/libbz2.a
  41. else
  42. INC_BZ2LIB =
  43. LOCFLAGS =
  44. LD_BZ2LIB =
  45. LIBBZIP2 =
  46. endif
  47. LIBBZIP2X = $(LIBBZIP2)
  48. ifndef USEZLIB
  49. # Apply the "CRC unfolding tables" optimization unless explicitly disabled.
  50. # (This optimization might have negative effects on old CPU designs with a
  51. # small first-level data cache.)
  52. ifndef NOCRC_OPT
  53. LOCFLAGS += -DIZ_CRCOPTIM_UNFOLDTBL
  54. endif
  55. # Optional nonstandard preprocessor flags (as -DUSE_ZLIB or -DUSE_SMITH_CODE)
  56. # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
  57. # to the declaration of LOCFLAGS here:
  58. ifneq ($(APPLY_ASMCRC),0)
  59. LOCFLAGS += -DASM_CRC
  60. endif
  61. else # ifndef USEZLIB
  62. LOCFLAGS += -DUSE_ZLIB
  63. endif # ifndef USEZLIB ... else ...
  64. # Finally, append additional externally supplied options.
  65. LOCFLAGS += $(LOCAL_UNZIP)
  66. # Some gcc distributions for Win32 (e.g. CygWin) try to emulate a POSIX-
  67. # compatible (Unix-style) environment. This Makefile defaults to a
  68. # "native Win32" build. To build POSIX-mode binaries, it is recommended
  69. # to use the Makefile of the Unix port. However, by defining the variable
  70. # "USE_POSIX", building binaries for the POSIX environment can be enabled
  71. # here as well.
  72. ifdef USE_POSIX
  73. CC_ENVIR_OPT = -DUNIX -DFORCE_UNIX_OVER_WIN32
  74. else
  75. CC_ENVIR_OPT = -DWIN32 -DFORCE_WIN32_OVER_UNIX
  76. endif
  77. ### Compiler-specific section
  78. # ------------ GNU C ------------
  79. CC = gcc
  80. #AS = as
  81. AS = $(CC)
  82. #LD = ld
  83. LD = $(CC)
  84. AR = ar
  85. RC = windres
  86. # Quiet
  87. CC_QUIET_OPT =
  88. AS_QUIET_OPT = $(CC_QUIET_OPT)
  89. LD_QUIET_OPT = $(CC_QUIET_OPT)
  90. # Warnings
  91. CC_WARN_OPT = -Wall
  92. AS_WARN_OPT = $(CC_WARN_OPT)
  93. LD_WARN_OPT =
  94. # Debug version
  95. CC_DEBUG_OPT = -g
  96. AS_DEBUG_OPT = $(CC_DEBUG_OPT)
  97. LD_DEBUG_OPT = $(CC_DEBUG_OPT)
  98. # Release version
  99. CC_RELEASE_OPT =
  100. AS_RELEASE_OPT =
  101. LD_RELEASE_OPT = -s
  102. # Prefered target CPU (instruction scheduling optimized for...)
  103. ifndef CC_CPU_OPT
  104. CC_CPU_OPT = -mcpu=pentiumpro
  105. endif
  106. # Smallest code (-Os is new since EGC 1.1, use -O1 for 2.8.1 and earlier)
  107. CC_SIZE_OPT = -Os $(CC_CPU_OPT)
  108. # Fastest code
  109. CC_SPEED_OPT = -O2 $(CC_CPU_OPT)
  110. # Output object file name
  111. CC_OUT_OPT = -o
  112. # Other specific options
  113. CC_SPECIFIC_OPT = -c $(CC_ENVIR_OPT)
  114. AS_SPECIFIC_OPT = -c
  115. LD_SPECIFIC_OPT = -o $@
  116. # Libraries for the debug & release version
  117. # (GCC 2.95 and newer does not require the system library specifications)
  118. ifdef USEZLIB
  119. LD_RELEASE_LIBS = -L. -lz -luser32 -ladvapi32
  120. else
  121. LD_RELEASE_LIBS = -luser32 -ladvapi32
  122. endif
  123. LD_DEBUG_LIBS = $(LD_RELEASE_LIBS)
  124. ### System-specific section
  125. # Suffixes
  126. OBJ = .o
  127. EXE = .exe
  128. .SUFFIXES: .c .S $(OBJ) $(EXE)
  129. .PHONY: FORCE
  130. # Commands
  131. RM = rm -f
  132. ### General section
  133. CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS) \
  134. $(CC_OUT_OPT) $@
  135. ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS)
  136. LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT)
  137. # To build with debug info, use 'make DEBUG=1'.
  138. ifdef DEBUG
  139. CVER = $(CC_DEBUG_OPT)
  140. ASVER = $(AS_DEBUG_OPT)
  141. LDVER = $(LD_DEBUG_OPT)
  142. GENFLAGS =
  143. FFLAGS = -DFUNZIP
  144. SFXFLAGS = -DSFX
  145. GENDLLFL = -DDLL -DWINDLL
  146. GENGUILB = -DSFX -DDLL -DWINDLL -DUNZIPLIB
  147. GENGUISX = -DSFX
  148. GENLIBFL = -DDLL -DWINDLL -DUNZIPLIB
  149. LDLIBS = $(LD_DEBUG_LIBS)
  150. else
  151. CVER = $(CC_RELEASE_OPT)
  152. ASVER = $(AS_RELEASE_OPT)
  153. LDVER = $(LD_RELEASE_OPT)
  154. GENFLAGS = $(CC_SPEED_OPT)
  155. FFLAGS = $(CC_SPEED_OPT) -DFUNZIP
  156. SFXFLAGS = $(CC_SIZE_OPT) -DSFX
  157. GENDLLFL = $(CC_SPEED_OPT) -DDLL -DWINDLL
  158. GENGUILB = $(CC_SIZE_OPT) -DSFX -DDLL -DWINDLL -DUNZIPLIB
  159. GENGUISX = $(CC_SIZE_OPT) -DSFX
  160. GENLIBFL = $(CC_SPEED_OPT) -DDLL -DWINDLL -DUNZIPLIB
  161. LDLIBS = $(LD_RELEASE_LIBS)
  162. endif
  163. GUILDFLAG=-mwindows
  164. # Object files
  165. ifneq ($(APPLY_ASMCRC),0)
  166. OBJA = crc_i386$(OBJ)
  167. else
  168. OBJA =
  169. endif
  170. OBJU1 = unzip$(OBJ) crc32$(OBJ) crypt$(OBJ) envargs$(OBJ)
  171. OBJU2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ)
  172. OBJU3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) ubz2err$(OBJ)
  173. OBJU4 = unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ)
  174. OBJUS = win32$(OBJ) win32i64$(OBJ) nt$(OBJ) winapprc$(OBJ)
  175. OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJU4) $(OBJA) $(OBJUS)
  176. OBJX1 = unzipsfx$(OBJ) crc32x$(OBJ) cryptx$(OBJ) extractx$(OBJ)
  177. OBJX2 = fileiox$(OBJ) globalsx$(OBJ) inflatex$(OBJ) matchx$(OBJ) processx$(OBJ)
  178. OBJX3 = ttyiox$(OBJ) ubz2errx$(OBJ)
  179. OBJXS = win32x$(OBJ) win32i64x$(OBJ) ntx$(OBJ)
  180. OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJA) $(OBJXS)
  181. OBJF1 = funzip$(OBJ) crc32$(OBJ) cryptf$(OBJ) globalsf$(OBJ) inflatef$(OBJ)
  182. OBJF2 = ttyiof$(OBJ)
  183. OBJFS = win32f$(OBJ) win32i64f$(OBJ)
  184. OBJF = $(OBJF1) $(OBJF2) $(OBJA) $(OBJFS)
  185. OBJDLL = windll$(OBJ) windllrc$(OBJ) api$(OBJ)
  186. OBJD1 = crc32l$(OBJ) cryptl$(OBJ)
  187. OBJD2 = explodel$(OBJ) extractl$(OBJ) fileiol$(OBJ) globalsl$(OBJ)
  188. OBJD3 = inflatel$(OBJ) listl$(OBJ) matchl$(OBJ) processl$(OBJ) ubz2errl$(OBJ)
  189. OBJD4 = unreducl$(OBJ) unshrnkl$(OBJ) zipinfol$(OBJ)
  190. OBJDS = win32l$(OBJ) win32i64l$(OBJ) ntl$(OBJ)
  191. OBJD = $(OBJDLL) $(OBJD1) $(OBJD2) $(OBJD3) $(OBJD4) $(OBJA) $(OBJDS)
  192. OBLX1 = apig$(OBJ) crc32g$(OBJ) cryptg$(OBJ)
  193. OBLX2 = extractg$(OBJ) fileiog$(OBJ) globalsg$(OBJ) inflateg$(OBJ)
  194. OBLX3 = matchg$(OBJ) processg$(OBJ) ubz2errg$(OBJ)
  195. OBLXS = win32g$(OBJ) win32i64g$(OBJ) ntg$(OBJ) windllg$(OBJ)
  196. OBLX = $(OBLX1) $(OBLX2) $(OBLX3) $(OBJA) $(OBLXS)
  197. OBGX = sfxwiz$(OBJ) sfxwizrc$(OBJ)
  198. OBJLIB = windllb$(OBJ) apib$(OBJ)
  199. OBJB1 = crc32b$(OBJ) cryptb$(OBJ)
  200. OBJB2 = explodeb$(OBJ) extractb$(OBJ) fileiob$(OBJ) globalsb$(OBJ)
  201. OBJB3 = inflateb$(OBJ) listb$(OBJ) matchb$(OBJ) processb$(OBJ) ubz2errb$(OBJ)
  202. OBJB4 = unreducb$(OBJ) unshrnkb$(OBJ) zipinfob$(OBJ)
  203. OBJBS = win32b$(OBJ) win32i64b$(OBJ) ntb$(OBJ)
  204. OBJB = $(OBJLIB) $(OBJB1) $(OBJB2) $(OBJB3) $(OBJB4) $(OBJA) $(OBJBS)
  205. UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
  206. WINDLL_H = windll/windll.h windll/structs.h windll/decs.h
  207. DLLDEF = windll/windllgcc.def
  208. WINDLL_IMP_H = windll/decs.h windll/structs.h
  209. # Default target is all the executables
  210. unzips: unzip$(EXE) funzip$(EXE) unzipsfx$(EXE)
  211. dll: unzip32.dll
  212. dllsample: uzexampl$(EXE)
  213. guisfx: SFXWiz32$(EXE)
  214. lib: libunzip32.a
  215. all: unzips dll dllsample guisfx lib
  216. unzip$(EXE): $(OBJU) $(LIBBZIP2)
  217. $(LD) $(LDFLAGS) $(LDVER) $(OBJU) $(LD_BZ2LIB) $(LDLIBS)
  218. unzipsfx$(EXE): $(OBJX) $(LIBBZIP2X)
  219. $(LD) $(LDFLAGS) $(LDVER) $(OBJX) $(LDLIBS)
  220. funzip$(EXE): $(OBJF)
  221. $(LD) $(LDFLAGS) $(LDVER) $(OBJF) $(LDLIBS)
  222. unzip32.dll: $(DLLDEF) $(OBJD) $(LIBBZIP2)
  223. dllwrap --driver-name $(CC) --def $(DLLDEF) $(LDFLAGS) $(LDVER) $(OBJD) $(LD_BZ2LIB) $(LDLIBS)
  224. libunzsfx32.a: $(OBLX)
  225. $(AR) -rus $@ $(OBLX)
  226. SFXWiz32$(EXE): $(OBGX) libunzsfx32.a $(LIBBZIP2X)
  227. $(LD) $(GUILDFLAG) $(LDFLAGS) $(LDVER) $(OBGX) -L. -lunzsfx32 $(LDLIBS)
  228. uzexampl$(EXE): uzexampl$(OBJ)
  229. $(CC) $(LDFLAGS) $(LDVER) uzexampl$(OBJ) -lversion $(LDLIBS)
  230. libunzip32.a: $(OBJB)
  231. $(AR) -rus $@ $(OBJB)
  232. # create/update the library for the optional bzip2 support:
  233. $(IZ_BZIP2)/libbz2.a: FORCE
  234. $(subst /,\,$(MAKE)) -C $(IZ_BZIP2) -f Makebz2.iz CC="$(CC)" RM="$(RM)"
  235. FORCE:
  236. # How to compile sources
  237. .c$(OBJ):
  238. $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
  239. .S$(OBJ):
  240. $(AS) $(ASFLAGS) $(ASVER) $(GENFLAGS) $<
  241. # Dependencies
  242. crc32$(OBJ): crc32.c $(UNZIP_H) zip.h crc32.h
  243. crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  244. envargs$(OBJ): envargs.c $(UNZIP_H)
  245. explode$(OBJ): explode.c $(UNZIP_H)
  246. extract$(OBJ): extract.c $(UNZIP_H) crc32.h crypt.h
  247. fileio$(OBJ): fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
  248. funzip$(OBJ): funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h
  249. globals$(OBJ): globals.c $(UNZIP_H)
  250. inflate$(OBJ): inflate.c inflate.h $(UNZIP_H)
  251. list$(OBJ): list.c $(UNZIP_H)
  252. match$(OBJ): match.c $(UNZIP_H)
  253. process$(OBJ): process.c $(UNZIP_H) crc32.h
  254. ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  255. ubz2err$(OBJ): ubz2err.c $(UNZIP_H)
  256. unreduce$(OBJ): unreduce.c $(UNZIP_H)
  257. unshrink$(OBJ): unshrink.c $(UNZIP_H)
  258. unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
  259. zipinfo$(OBJ): zipinfo.c $(UNZIP_H)
  260. crc_i386$(OBJ): crc_i386.S
  261. win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
  262. $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. $<
  263. win32i64$(OBJ): win32/win32i64.c $(UNZIP_H)
  264. $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. $<
  265. nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h
  266. $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. $<
  267. winapprc$(OBJ): win32/winapp.rc unzvers.h
  268. - $(RC) -o $@ $<
  269. # UnZipSFX compilation section
  270. crc32x$(OBJ): crc32.c $(UNZIP_H) zip.h crc32.h
  271. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  272. cryptx$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  273. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  274. extractx$(OBJ): extract.c $(UNZIP_H) crc32.h crypt.h
  275. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  276. fileiox$(OBJ): fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
  277. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  278. globalsx$(OBJ): globals.c $(UNZIP_H)
  279. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  280. inflatex$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h
  281. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  282. matchx$(OBJ): match.c $(UNZIP_H)
  283. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  284. processx$(OBJ): process.c $(UNZIP_H) crc32.h
  285. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  286. ttyiox$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  287. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  288. ubz2errx$(OBJ): ubz2err.c $(UNZIP_H)
  289. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  290. unzipsfx$(OBJ): unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h
  291. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) $<
  292. win32x$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
  293. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. $<
  294. win32i64x$(OBJ): win32/win32i64.c $(UNZIP_H)
  295. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. $<
  296. ntx$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h
  297. $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. $<
  298. # fUnZip compilation section
  299. cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  300. $(CC) $(CFLAGS) $(CVER) $(FFLAGS) $<
  301. globalsf$(OBJ): globals.c $(UNZIP_H)
  302. $(CC) $(CFLAGS) $(CVER) $(FFLAGS) $<
  303. inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h
  304. $(CC) $(CFLAGS) $(CVER) $(FFLAGS) $<
  305. ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  306. $(CC) $(CFLAGS) $(CVER) $(FFLAGS) $<
  307. win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
  308. $(CC) $(CFLAGS) $(CVER) $(FFLAGS) -I. $<
  309. win32i64f$(OBJ): win32/win32i64.c $(UNZIP_H)
  310. $(CC) $(CFLAGS) $(CVER) $(FFLAGS) -I. $<
  311. # WINDLL sample
  312. uzexampl$(OBJ): windll/uzexampl.c windll/uzexampl.h
  313. $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. $<
  314. # DLL compilation section
  315. api$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) unzvers.h
  316. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  317. crc32l$(OBJ): crc32.c $(UNZIP_H) zip.h crc32.h
  318. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  319. cryptl$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  320. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  321. explodel$(OBJ): explode.c $(UNZIP_H)
  322. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  323. extractl$(OBJ): extract.c $(UNZIP_H) $(WINDLL_H) crc32.h crypt.h
  324. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  325. fileiol$(OBJ): fileio.c $(UNZIP_H) $(WINDLL_H) crc32.h crypt.h ttyio.h ebcdic.h
  326. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  327. globalsl$(OBJ): globals.c $(UNZIP_H)
  328. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  329. inflatel$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h
  330. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  331. listl$(OBJ): list.c $(UNZIP_H) $(WINDLL_H)
  332. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  333. matchl$(OBJ): match.c $(UNZIP_H)
  334. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  335. processl$(OBJ): process.c $(UNZIP_H) $(WINDLL_H) crc32.h
  336. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  337. ubz2errl$(OBJ): ubz2err.c $(UNZIP_H)
  338. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  339. unreducl$(OBJ): unreduce.c $(UNZIP_H)
  340. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  341. unshrnkl$(OBJ): unshrink.c $(UNZIP_H)
  342. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  343. zipinfol$(OBJ): zipinfo.c $(UNZIP_H)
  344. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) $<
  345. win32l$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
  346. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. $<
  347. win32i64l$(OBJ): win32/win32i64.c $(UNZIP_H)
  348. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. $<
  349. ntl$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h
  350. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. $<
  351. windll$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h unzvers.h consts.h
  352. $(CC) $(CFLAGS) $(CVER) $(GENDLLFL) -I. $<
  353. windllrc$(OBJ): windll/windll.rc unzvers.h
  354. - $(RC) -o $@ $<
  355. # SFX Lib compilation section
  356. apig$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) unzvers.h
  357. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  358. crc32g$(OBJ): crc32.c $(UNZIP_H) zip.h crc32.h
  359. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  360. cryptg$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  361. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  362. extractg$(OBJ): extract.c $(UNZIP_H) $(WINDLL_H) crc32.h crypt.h
  363. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  364. fileiog$(OBJ): fileio.c $(UNZIP_H) $(WINDLL_H) crc32.h crypt.h ttyio.h ebcdic.h
  365. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  366. globalsg$(OBJ): globals.c $(UNZIP_H)
  367. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  368. inflateg$(OBJ): inflate.c inflate.h $(UNZIP_H)
  369. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  370. matchg$(OBJ): match.c $(UNZIP_H)
  371. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  372. processg$(OBJ): process.c $(UNZIP_H) $(WINDLL_H) crc32.h
  373. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  374. ubz2errg$(OBJ): ubz2err.c $(UNZIP_H)
  375. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) $<
  376. win32g$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
  377. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) -I. $<
  378. win32i64g$(OBJ): win32/win32i64.c $(UNZIP_H)
  379. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) -I. $<
  380. ntg$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h
  381. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) -I. $<
  382. windllg$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h unzvers.h consts.h
  383. $(CC) $(CFLAGS) $(CVER) $(GENGUILB) -I. $<
  384. sfxwiz$(OBJ): windll/guisfx/sfxwiz.c windll/guisfx/dialog.h $(WINDLL_IMP_H)
  385. $(CC) $(CFLAGS) $(CVER) $(GENGUISX) -I. $<
  386. sfxwizrc$(OBJ): windll/guisfx/sfxwiz.rc
  387. - $(RC) --include-dir windll/guisfx --define WIN32 -o$@ $<
  388. # Static LIB compilation section
  389. apib$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) unzvers.h
  390. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  391. crc32b$(OBJ): crc32.c $(UNZIP_H) zip.h crc32.h
  392. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  393. cryptb$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h
  394. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  395. explodeb$(OBJ): explode.c $(UNZIP_H)
  396. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  397. extractb$(OBJ): extract.c $(UNZIP_H) crc32.h crypt.h
  398. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  399. fileiob$(OBJ): fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h
  400. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  401. globalsb$(OBJ): globals.c $(UNZIP_H)
  402. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  403. inflateb$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h
  404. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  405. listb$(OBJ): list.c $(UNZIP_H) $(WINDLL_H)
  406. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  407. matchb$(OBJ): match.c $(UNZIP_H)
  408. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  409. processb$(OBJ): process.c $(UNZIP_H) crc32.h
  410. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  411. ubz2errb$(OBJ): ubz2err.c $(UNZIP_H)
  412. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  413. unreducb$(OBJ): unreduce.c $(UNZIP_H)
  414. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  415. unshrnkb$(OBJ): unshrink.c $(UNZIP_H)
  416. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  417. zipinfob$(OBJ): zipinfo.c $(UNZIP_H)
  418. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) $<
  419. win32b$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
  420. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. $<
  421. win32i64b$(OBJ): win32/win32i64.c $(UNZIP_H)
  422. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. $<
  423. ntb$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h
  424. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. $<
  425. windllb$(OBJ): windll/windll.c $(UNZIP_H) $(WINDLL_H) crypt.h unzvers.h consts.h
  426. $(CC) $(CFLAGS) $(CVER) $(GENLIBFL) -I. $<
  427. clean:
  428. -$(subst /,\,$(MAKE)) -C $(IZ_BZIP2) -f Makebz2.iz RM="$(RM)" clean
  429. -$(RM) *$(OBJ)
  430. -$(RM) unzip$(EXE) funzip$(EXE) unzipsfx$(EXE)
  431. -$(RM) unzip32.dll uzexampl$(EXE) SFXWiz32$(EXE)
  432. -$(RM) libunzip32.a libunzsfx32.a