-Dep_winpng = \
- ..\..\lib\winpng.lib
-
-winpng : BccW16.cfg $(Dep_winpng)
- echo MakeNode winpng
-
-Dep_winpngdlib = \
- png.obj\
- pngrcb.obj\
- pngread.obj\
- pngrtran.obj\
- pngrutil.obj\
- pngstub.obj\
- pngtrans.obj\
- pngwrite.obj\
- pngwtran.obj\
- pngwutil.obj
-
-$(ZLIB):
- cd ..\zlib
- make -fmakefile.bcc
- cd ..\png
-
-winpng.lib : $(Dep_winpngdlib) $(ZLIB)
- copy /b $(ZLIB) winpng.lib
- $(TLIB) $< $(IDE_BFLAGS) $(BEAT_winpngdlib) @&&|
-+$(LOBJECTS:.obj =.obj +)
-|
-
-png.obj : png.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ png.c
-
-pngrcb.obj : pngrcb.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngrcb.c
-
-pngread.obj : pngread.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngread.c
-
-pngrtran.obj : pngrtran.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngrtran.c
-
-pngrutil.obj : pngrutil.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngrutil.c
-
-pngstub.obj : pngstub.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngstub.c
-
-pngtrans.obj : pngtrans.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngtrans.c
-
-pngwrite.obj : pngwrite.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngwrite.c
-
-pngwtran.obj : pngwtran.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngwtran.c
-
-pngwutil.obj : pngwutil.c
- $(BCC) -P- -c $(CEAT_winpngdlib) -o$@ pngwutil.c
-
-# Compiler configuration file
-BccW16.cfg :
- Copy &&|
--v
--vi
--X-
--H
--IC:\BC4\INCLUDE
--H=winpng.csm
+# Makefile : Builds PNG library (BC++ 16-bit)
+
+# WXWIN and BCCDIR are set by parent make
+
+WXDIR = $(WXWIN)
+!include $(WXDIR)\src\makebcc.env
+
+WINPNGLIB = ..\..\lib\winpng.lib
+
+WXLIBDIR = $(WXDIR)\lib
+WXINC = $(WXDIR)\include\msw
+WXLIB = $(WXLIBDIR)\wx.lib
+
+!if "$(FINAL)" == "0"
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+OPT = -Od
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj \
+ pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj \
+ pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj
+
+all: $(WINPNGLIB)
+
+$(WINPNGLIB): $(OBJECTS)
+ erase $(WINPNGLIB)
+ tlib $(WINPNGLIB) /P512 @&&!
+-+$(OBJECTS:.obj =.obj -+)
+!
+
+.$(SRCSUFF).obj:
+ bcc $(CPPFLAGS) -c {$< }
+
+.c.obj:
+ bcc $(CPPFLAGS) -P- -c {$< }
+
+$(CFG): makefile.bcc
+ copy &&!
+-H=$(WXDIR)\src\msw\borland.pch
+-2
+-P
+-d
+-w-hid
+-w-par
+-w-pia
+-w-aus
+-w-rch