makefile.bc32 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. CPPFLAGS=-I$(ZLIB_DIR)
  39. CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
  40. # -M generate map file
  41. LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
  42. ## Variables
  43. OBJS = \
  44. png.obj \
  45. pngerror.obj \
  46. pngget.obj \
  47. pngmem.obj \
  48. pngpread.obj \
  49. pngread.obj \
  50. pngrio.obj \
  51. pngrtran.obj \
  52. pngrutil.obj \
  53. pngset.obj \
  54. pngtrans.obj \
  55. pngwio.obj \
  56. pngwrite.obj \
  57. pngwtran.obj \
  58. pngwutil.obj
  59. LIBOBJS = \
  60. +png.obj \
  61. +pngerror.obj \
  62. +pngget.obj \
  63. +pngmem.obj \
  64. +pngpread.obj \
  65. +pngread.obj \
  66. +pngrio.obj \
  67. +pngrtran.obj \
  68. +pngrutil.obj \
  69. +pngset.obj \
  70. +pngtrans.obj \
  71. +pngwio.obj \
  72. +pngwrite.obj \
  73. +pngwtran.obj \
  74. +pngwutil.obj
  75. LIBNAME=libpng.lib
  76. ## Implicit rules
  77. # Braces let make "batch" calls to the compiler,
  78. # 2 calls instead of 12; space is important.
  79. .c.obj:
  80. $(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
  81. .c.exe:
  82. $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
  83. $(LIBNAME) zlib.lib $(NOEHLIB)
  84. .obj.exe:
  85. $(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
  86. ## Major targets
  87. all: libpng pngtest
  88. libpng: $(LIBNAME)
  89. pngtest: pngtest.exe
  90. test: pngtest.exe
  91. pngtest
  92. ## Minor Targets
  93. # see scripts\pnglibconf.mak for how to make this file
  94. # with different options
  95. pnglibconf.h: scripts\pnglibconf.h.prebuilt
  96. copy scripts\pnglibconf.h.prebuilt $@
  97. png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  98. pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  99. pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  100. pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  101. pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  102. pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  103. pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  104. pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  105. pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  106. pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  107. pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  108. pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  109. pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  110. pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  111. pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  112. pngtest.obj: pngtest.c png.h pngconf.h pnglibconf.h
  113. $(LIBNAME): $(OBJS)
  114. -del $(LIBNAME)
  115. $(LIB) $(LIBNAME) @&&|
  116. $(LIBOBJS), libpng
  117. |
  118. # Cleanup
  119. clean:
  120. -del pnglibconf.h
  121. -del *.obj
  122. -del $(LIBNAME)
  123. -del pngtest.exe
  124. -del *.lst
  125. -del *.map
  126. -del *.tds
  127. -del pngout.png
  128. # End of makefile for libpng