zlibd32.mak 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Makefile for zlib
  2. # For use with Delphi and C++ Builder under Win32
  3. # Updated for zlib 1.2.x by Cosmin Truta
  4. # ------------ Borland C++ ------------
  5. # This project uses the Delphi (fastcall/register) calling convention:
  6. LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
  7. CC = bcc32
  8. LD = bcc32
  9. AR = tlib
  10. # do not use "-pr" in CFLAGS
  11. CFLAGS = -a -d -k- -O2 $(LOC)
  12. LDFLAGS =
  13. # variables
  14. ZLIB_LIB = zlib.lib
  15. OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
  16. OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
  17. OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
  18. OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
  19. # targets
  20. all: $(ZLIB_LIB) example.exe minigzip.exe
  21. .c.obj:
  22. $(CC) -c $(CFLAGS) $*.c
  23. adler32.obj: adler32.c zlib.h zconf.h
  24. compress.obj: compress.c zlib.h zconf.h
  25. crc32.obj: crc32.c zlib.h zconf.h crc32.h
  26. deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
  27. gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
  28. gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
  29. gzread.obj: gzread.c zlib.h zconf.h gzguts.h
  30. gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
  31. infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  32. inffast.h inffixed.h
  33. inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  34. inffast.h
  35. inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  36. inffast.h inffixed.h
  37. inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
  38. trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
  39. uncompr.obj: uncompr.c zlib.h zconf.h
  40. zutil.obj: zutil.c zutil.h zlib.h zconf.h
  41. example.obj: test/example.c zlib.h zconf.h
  42. minigzip.obj: test/minigzip.c zlib.h zconf.h
  43. # For the sake of the old Borland make,
  44. # the command line is cut to fit in the MS-DOS 128 byte limit:
  45. $(ZLIB_LIB): $(OBJ1) $(OBJ2)
  46. -del $(ZLIB_LIB)
  47. $(AR) $(ZLIB_LIB) $(OBJP1)
  48. $(AR) $(ZLIB_LIB) $(OBJP2)
  49. # testing
  50. test: example.exe minigzip.exe
  51. example
  52. echo hello world | minigzip | minigzip -d
  53. example.exe: example.obj $(ZLIB_LIB)
  54. $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
  55. minigzip.exe: minigzip.obj $(ZLIB_LIB)
  56. $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
  57. # cleanup
  58. clean:
  59. -del *.obj
  60. -del *.exe
  61. -del *.lib
  62. -del *.tds
  63. -del zlib.bak
  64. -del foo.gz