makefile.bc32 3.8 KB

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