Makefile.tc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Makefile for zlib
  2. # Turbo C 2.01, Turbo C++ 1.01
  3. # Last updated: 15-Mar-2003
  4. # To use, do "make -fmakefile.tc"
  5. # To compile in small model, set below: MODEL=s
  6. # WARNING: the small model is supported but only for small values of
  7. # MAX_WBITS and MAX_MEM_LEVEL. For example:
  8. # -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
  9. # If you wish to reduce the memory requirements (default 256K for big
  10. # objects plus a few K), you can add to CFLAGS below:
  11. # -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
  12. # See zconf.h for details about the memory requirements.
  13. # ------------ Turbo C 2.01, Turbo C++ 1.01 ------------
  14. MODEL=l
  15. CC=tcc
  16. LD=tcc
  17. AR=tlib
  18. # CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
  19. CFLAGS=-O2 -G -Z -m$(MODEL)
  20. LDFLAGS=-m$(MODEL) -f-
  21. # variables
  22. ZLIB_LIB = zlib_$(MODEL).lib
  23. OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
  24. OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
  25. OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
  26. OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
  27. # targets
  28. all: $(ZLIB_LIB) example.exe minigzip.exe
  29. .c.obj:
  30. $(CC) -c $(CFLAGS) $*.c
  31. adler32.obj: adler32.c zlib.h zconf.h
  32. compress.obj: compress.c zlib.h zconf.h
  33. crc32.obj: crc32.c zlib.h zconf.h crc32.h
  34. deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
  35. gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
  36. gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
  37. gzread.obj: gzread.c zlib.h zconf.h gzguts.h
  38. gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
  39. infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  40. inffast.h inffixed.h
  41. inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  42. inffast.h
  43. inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  44. inffast.h inffixed.h
  45. inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
  46. trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
  47. uncompr.obj: uncompr.c zlib.h zconf.h
  48. zutil.obj: zutil.c zutil.h zlib.h zconf.h
  49. example.obj: example.c zlib.h zconf.h
  50. minigzip.obj: minigzip.c zlib.h zconf.h
  51. # the command line is cut to fit in the MS-DOS 128 byte limit:
  52. $(ZLIB_LIB): $(OBJ1) $(OBJ2)
  53. -del $(ZLIB_LIB)
  54. $(AR) $(ZLIB_LIB) $(OBJP1)
  55. $(AR) $(ZLIB_LIB) $(OBJP2)
  56. example.exe: example.obj $(ZLIB_LIB)
  57. $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
  58. minigzip.exe: minigzip.obj $(ZLIB_LIB)
  59. $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
  60. test: example.exe minigzip.exe
  61. example
  62. echo hello world | minigzip | minigzip -d
  63. clean:
  64. -del *.obj
  65. -del *.lib
  66. -del *.exe
  67. -del zlib_*.bak
  68. -del foo.gz