makefile.bc32 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. # Makefile for libpng
  2. # 32-bit Borland C++ (Note: All modules are compiled in C mode)
  3. # To build the library, do:
  4. # "make -fmakefile.bc32"
  5. #
  6. # -------------------- 32-bit Borland C++ --------------------
  7. ### Absolutely necessary for this makefile to work
  8. .AUTODEPEND
  9. ## Where zlib.h, zconf.h and zlib.lib are
  10. ZLIB_DIR=..\zlib
  11. ## Compiler, linker and lib stuff
  12. CC=bcc32
  13. LD=bcc32
  14. LIB=tlib
  15. # -3 = 386, -4 = 486, -5 = Pentium etc.
  16. !ifndef TARGET_CPU
  17. #TARGET_CPU=-6
  18. !endif
  19. # Use this if you don't want Borland's fancy exception handling
  20. # (Caution: doesn't work with CBuilderX)
  21. #NOEHLIB=noeh32.lib
  22. !ifdef DEBUG
  23. CDEBUG=-v
  24. LDEBUG=-v
  25. !else
  26. CDEBUG=
  27. LDEBUG=
  28. !endif
  29. # STACKOFLOW=1
  30. !ifdef STACKOFLOW
  31. CDEBUG=$(CDEBUG) -N
  32. LDEBUG=$(LDEBUG) -N
  33. !endif
  34. # -O2 optimize for speed
  35. # -d merge duplicate strings
  36. # -k- turn off standard stack frame
  37. # -w display all warnings
  38. CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
  39. # -M generate map file
  40. LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
  41. ## Variables
  42. OBJS = \
  43. png.obj \
  44. pngerror.obj \
  45. pngget.obj \
  46. pngmem.obj \
  47. pngpread.obj \
  48. pngread.obj \
  49. pngrio.obj \
  50. pngrtran.obj \
  51. pngrutil.obj \
  52. pngset.obj \
  53. pngtrans.obj \
  54. pngwio.obj \
  55. pngwrite.obj \
  56. pngwtran.obj \
  57. pngwutil.obj
  58. LIBOBJS = \
  59. +png.obj \
  60. +pngerror.obj \
  61. +pngget.obj \
  62. +pngmem.obj \
  63. +pngpread.obj \
  64. +pngread.obj \
  65. +pngrio.obj \
  66. +pngrtran.obj \
  67. +pngrutil.obj \
  68. +pngset.obj \
  69. +pngtrans.obj \
  70. +pngwio.obj \
  71. +pngwrite.obj \
  72. +pngwtran.obj \
  73. +pngwutil.obj
  74. LIBNAME=libpng.lib
  75. ## Implicit rules
  76. # Braces let make "batch" calls to the compiler,
  77. # 2 calls instead of 12; space is important.
  78. .c.obj:
  79. $(CC) $(CFLAGS) -c {$*.c }
  80. .c.exe:
  81. $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
  82. .obj.exe:
  83. $(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
  84. ## Major targets
  85. all: libpng pngtest
  86. libpng: $(LIBNAME)
  87. pngtest: pngtest.exe
  88. test: pngtest.exe
  89. pngtest
  90. ## Minor Targets
  91. # see scripts\pnglibconf.mak for how to make this file
  92. # with different options
  93. pnglibconf.h: scripts\pnglibconf.h.prebuilt
  94. copy scripts\pnglibconf.h.prebuilt $@
  95. png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  96. pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  97. pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  98. pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  99. pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  100. pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  101. pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  102. pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  103. pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  104. pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  105. pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  106. pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  107. pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  108. pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  109. pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  110. pngtest.obj: pngtest.c png.h pngconf.h pnglibconf.h
  111. $(LIBNAME): $(OBJS)
  112. -del $(LIBNAME)
  113. $(LIB) $(LIBNAME) @&&|
  114. $(LIBOBJS), libpng
  115. |
  116. # Cleanup
  117. clean:
  118. -del pnglibconf.h
  119. -del *.obj
  120. -del $(LIBNAME)
  121. -del pngtest.exe
  122. -del *.lst
  123. -del *.map
  124. -del *.tds
  125. -del pngout.png
  126. # End of makefile for libpng