Makefile.bor 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Makefile for zlib
  2. # Borland C++ for Win32
  3. #
  4. # Usage:
  5. # make -f win32/Makefile.bor
  6. # ------------ Borland C++ ------------
  7. # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
  8. # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
  9. # added to the declaration of LOC here:
  10. LOC = $(LOCAL_ZLIB)
  11. CC = bcc32
  12. AS = bcc32
  13. LD = bcc32
  14. AR = tlib
  15. CFLAGS = -a -d -k- -O2 $(LOC)
  16. ASFLAGS = $(LOC)
  17. LDFLAGS = $(LOC)
  18. # variables
  19. ZLIB_LIB = zlib.lib
  20. OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
  21. OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
  22. #OBJA =
  23. OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
  24. OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
  25. #OBJPA=
  26. # targets
  27. all: $(ZLIB_LIB) example.exe minigzip.exe
  28. .c.obj:
  29. $(CC) -c $(CFLAGS) $<
  30. .asm.obj:
  31. $(AS) -c $(ASFLAGS) $<
  32. adler32.obj: adler32.c zlib.h zconf.h
  33. compress.obj: compress.c zlib.h zconf.h
  34. crc32.obj: crc32.c zlib.h zconf.h crc32.h
  35. deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
  36. gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
  37. gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
  38. gzread.obj: gzread.c zlib.h zconf.h gzguts.h
  39. gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
  40. infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  41. inffast.h inffixed.h
  42. inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  43. inffast.h
  44. inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  45. inffast.h inffixed.h
  46. inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
  47. trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
  48. uncompr.obj: uncompr.c zlib.h zconf.h
  49. zutil.obj: zutil.c zutil.h zlib.h zconf.h
  50. example.obj: test/example.c zlib.h zconf.h
  51. minigzip.obj: test/minigzip.c zlib.h zconf.h
  52. # For the sake of the old Borland make,
  53. # the command line is cut to fit in the MS-DOS 128 byte limit:
  54. $(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
  55. -del $(ZLIB_LIB)
  56. $(AR) $(ZLIB_LIB) $(OBJP1)
  57. $(AR) $(ZLIB_LIB) $(OBJP2)
  58. $(AR) $(ZLIB_LIB) $(OBJPA)
  59. # testing
  60. test: example.exe minigzip.exe
  61. example
  62. echo hello world | minigzip | minigzip -d
  63. example.exe: example.obj $(ZLIB_LIB)
  64. $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
  65. minigzip.exe: minigzip.obj $(ZLIB_LIB)
  66. $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
  67. # cleanup
  68. clean:
  69. -del $(ZLIB_LIB)
  70. -del *.obj
  71. -del *.exe
  72. -del *.tds
  73. -del zlib.bak
  74. -del foo.gz