|
fukasawa |
e60969 |
# makefile for libpng
|
|
fukasawa |
e60969 |
# Copyright (C) 1998 Tim Wegner
|
|
fukasawa |
e60969 |
# Copyright (C) 2006,2009,2011,2014 Glenn Randers-Pehrson
|
|
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 |
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
|
fukasawa |
e60969 |
# To use, do "nmake /f scripts\makefile.vcwin32"
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# -------- Microsoft Visual C++ 2.0 and later --------
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# Compiler, linker, librarian and other tools
|
|
fukasawa |
e60969 |
CC = cl
|
|
fukasawa |
e60969 |
LD = link
|
|
fukasawa |
e60969 |
AR = lib
|
|
fukasawa |
e60969 |
CPPFLAGS = -I..\zlib
|
|
fukasawa |
e60969 |
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -MD -O2 -W3
|
|
fukasawa |
e60969 |
LDFLAGS = -nologo
|
|
fukasawa |
e60969 |
ARFLAGS = -nologo
|
|
fukasawa |
e60969 |
CP = copy
|
|
fukasawa |
e60969 |
RM = del
|
|
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 |
|
|
fukasawa |
e60969 |
#uncomment next to put error messages in a file
|
|
fukasawa |
e60969 |
#ERRFILE= >> pngerrs.log
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# Variables
|
|
fukasawa |
e60969 |
OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
|
|
fukasawa |
e60969 |
OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
|
|
fukasawa |
e60969 |
OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
|
fukasawa |
e60969 |
OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# Targets
|
|
fukasawa |
e60969 |
all: libpng.lib
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
|
fukasawa |
e60969 |
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
libpng.lib: $(OBJS)
|
|
fukasawa |
e60969 |
-$(RM) $@
|
|
fukasawa |
e60969 |
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngtest$(O): png.h pngconf.h pnglibconf.h
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngtest.exe: pngtest$(O) libpng.lib
|
|
fukasawa |
e60969 |
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
test: pngtest.exe
|
|
fukasawa |
e60969 |
pngtest
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
clean:
|
|
fukasawa |
e60969 |
-$(RM) *$(O)
|
|
fukasawa |
e60969 |
-$(RM) libpng.lib
|
|
fukasawa |
e60969 |
-$(RM) pnglibconf.h
|
|
fukasawa |
e60969 |
-$(RM) pngtest.exe
|
|
fukasawa |
e60969 |
-$(RM) pngout.png
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# End of makefile for libpng
|
|
fukasawa |
e60969 |
|