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
15 ## Compiler, linker and lib stuff
27 # 2 = 286, 3 = 386, etc.
32 # Use this if you don't want Borland's fancy exception handling
33 # (for Borland C++ 4.0 or later)
34 #NOEHLIB=noeh$(MODEL).lib
50 # -X- turn on dependency generation in the object file
51 # -w set all warnings on
52 # -O2 optimize for speed
53 # -Z global optimization
54 CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
56 # -M generate map file
57 LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
95 LIBNAME=libpng$(MODEL).lib
99 # Braces let make "batch" calls to the compiler,
100 # 2 calls instead of 12; space is important.
102 $(CC) $(CFLAGS) -c {$*.c }
105 $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
111 # try !inlude scripts\pnglibconf.mak for more options
112 pnglibconf.h: scripts\pnglibconf.h.prebuilt
113 copy scripts\pnglibconf.h.prebuilt $@
117 pngtest: pngtest$(MODEL).exe
119 test: pngtest$(MODEL).exe
124 png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
125 pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
126 pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
127 pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
128 pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
129 pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
130 pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
131 pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
132 pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
133 pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
134 pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
135 pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
136 pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
137 pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
138 pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
142 $(LIB) $(LIBNAME) @&&|
143 $(LIBOBJS), libpng$(MODEL)
146 pngtest$(MODEL).obj: pngtest.c png.h pngconf.h pnglibconf.h
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)
152 # Clean up anything else you want
161 # End of makefile for libpng