2 # 16-bit Borland C++ (Note: All modules are compiled in C mode)
3 # To build the library, do:
4 # "make -fmakefile.bor -DMODEL=c"
5 # or: "make -fmakefile.bor -DMODEL=l"
7 # ------------ Borland C++ ------------
9 ### Absolutely necessary for this makefile to work
12 ## Where zlib.h, zconf.h and zlib_MODEL.lib are
16 ## Compiler, linker and lib stuff
28 # 2 = 286, 3 = 386, etc.
33 # Use this if you don't want Borland's fancy exception handling
34 # (for Borland C++ 4.0 or later)
35 #NOEHLIB=noeh$(MODEL).lib
51 # -X- turn on dependency generation in the object file
52 # -w set all warnings on
53 # -O2 optimize for speed
54 # -Z global optimization
55 CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
57 # -M generate map file
58 LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
96 LIBNAME=libpng$(MODEL).lib
100 # Braces let make "batch" calls to the compiler,
101 # 2 calls instead of 12; space is important.
103 $(CC) $(CFLAGS) -c {$*.c }
106 $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
114 pngtest: pngtest$(MODEL).exe
116 test: pngtest$(MODEL).exe
123 pngerror.obj: pngerror.c
126 pngpread.obj: pngpread.c
127 pngread.obj: pngread.c
129 pngrtran.obj: pngrtran.c
130 pngrutil.obj: pngrutil.c
132 pngtrans.obj: pngtrans.c
134 pngwrite.obj: pngwrite.c
135 pngwtran.obj: pngwtran.c
136 pngwutil.obj: pngwutil.c
141 $(LIB) $(LIBNAME) @&&|
142 $(LIBOBJS), libpng$(MODEL)
146 pngtest$(MODEL).obj: pngtest.c
147 $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
149 pngtest$(MODEL).exe: pngtest$(MODEL).obj
150 $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
153 # Clean up anything else you want
162 # End of makefile for libpng