fukasawa e60969
# Makefile for libpng (static)
fukasawa e60969
# IBM C version 3.x for Win32 and OS/2
fukasawa e60969
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
fukasawa e60969
# Copyright (C) 2000 Cosmin Truta
fukasawa e60969
#
fukasawa e60969
# This code is released under the libpng license.
fukasawa e60969
# For conditions of distribution and use, see the disclaimer
fukasawa e60969
# and license in png.h
fukasawa e60969
#
fukasawa e60969
# Notes:
fukasawa e60969
#   Derived from makefile.std
fukasawa e60969
#   All modules are compiled in C mode
fukasawa e60969
#   Tested under Win32, expected to work under OS/2
fukasawa e60969
#   Can be easily adapted for IBM VisualAge/C++ for AIX
fukasawa e60969
fukasawa e60969
# Location of the zlib library and include files
fukasawa e60969
ZLIBINC = ../zlib
fukasawa e60969
ZLIBLIB = ../zlib
fukasawa e60969
fukasawa e60969
# Compiler, linker, lib and other tools
fukasawa e60969
CC = icc
fukasawa e60969
LD = ilink
fukasawa e60969
AR = ilib
fukasawa e60969
CP = copy
fukasawa e60969
RM = del
fukasawa e60969
fukasawa e60969
CPPFLAGS = -I$(ZLIBINC)
fukasawa e60969
CFLAGS = -Mc -O2 -W3
fukasawa e60969
LDFLAGS =
fukasawa e60969
fukasawa e60969
# Pre-built configuration
fukasawa e60969
# See scripts/pnglibconf.mak for more options
fukasawa e60969
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
fukasawa e60969
fukasawa e60969
# File extensions
fukasawa e60969
O=.obj
fukasawa e60969
A=.lib
fukasawa e60969
E=.exe
fukasawa e60969
fukasawa e60969
# Variables
fukasawa e60969
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
fukasawa e60969
	pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
fukasawa e60969
	pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
fukasawa e60969
fukasawa e60969
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
fukasawa e60969
fukasawa e60969
# Targets
fukasawa e60969
.c$(O):
fukasawa e60969
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
fukasawa e60969
fukasawa e60969
all: libpng$(A) pngtest$(E)
fukasawa e60969
fukasawa e60969
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
fukasawa e60969
	$(CP) $(PNGLIBCONF_H_PREBUILT) $@
fukasawa e60969
fukasawa e60969
libpng$(A): $(OBJS)
fukasawa e60969
	$(AR) -out:$@ $(OBJS)
fukasawa e60969
fukasawa e60969
test: pngtest$(E)
fukasawa e60969
	pngtest$(E)
fukasawa e60969
fukasawa e60969
pngtest: pngtest$(E)
fukasawa e60969
fukasawa e60969
pngtest$(E): pngtest$(O) libpng$(A)
fukasawa e60969
	$(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
fukasawa e60969
fukasawa e60969
clean:
fukasawa e60969
	$(RM) *$(O)
fukasawa e60969
	$(RM) libpng$(A)
fukasawa e60969
	$(RM) pnglibconf.h
fukasawa e60969
	$(RM) pngtest$(E)
fukasawa e60969
	$(RM) pngout.png
fukasawa e60969
fukasawa e60969
png$(O):      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngget$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngmem$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngread$(O):  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngrio$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngset$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwio$(O):   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
fukasawa e60969
pngtest$(O):  png.h pngconf.h pnglibconf.h