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, librarian and other tools
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 CPPFLAGS=-I$(ZLIB_DIR)
56 CFLAGS=-O2 -Z -X- -w -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
58 # -M generate map file
59 LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
61 # Pre-built configuration
62 # See scripts\pnglibconf.mak for more options
63 !ifndef PNGLIBCONF_H_PREBUILT
64 PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
103 LIBNAME=libpng$(MODEL).lib
107 # Braces let make "batch" calls to the compiler,
108 # 2 calls instead of 12; space is important.
110 $(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
113 $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
114 $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
120 # try !include scripts\pnglibconf.mak for more options
121 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
122 $(CP) $(PNGLIBCONF_H_PREBUILT) $@
126 pngtest: pngtest$(MODEL).exe
128 test: pngtest$(MODEL).exe
133 png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
134 pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
135 pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
136 pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
137 pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
138 pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
139 pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
140 pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
141 pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
142 pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
143 pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
144 pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
145 pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
146 pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
147 pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
151 $(LIB) $(LIBNAME) @&&|
152 $(LIBOBJS), libpng$(MODEL)
155 pngtest$(MODEL).obj: pngtest.c png.h pngconf.h pnglibconf.h
156 $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
158 pngtest$(MODEL).exe: pngtest$(MODEL).obj
159 $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
161 # Clean up anything else you want
170 # End of makefile for libpng