Makefile.bor
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
源码类别:

通讯编程

开发平台:

Visual C++

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