1*a67afe4dSAndroid Build Coastguard Worker# Makefile for libpng 2*a67afe4dSAndroid Build Coastguard Worker# 32-bit Borland C++ (Note: All modules are compiled in C mode) 3*a67afe4dSAndroid Build Coastguard Worker# To build the library, do: 4*a67afe4dSAndroid Build Coastguard Worker# "make -fmakefile.bc32" 5*a67afe4dSAndroid Build Coastguard Worker# 6*a67afe4dSAndroid Build Coastguard Worker# -------------------- 32-bit Borland C++ -------------------- 7*a67afe4dSAndroid Build Coastguard Worker 8*a67afe4dSAndroid Build Coastguard Worker### Absolutely necessary for this makefile to work 9*a67afe4dSAndroid Build Coastguard Worker.AUTODEPEND 10*a67afe4dSAndroid Build Coastguard Worker 11*a67afe4dSAndroid Build Coastguard Worker## Where zlib.h, zconf.h and zlib.lib are 12*a67afe4dSAndroid Build Coastguard WorkerZLIB_DIR=..\zlib 13*a67afe4dSAndroid Build Coastguard Worker 14*a67afe4dSAndroid Build Coastguard Worker## Compiler, linker, librarian and other tools 15*a67afe4dSAndroid Build Coastguard WorkerCC=bcc32 16*a67afe4dSAndroid Build Coastguard WorkerLD=bcc32 17*a67afe4dSAndroid Build Coastguard WorkerLIB=tlib 18*a67afe4dSAndroid Build Coastguard WorkerCP=copy 19*a67afe4dSAndroid Build Coastguard Worker 20*a67afe4dSAndroid Build Coastguard Worker# -3 = 386, -4 = 486, -5 = Pentium etc. 21*a67afe4dSAndroid Build Coastguard Worker!ifndef TARGET_CPU 22*a67afe4dSAndroid Build Coastguard Worker#TARGET_CPU=-6 23*a67afe4dSAndroid Build Coastguard Worker!endif 24*a67afe4dSAndroid Build Coastguard Worker 25*a67afe4dSAndroid Build Coastguard Worker# Use this if you don't want Borland's fancy exception handling 26*a67afe4dSAndroid Build Coastguard Worker# (Caution: doesn't work with CBuilderX) 27*a67afe4dSAndroid Build Coastguard Worker#NOEHLIB=noeh32.lib 28*a67afe4dSAndroid Build Coastguard Worker 29*a67afe4dSAndroid Build Coastguard Worker!ifdef DEBUG 30*a67afe4dSAndroid Build Coastguard WorkerCDEBUG=-v 31*a67afe4dSAndroid Build Coastguard WorkerLDEBUG=-v 32*a67afe4dSAndroid Build Coastguard Worker!else 33*a67afe4dSAndroid Build Coastguard WorkerCDEBUG= 34*a67afe4dSAndroid Build Coastguard WorkerLDEBUG= 35*a67afe4dSAndroid Build Coastguard Worker!endif 36*a67afe4dSAndroid Build Coastguard Worker 37*a67afe4dSAndroid Build Coastguard Worker# STACKOFLOW=1 38*a67afe4dSAndroid Build Coastguard Worker!ifdef STACKOFLOW 39*a67afe4dSAndroid Build Coastguard WorkerCDEBUG=$(CDEBUG) -N 40*a67afe4dSAndroid Build Coastguard WorkerLDEBUG=$(LDEBUG) -N 41*a67afe4dSAndroid Build Coastguard Worker!endif 42*a67afe4dSAndroid Build Coastguard Worker 43*a67afe4dSAndroid Build Coastguard Worker# -O2 optimize for speed 44*a67afe4dSAndroid Build Coastguard Worker# -d merge duplicate strings 45*a67afe4dSAndroid Build Coastguard Worker# -k- turn off standard stack frame 46*a67afe4dSAndroid Build Coastguard Worker# -w display all warnings 47*a67afe4dSAndroid Build Coastguard WorkerCPPFLAGS=-I$(ZLIB_DIR) 48*a67afe4dSAndroid Build Coastguard WorkerCFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG) 49*a67afe4dSAndroid Build Coastguard Worker 50*a67afe4dSAndroid Build Coastguard Worker# -M generate map file 51*a67afe4dSAndroid Build Coastguard WorkerLDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG) 52*a67afe4dSAndroid Build Coastguard Worker 53*a67afe4dSAndroid Build Coastguard Worker## Pre-built configuration 54*a67afe4dSAndroid Build Coastguard Worker# See scripts\pnglibconf.mak for more options 55*a67afe4dSAndroid Build Coastguard Worker!ifndef PNGLIBCONF_H_PREBUILT 56*a67afe4dSAndroid Build Coastguard WorkerPNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt 57*a67afe4dSAndroid Build Coastguard Worker!endif 58*a67afe4dSAndroid Build Coastguard Worker 59*a67afe4dSAndroid Build Coastguard Worker## File lists 60*a67afe4dSAndroid Build Coastguard WorkerOBJS = \ 61*a67afe4dSAndroid Build Coastguard Worker png.obj \ 62*a67afe4dSAndroid Build Coastguard Worker pngerror.obj \ 63*a67afe4dSAndroid Build Coastguard Worker pngget.obj \ 64*a67afe4dSAndroid Build Coastguard Worker pngmem.obj \ 65*a67afe4dSAndroid Build Coastguard Worker pngpread.obj \ 66*a67afe4dSAndroid Build Coastguard Worker pngread.obj \ 67*a67afe4dSAndroid Build Coastguard Worker pngrio.obj \ 68*a67afe4dSAndroid Build Coastguard Worker pngrtran.obj \ 69*a67afe4dSAndroid Build Coastguard Worker pngrutil.obj \ 70*a67afe4dSAndroid Build Coastguard Worker pngset.obj \ 71*a67afe4dSAndroid Build Coastguard Worker pngtrans.obj \ 72*a67afe4dSAndroid Build Coastguard Worker pngwio.obj \ 73*a67afe4dSAndroid Build Coastguard Worker pngwrite.obj \ 74*a67afe4dSAndroid Build Coastguard Worker pngwtran.obj \ 75*a67afe4dSAndroid Build Coastguard Worker pngwutil.obj 76*a67afe4dSAndroid Build Coastguard Worker 77*a67afe4dSAndroid Build Coastguard WorkerLIBOBJS = \ 78*a67afe4dSAndroid Build Coastguard Worker +png.obj \ 79*a67afe4dSAndroid Build Coastguard Worker +pngerror.obj \ 80*a67afe4dSAndroid Build Coastguard Worker +pngget.obj \ 81*a67afe4dSAndroid Build Coastguard Worker +pngmem.obj \ 82*a67afe4dSAndroid Build Coastguard Worker +pngpread.obj \ 83*a67afe4dSAndroid Build Coastguard Worker +pngread.obj \ 84*a67afe4dSAndroid Build Coastguard Worker +pngrio.obj \ 85*a67afe4dSAndroid Build Coastguard Worker +pngrtran.obj \ 86*a67afe4dSAndroid Build Coastguard Worker +pngrutil.obj \ 87*a67afe4dSAndroid Build Coastguard Worker +pngset.obj \ 88*a67afe4dSAndroid Build Coastguard Worker +pngtrans.obj \ 89*a67afe4dSAndroid Build Coastguard Worker +pngwio.obj \ 90*a67afe4dSAndroid Build Coastguard Worker +pngwrite.obj \ 91*a67afe4dSAndroid Build Coastguard Worker +pngwtran.obj \ 92*a67afe4dSAndroid Build Coastguard Worker +pngwutil.obj 93*a67afe4dSAndroid Build Coastguard Worker 94*a67afe4dSAndroid Build Coastguard WorkerLIBNAME=libpng.lib 95*a67afe4dSAndroid Build Coastguard Worker 96*a67afe4dSAndroid Build Coastguard Worker## Implicit rules 97*a67afe4dSAndroid Build Coastguard Worker# Braces let make "batch" calls to the compiler, 98*a67afe4dSAndroid Build Coastguard Worker# 2 calls instead of 12; space is important. 99*a67afe4dSAndroid Build Coastguard Worker.c.obj: 100*a67afe4dSAndroid Build Coastguard Worker $(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c } 101*a67afe4dSAndroid Build Coastguard Worker 102*a67afe4dSAndroid Build Coastguard Worker.c.exe: 103*a67afe4dSAndroid Build Coastguard Worker $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \ 104*a67afe4dSAndroid Build Coastguard Worker $(LIBNAME) zlib.lib $(NOEHLIB) 105*a67afe4dSAndroid Build Coastguard Worker 106*a67afe4dSAndroid Build Coastguard Worker.obj.exe: 107*a67afe4dSAndroid Build Coastguard Worker $(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB) 108*a67afe4dSAndroid Build Coastguard Worker 109*a67afe4dSAndroid Build Coastguard Worker## Major targets 110*a67afe4dSAndroid Build Coastguard Workerall: libpng pngtest 111*a67afe4dSAndroid Build Coastguard Worker 112*a67afe4dSAndroid Build Coastguard Workerlibpng: $(LIBNAME) 113*a67afe4dSAndroid Build Coastguard Worker 114*a67afe4dSAndroid Build Coastguard Workerpngtest: pngtest.exe 115*a67afe4dSAndroid Build Coastguard Worker 116*a67afe4dSAndroid Build Coastguard Workertest: pngtest.exe 117*a67afe4dSAndroid Build Coastguard Worker pngtest 118*a67afe4dSAndroid Build Coastguard Worker 119*a67afe4dSAndroid Build Coastguard Worker## Minor Targets 120*a67afe4dSAndroid Build Coastguard Worker 121*a67afe4dSAndroid Build Coastguard Workerpnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 122*a67afe4dSAndroid Build Coastguard Worker $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 123*a67afe4dSAndroid Build Coastguard Worker 124*a67afe4dSAndroid Build Coastguard Workerpng.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 125*a67afe4dSAndroid Build Coastguard Workerpngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 126*a67afe4dSAndroid Build Coastguard Workerpngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 127*a67afe4dSAndroid Build Coastguard Workerpngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 128*a67afe4dSAndroid Build Coastguard Workerpngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 129*a67afe4dSAndroid Build Coastguard Workerpngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 130*a67afe4dSAndroid Build Coastguard Workerpngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 131*a67afe4dSAndroid Build Coastguard Workerpngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 132*a67afe4dSAndroid Build Coastguard Workerpngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 133*a67afe4dSAndroid Build Coastguard Workerpngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 134*a67afe4dSAndroid Build Coastguard Workerpngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 135*a67afe4dSAndroid Build Coastguard Workerpngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 136*a67afe4dSAndroid Build Coastguard Workerpngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 137*a67afe4dSAndroid Build Coastguard Workerpngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 138*a67afe4dSAndroid Build Coastguard Workerpngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 139*a67afe4dSAndroid Build Coastguard Workerpngtest.obj: pngtest.c png.h pngconf.h pnglibconf.h 140*a67afe4dSAndroid Build Coastguard Worker 141*a67afe4dSAndroid Build Coastguard Worker$(LIBNAME): $(OBJS) 142*a67afe4dSAndroid Build Coastguard Worker -del $(LIBNAME) 143*a67afe4dSAndroid Build Coastguard Worker $(LIB) $(LIBNAME) @&&| 144*a67afe4dSAndroid Build Coastguard Worker$(LIBOBJS), libpng 145*a67afe4dSAndroid Build Coastguard Worker| 146*a67afe4dSAndroid Build Coastguard Worker 147*a67afe4dSAndroid Build Coastguard Worker# Cleanup 148*a67afe4dSAndroid Build Coastguard Workerclean: 149*a67afe4dSAndroid Build Coastguard Worker -del pnglibconf.h 150*a67afe4dSAndroid Build Coastguard Worker -del *.obj 151*a67afe4dSAndroid Build Coastguard Worker -del $(LIBNAME) 152*a67afe4dSAndroid Build Coastguard Worker -del pngtest.exe 153*a67afe4dSAndroid Build Coastguard Worker -del *.lst 154*a67afe4dSAndroid Build Coastguard Worker -del *.map 155*a67afe4dSAndroid Build Coastguard Worker -del *.tds 156*a67afe4dSAndroid Build Coastguard Worker -del pngout.png 157*a67afe4dSAndroid Build Coastguard Worker 158*a67afe4dSAndroid Build Coastguard Worker# End of makefile for libpng 159