1# Makefile for libpng 2# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later 3 4# Copyright (C) 2006, 2014 Glenn Randers-Pehrson 5# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is 6# copyright 1995 Guy Eric Schalnat, Group 42, Inc. 7# 8# This code is released under the libpng license. 9# For conditions of distribution and use, see the disclaimer 10# and license in png.h 11# 12# To use, do "nmake /f scripts\makefile.intel" 13# 14# ------------------- Intel C/C++ Compiler 4.0 and later ------------------- 15 16# Where the zlib library and include files are located 17ZLIBLIB=..\zlib 18ZLIBINC=..\zlib 19 20# Target CPU 21CPU=6 # Pentium II 22#CPU=5 # Pentium 23 24# Calling convention 25CALLING=r # __fastcall 26#CALLING=z # __stdcall 27#CALLING=d # __cdecl 28 29# Uncomment next to put error messages in a file 30#ERRFILE=>>pngerrs 31 32# -------------------------------------------------------------------------- 33 34CC=icl -c 35CPPFLAGS=-I$(ZLIBINC) 36CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo 37LD=link 38LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO 39CP=cp 40 41# Pre-built configuration 42# See scripts\pnglibconf.mak for more options 43PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt 44 45O=.obj 46 47OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \ 48pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \ 49pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) 50 51all: test 52 53pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 54 $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 55 56png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 57 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 58 59pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 60 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 61 62pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 63 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 64 65pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 66 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 67 68pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 69 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 70 71pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 72 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 73 74pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 76 77pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 78 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 79 80pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 81 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 82 83pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 85 86pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 87 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 88 89pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 90 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 91 92pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 93 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 94 95pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 96 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 97 98pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 99 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 100 101libpng.lib: $(OBJS) 102 if exist libpng.lib del libpng.lib 103 lib /NOLOGO /OUT:libpng.lib $(OBJS) 104 105pngtest.exe: pngtest.obj libpng.lib 106 $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib 107 108pngtest$(O): png.h pngconf.h pnglibconf.h 109 $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) 110 111test: pngtest.exe 112 pngtest.exe 113 114 115# End of makefile for libpng 116