1*a67afe4dSAndroid Build Coastguard Worker# makefile for libpng 2*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 1998 Tim Wegner 3*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2006,2009,2011,2014 Glenn Randers-Pehrson 4*a67afe4dSAndroid Build Coastguard Worker# 5*a67afe4dSAndroid Build Coastguard Worker# This code is released under the libpng license. 6*a67afe4dSAndroid Build Coastguard Worker# For conditions of distribution and use, see the disclaimer 7*a67afe4dSAndroid Build Coastguard Worker# and license in png.h 8*a67afe4dSAndroid Build Coastguard Worker# 9*a67afe4dSAndroid Build Coastguard Worker# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib 10*a67afe4dSAndroid Build Coastguard Worker# To use, do "nmake /f scripts\makefile.vcwin32" 11*a67afe4dSAndroid Build Coastguard Worker 12*a67afe4dSAndroid Build Coastguard Worker# -------- Microsoft Visual C++ 2.0 and later -------- 13*a67afe4dSAndroid Build Coastguard Worker 14*a67afe4dSAndroid Build Coastguard Worker# Compiler, linker, librarian and other tools 15*a67afe4dSAndroid Build Coastguard WorkerCC = cl 16*a67afe4dSAndroid Build Coastguard WorkerLD = link 17*a67afe4dSAndroid Build Coastguard WorkerAR = lib 18*a67afe4dSAndroid Build Coastguard WorkerCPPFLAGS = -I..\zlib 19*a67afe4dSAndroid Build Coastguard WorkerCFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -MD -O2 -W3 20*a67afe4dSAndroid Build Coastguard WorkerLDFLAGS = -nologo 21*a67afe4dSAndroid Build Coastguard WorkerARFLAGS = -nologo 22*a67afe4dSAndroid Build Coastguard WorkerCP = copy 23*a67afe4dSAndroid Build Coastguard WorkerRM = del 24*a67afe4dSAndroid Build Coastguard Worker 25*a67afe4dSAndroid Build Coastguard Worker# Uncomment next to put error messages in a file 26*a67afe4dSAndroid Build Coastguard Worker#ERRFILE= >> pngerrs.log 27*a67afe4dSAndroid Build Coastguard Worker 28*a67afe4dSAndroid Build Coastguard Worker# Pre-built configuration 29*a67afe4dSAndroid Build Coastguard Worker# See scripts\pnglibconf.mak for more options 30*a67afe4dSAndroid Build Coastguard WorkerPNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt 31*a67afe4dSAndroid Build Coastguard Worker 32*a67afe4dSAndroid Build Coastguard Worker# File extensions 33*a67afe4dSAndroid Build Coastguard WorkerO = .obj 34*a67afe4dSAndroid Build Coastguard Worker 35*a67afe4dSAndroid Build Coastguard Worker# File lists 36*a67afe4dSAndroid Build Coastguard WorkerOBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) 37*a67afe4dSAndroid Build Coastguard WorkerOBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) 38*a67afe4dSAndroid Build Coastguard WorkerOBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) 39*a67afe4dSAndroid Build Coastguard WorkerOBJS = $(OBJS1) $(OBJS2) $(OBJS3) 40*a67afe4dSAndroid Build Coastguard Worker 41*a67afe4dSAndroid Build Coastguard Worker# Targets 42*a67afe4dSAndroid Build Coastguard Workerall: libpng.lib 43*a67afe4dSAndroid Build Coastguard Worker 44*a67afe4dSAndroid Build Coastguard Workerpnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 45*a67afe4dSAndroid Build Coastguard Worker $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 46*a67afe4dSAndroid Build Coastguard Worker 47*a67afe4dSAndroid Build Coastguard Workerpng$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 48*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 49*a67afe4dSAndroid Build Coastguard Worker 50*a67afe4dSAndroid Build Coastguard Workerpngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 51*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 52*a67afe4dSAndroid Build Coastguard Worker 53*a67afe4dSAndroid Build Coastguard Workerpngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 54*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 55*a67afe4dSAndroid Build Coastguard Worker 56*a67afe4dSAndroid Build Coastguard Workerpngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 57*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 58*a67afe4dSAndroid Build Coastguard Worker 59*a67afe4dSAndroid Build Coastguard Workerpngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 60*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 61*a67afe4dSAndroid Build Coastguard Worker 62*a67afe4dSAndroid Build Coastguard Workerpngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 63*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 64*a67afe4dSAndroid Build Coastguard Worker 65*a67afe4dSAndroid Build Coastguard Workerpngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 66*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 67*a67afe4dSAndroid Build Coastguard Worker 68*a67afe4dSAndroid Build Coastguard Workerpngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 69*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 70*a67afe4dSAndroid Build Coastguard Worker 71*a67afe4dSAndroid Build Coastguard Workerpngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 72*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 73*a67afe4dSAndroid Build Coastguard Worker 74*a67afe4dSAndroid Build Coastguard Workerpngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 76*a67afe4dSAndroid Build Coastguard Worker 77*a67afe4dSAndroid Build Coastguard Workerpngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 78*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 79*a67afe4dSAndroid Build Coastguard Worker 80*a67afe4dSAndroid Build Coastguard Workerpngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 81*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 82*a67afe4dSAndroid Build Coastguard Worker 83*a67afe4dSAndroid Build Coastguard Workerpngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 85*a67afe4dSAndroid Build Coastguard Worker 86*a67afe4dSAndroid Build Coastguard Workerpngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 87*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 88*a67afe4dSAndroid Build Coastguard Worker 89*a67afe4dSAndroid Build Coastguard Workerpngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 90*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 91*a67afe4dSAndroid Build Coastguard Worker 92*a67afe4dSAndroid Build Coastguard Workerlibpng.lib: $(OBJS) 93*a67afe4dSAndroid Build Coastguard Worker -$(RM) $@ 94*a67afe4dSAndroid Build Coastguard Worker $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) 95*a67afe4dSAndroid Build Coastguard Worker 96*a67afe4dSAndroid Build Coastguard Workerpngtest.exe: pngtest$(O) libpng.lib 97*a67afe4dSAndroid Build Coastguard Worker $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) 98*a67afe4dSAndroid Build Coastguard Worker 99*a67afe4dSAndroid Build Coastguard Workerpngtest$(O): png.h pngconf.h pnglibconf.h 100*a67afe4dSAndroid Build Coastguard Worker $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 101*a67afe4dSAndroid Build Coastguard Worker 102*a67afe4dSAndroid Build Coastguard Workertest: pngtest.exe 103*a67afe4dSAndroid Build Coastguard Worker pngtest.exe 104*a67afe4dSAndroid Build Coastguard Worker 105*a67afe4dSAndroid Build Coastguard Workerclean: 106*a67afe4dSAndroid Build Coastguard Worker -$(RM) *$(O) 107*a67afe4dSAndroid Build Coastguard Worker -$(RM) libpng.lib 108*a67afe4dSAndroid Build Coastguard Worker -$(RM) pnglibconf.h 109*a67afe4dSAndroid Build Coastguard Worker -$(RM) pngtest.exe 110*a67afe4dSAndroid Build Coastguard Worker -$(RM) pngout.png 111*a67afe4dSAndroid Build Coastguard Worker 112*a67afe4dSAndroid Build Coastguard Worker# End of makefile for libpng 113