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