[libpng16] Updated scripts/makefile.* to use CPPFLAGS (Cosmin)

This commit is contained in:
Glenn Randers-Pehrson 2014-01-12 10:44:01 -06:00
parent bb6e0a2db3
commit 4250328102
63 changed files with 893 additions and 799 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.9beta04 - January 10, 2014
Libpng 1.6.9beta04 - January 12, 2014
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -63,7 +63,8 @@ Version 1.6.9beta02 [January 1, 2014]
Version 1.6.9beta03 [January 10, 2014]
Removed potentially misleading warning from png_check_IHDR().
Version 1.6.9beta04 [January 10, 2014]
Version 1.6.9beta04 [January 12, 2014]
Updated scripts/makefile.* to use CPPFLAGS (Cosmin)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4788,7 +4788,8 @@ Version 1.6.9beta02 [January 1, 2014]
Version 1.6.9beta03 [January 10, 2014]
Removed potentially misleading warning from png_check_IHDR().
Version 1.6.9beta04 [January 10, 2014]
Version 1.6.9beta04 [January 12, 2014]
Updated scripts/makefile.* to use CPPFLAGS (Cosmin)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.9beta04, January 10, 2014, are
libpng versions 1.2.6, August 15, 2004, through 1.6.9beta04, January 12, 2014, are
Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 10, 2014
January 12, 2014

2
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.6.9beta04 - January 10, 2014 (shared library 16.0)
README for libpng version 1.6.9beta04 - January 12, 2014 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

View File

@ -47,7 +47,8 @@ CC = gcc
#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation
LD = $(CC)
RM = rm -f
CFLAGS = -O -Wall $(INCS) $(MINGW_CCFLAGS)
CPPFLAGS = $(INCS)
CFLAGS = -O -Wall $(MINGW_CCFLAGS)
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
# [-ansi, -pedantic and -W can also be used]
LDFLAGS = $(MINGW_LDFLAGS)
@ -85,10 +86,10 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
%.pic$(O): %.c
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
# dependencies --------------------------------------------------------------

View File

@ -54,6 +54,7 @@ LD = cc
RM = rm -f
# ABI must be the same as that used to build libpng.
ABI =
CPPFLAGS =
CFLAGS = $(ABI) -O -fullwarn $(INCS)
LDFLAGS = $(ABI)
O = .o
@ -73,7 +74,7 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
# dependencies --------------------------------------------------------------

View File

@ -64,7 +64,8 @@ WLIBSs = $(PNGLIBs) $(ZLIBs)
CC = gcc
LD = gcc
RM = rm -f
CFLAGS = -O -Wall $(INCS) -DFEATURE_LOOP
CPPFLAGS = $(INCS) -DFEATURE_LOOP
CFLAGS = -O -Wall
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
# [-ansi, -pedantic and -W can also be used]
LDFLAGS =
@ -92,7 +93,7 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
# dependencies --------------------------------------------------------------

View File

@ -53,7 +53,8 @@ WLIBS = $(PNGLIB) $(ZLIB)
CC = cl
LD = link
RM = del
CFLAGS = -nologo -O -W3 $(INCS) $(cvars)
CPPFLAGS = $(INCS)
CFLAGS = -nologo -O -W3 $(cvars)
# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")]
# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
O = .obj
@ -76,7 +77,7 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
# dependencies --------------------------------------------------------------

View File

@ -82,7 +82,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
# note: dependencies do not work on implicit rule lines
.c$(O):
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
# dependencies

View File

@ -81,7 +81,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
# dependencies

View File

@ -97,7 +97,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
# dependencies

View File

@ -23,7 +23,8 @@ ZINC = -I../../../zlib
ZLIB = -L../../../zlib -lz
ZLIBS = ../../../zlib/libz.a
CFLAGS=$(PNGINC) $(ZINC)
CPPFLAGS=$(PNGINC) $(ZINC)
CFLAGS=
LDLIBS=$(PNGLIB) $(ZLIB)
LDLIBSS=$(PNGLIBS) $(ZLIBS)
C=.c
@ -37,7 +38,7 @@ E=
all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E)
png2pnm$(O): png2pnm$(C)
$(CC) -c $(CFLAGS) png2pnm$(C)
$(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C)
png2pnm$(E): png2pnm$(O)
$(LD) $(LDFLAGS) -o png2pnm$(E) png2pnm$(O) $(LDLIBS) -lm
@ -46,7 +47,7 @@ png2pnm-static$(E): png2pnm$(O)
$(LD) $(LDFLAGS) -o png2pnm-static$(E) png2pnm$(O) $(LDLIBSS) -lm
pnm2png$(O): pnm2png$(C)
$(CC) -c $(CFLAGS) pnm2png$(C)
$(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C)
pnm2png$(E): pnm2png$(O)
$(LD) $(LDFLAGS) -o pnm2png$(E) pnm2png$(O) $(LDLIBS) -lm

View File

@ -7,7 +7,8 @@ LB=tlib
RM=del
CP=copy
MODEL=l
CCFLAGS=-O -m$(MODEL) -I..\libpng -I..\zlib
CPPFLAGS=-I..\libpng -I..\zlib
CFLAGS=-O -m$(MODEL)
LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib
C=.c
O=.obj
@ -19,13 +20,13 @@ E=.exe
all: png2pnm$(E) pnm2png$(E)
png2pnm$(O): png2pnm$(C)
$(CC) -c $(CCFLAGS) png2pnm$(C)
$(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C)
png2pnm$(E): png2pnm$(O)
$(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L)
pnm2png$(O): pnm2png$(C)
$(CC) -c $(CCFLAGS) pnm2png$(C)
$(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C)
pnm2png$(E): pnm2png$(O)
$(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L)
@ -35,4 +36,3 @@ clean:
$(RM) *$(E)
# End of makefile for png2pnm / pnm2png

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.9beta04 - January 10, 2014
libpng version 1.6.9beta04 - January 12, 2014
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.9beta04 - January 10, 2014
libpng versions 0.97, January 1998, through 1.6.9beta04 - January 12, 2014
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -5232,7 +5232,7 @@ Other rules can be inferred by inspecting the libpng source.
XVI. Y2K Compliance in libpng
January 10, 2014
January 12, 2014
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "January 10, 2014"
.TH LIBPNG 3 "January 12, 2014"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.9beta04
.SH SYNOPSIS
@ -504,7 +504,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.9beta04 - January 10, 2014
libpng version 1.6.9beta04 - January 12, 2014
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -515,7 +515,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.9beta04 - January 10, 2014
libpng versions 0.97, January 1998, through 1.6.9beta04 - January 12, 2014
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -5737,7 +5737,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVI. Y2K Compliance in libpng
January 10, 2014
January 12, 2014
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -6028,7 +6028,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.9beta04 - January 10, 2014:
Libpng version 1.6.9beta04 - January 12, 2014:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6051,7 +6051,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.9beta04, January 10, 2014, are
libpng versions 1.2.6, August 15, 2004, through 1.6.9beta04, January 12, 2014, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -6150,7 +6150,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 10, 2014
January 12, 2014
.\" end of man page

View File

@ -1,4 +1,4 @@
.TH LIBPNGPF 3 "January 10, 2014"
.TH LIBPNGPF 3 "January 12, 2014"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.9beta04
(private functions)

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "January 10, 2014"
.TH PNG 5 "January 12, 2014"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

4
png.c
View File

@ -773,13 +773,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.9beta04 - January 10, 2014" PNG_STRING_NEWLINE \
"libpng version 1.6.9beta04 - January 12, 2014" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.9beta04 - January 10, 2014\
return "libpng version 1.6.9beta04 - January 12, 2014\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";

10
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.9beta04 - January 10, 2014
* libpng version 1.6.9beta04 - January 12, 2014
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.9beta04 - January 10, 2014: Glenn
* libpng versions 0.97, January 1998, through 1.6.9beta04 - January 12, 2014: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -221,7 +221,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.6.9beta04, January 10, 2014, are
* libpng versions 1.2.6, August 15, 2004, through 1.6.9beta04, January 12, 2014, are
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@ -333,7 +333,7 @@
* Y2K compliance in libpng:
* =========================
*
* January 10, 2014
* January 12, 2014
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@ -401,7 +401,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.9beta04"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.9beta04 - January 10, 2014\n"
" libpng version 1.6.9beta04 - January 12, 2014\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.6.9beta04 - January 10, 2014
* libpng version 1.6.9beta04 - January 12, 2014
*
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.6.9beta04 - January 10, 2014
libpng version 1.6.9beta04 - January 12, 2014
Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.6.9beta04 - January 10, 2014
* libpng version 1.6.9beta04 - January 12, 2014
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@ -1,5 +1,5 @@
Makefiles for libpng version 1.6.9beta04 - January 10, 2014
Makefiles for libpng version 1.6.9beta04 - January 12, 2014
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile

View File

@ -49,4 +49,4 @@ pngwrite.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,
pngwtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
pngwutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
pngtest.obj : png.h, pngconf.h
pngtest.obj : png.h, pngconf.h, pnglibconf.h

View File

@ -45,8 +45,8 @@ ZLIBINC=/usr/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
# $(WARNMORE) -g -DPNG_DEBUG=5
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
INCPATH=$(prefix)/include
@ -77,8 +77,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -196,7 +199,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
$(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
@ -205,7 +208,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
$(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)

View File

@ -45,8 +45,8 @@ ZLIBINC=/usr/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
# $(WARNMORE) -g -DPNG_DEBUG=5
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
INCPATH=$(prefix)/include
@ -77,8 +77,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -196,7 +199,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
$(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
@ -205,7 +208,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
$(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)

View File

@ -41,42 +41,37 @@ DESTDIR=
DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH)
CDEBUG = -g -DPNG_DEBUG=5
LDDEBUG =
CRELEASE = -O2
LDRELEASE = -s
WARNMORE=-W -Wall
CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm $(LDRELEASE)
# File extensions
O=.o
A=.a
E=
WARNMORE =
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm
# Variables
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
# Targets
all: $(LIBNAME)$(A) pngtest$(E)
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: $(LIBNAME).a pngtest$(E)
include scripts/pnglibconf.mak
REMOVE = $(RM_F)
DFNFLAGS = $(DEFS) $(CPPFLAGS)
$(LIBNAME)$(A): $(OBJS)
$(LIBNAME).a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
test: pngtest$(E)
./pngtest$(E)
pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
pngtest$(E): pngtest.o $(LIBNAME).a
$(LD) -o $@ pngtest.o $(LDFLAGS)
install: $(LIBNAME)$(A)
install: $(LIBNAME).a
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
@ -92,30 +87,30 @@ install: $(LIBNAME)$(A)
$(DI)/$(LIBNAME)/pnglibconf.h
-@$(RM_F) -r $(DI)/libpng
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-@$(RM_F) $(DL)/$(LIBNAME)$(A)
-@$(RM_F) $(DL)/libpng$(A)
cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
chmod 644 $(DL)/$(LIBNAME)$(A)
(cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
-@$(RM_F) $(DL)/$(LIBNAME).a
-@$(RM_F) $(DL)/libpng.a
cp $(LIBNAME).a $(DL)/$(LIBNAME).a
chmod 644 $(DL)/$(LIBNAME).a
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
(cd $(DI); $(LN_SF) libpng/* .;)
clean:
$(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png pnglibconf.h
$(RM_F) *.o $(LIBNAME).a pngtest pngout.png pnglibconf.h
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtest$(O): png.h pngconf.h pnglibconf.h
pngtest.o: png.h pngconf.h pnglibconf.h

View File

@ -9,9 +9,10 @@
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
# rules for library management
#
CFLAGS=-I..\zlib -O
CPPFLAGS = -I..\zlib
CFLAGS = -O
LBR = png.lib
LDFLAGS=-lpng -lz -lm
LDFLAGS = -L. -L..\zlib -lpng -lz -lm
# where make install puts libpng.a and png.h
prefix=/usr/local
@ -36,6 +37,9 @@ OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
all: $(LBR) pngtest.ttp
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
$(LBR): $(OBJS)
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h

View File

@ -43,7 +43,8 @@ LDEBUG=$(LDEBUG) -N
# -d merge duplicate strings
# -k- turn off standard stack frame
# -w display all warnings
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
CPPFLAGS=-I$(ZLIB_DIR)
CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
# -M generate map file
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
@ -89,10 +90,11 @@ LIBNAME=libpng.lib
# Braces let make "batch" calls to the compiler,
# 2 calls instead of 12; space is important.
.c.obj:
$(CC) $(CFLAGS) -c {$*.c }
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
.c.exe:
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
$(LIBNAME) zlib.lib $(NOEHLIB)
.obj.exe:
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)

View File

@ -40,8 +40,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
# still here in R4.5
CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-W -Wall -O1 -funroll-loops $(ALIGN) # $(WARNMORE) -g
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
@ -76,6 +76,9 @@ OBJSDLL = $(OBJS)
.SUFFIXES: .c .o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# try include scripts/pnglibconf.mak for more options
@ -176,14 +179,14 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CFLAGS) \
$(CC) -I$(DI) $(CPPFLAGS) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CFLAGS) \
$(CC) $(CPPFLAGS) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -51,7 +51,8 @@ LDEBUG=$(LDEBUG) -N
# -w set all warnings on
# -O2 optimize for speed
# -Z global optimization
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
CPPFLAGS=-I$(ZLIB_DIR)
CFLAGS=-O2 -Z -X- -w -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
# -M generate map file
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
@ -99,10 +100,11 @@ LIBNAME=libpng$(MODEL).lib
# Braces let make "batch" calls to the compiler,
# 2 calls instead of 12; space is important.
.c.obj:
$(CC) $(CFLAGS) -c {$*.c }
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
.c.exe:
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
$(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
## Major targets

View File

@ -37,8 +37,9 @@ RANLIB=ranlib
RM_F=/bin/rm -f
ARCH=-arch ppc -arch i386 -arch x86_64
# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH)
CPPFLAGS=-I$(ZLIBINC)
# CFLAGS=-W -Wall -O3 -funroll-loops
CFLAGS=-W -Wall -O -funroll-loops $(ARCH)
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz $(ARCH)
INCPATH=$(prefix)/include
@ -69,8 +70,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -176,14 +180,14 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CFLAGS) \
$(CC) $(CPPFLAGS) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -53,13 +53,17 @@ DM=$(DESTDIR)$(MANPATH)
ZLIBLIB=../zlib
ZLIBINC=../zlib
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-std -w1 -O # -g
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options
@ -161,7 +165,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -w1 -I$(DI) -I$(ZLIBINC) \
$(CC) -w1 -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
@ -170,7 +174,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -w1 -I$(ZLIBINC) \
$(CC) -w1 $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -R$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -13,7 +13,8 @@ INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
CC=gcc
CFLAGS=-I../zlib -O -DPNG_NO_SNPRINTF
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
CFLAGS=-O
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
RANLIB=ranlib
@ -22,6 +23,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a pngtest
# see scripts/pnglibconf.mak for more options

View File

@ -54,8 +54,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
CFLAGS=-W -Wall -D_REENTRANT -O2 \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
CPPFLAGS=-D_REENTRANT # -DPNG_DEBUG=5
CFLAGS=-W -Wall -O2 $(ALIGN) # $(WARNMORE) -g
LDFLAGS=-L. -lpng16
LDFLAGS_A=libpng.a -lz -lm
@ -90,6 +90,9 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
@ -111,7 +114,7 @@ libpng.pc:
-e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
libpng.syms: png.h pngconf.h pnglibconf.h
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
$(CC) $(CPPFLAGS) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG16_%s {global:\n",PNGMAJ)}\
{ for (i=1;i+2<=NF;++i)\
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
@ -220,14 +223,14 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -35,12 +35,16 @@ LDADD+= -lm -lz
DPADD+= ${LIBM} ${LIBZ}
CFLAGS+= -I. -I${ZLIBINC}
CPPFLAGS+= -I. -I${ZLIBINC}
CFLAGS+= -W -Wall
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
pngtest: pngtest.o libpng.a
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
-lpng ${LDADD}

View File

@ -18,25 +18,21 @@ AR_RC = ar rcs
RANLIB = ranlib
RM_F = rm -f
CDEBUG = -g -DPNG_DEBUG=5
LDDEBUG =
CRELEASE = -O2
LDRELEASE = -s
#CFLAGS = -W -Wall $(CDEBUG)
CFLAGS = -W -Wall $(CRELEASE)
#LDFLAGS = $(LDDEBUG)
LDFLAGS = $(LDRELEASE)
WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
LDFLAGS =
LIBS = -lz -lm
# File extensions
O=.o
A=.a
EXE=
EXEEXT =
# Variables
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
# Targets
all: static
@ -45,43 +41,43 @@ all: static
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@
.c$(O):
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
static: libpng$(A) pngtest$(EXE)
static: libpng.a pngtest$(EXEEXT)
shared:
@echo This is a generic makefile that cannot create shared libraries.
@echo Please use a configuration that is specific to your platform.
@false
libpng$(A): $(OBJS)
libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
test: pngtest$(EXE)
./pngtest$(EXE)
test: pngtest$(EXEEXT)
./pngtest$(EXEEXT)
pngtest$(EXE): pngtest$(O) libpng$(A)
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
pngtest$(EXEEXT): pngtest.o libpng.a
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
clean:
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h
$(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtest$(O): png.h pngconf.h pnglibconf.h
pngtest.o: png.h pngconf.h pnglibconf.h

View File

@ -36,11 +36,11 @@ LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
CPPFLAGS=-I$(ZLIBINC) \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_UNISTD_H -DUSE_MMAP
CFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
# Caution: be sure you have built zlib with the same CFLAGS.
CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
@ -75,8 +75,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) +z -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -179,7 +182,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
$(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
@ -188,7 +191,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) $(CCFLAGS) \
$(CC) $(CPPFLAGS) $(CCFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -53,8 +53,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-W -Wall -O3 -funroll-loops $(ALIGN) # $(WARNMORE) -g
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
@ -86,8 +86,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -185,7 +188,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
@ -194,7 +197,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -14,7 +14,8 @@ ZLIBINC=/opt/zlib/include
# Note that if you plan to build a libpng shared library, zlib must also
# be a shared library, which zlib's configure does not do. After running
# zlib's configure, edit the appropriate lines of makefile to read:
# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
# CPPFLAGS=-DHAVE_UNISTD -DUSE_MAP
# CFLAGS=-O1 -fPIC
# LDSHARED=ld -b
# SHAREDLIB=libz.sl
@ -44,9 +45,10 @@ LIBPATH=$(exec_prefix)/lib
MANPATH=$(prefix)/man
BINPATH=$(exec_prefix)/bin
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
CPPFLAGS=-I$(ZLIBINC)
CFLAGS=-O -Ae +DA1.1 +DS2.0
# Caution: be sure you have built zlib with the same CFLAGS.
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
CCFLAGS=-O -Ae +DA1.1 +DS2.0
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
# override DESTDIR= on the make install command line to easily support
@ -72,8 +74,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) +z -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -176,7 +181,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
$(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
@ -185,7 +190,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) $(CCFLAGS) \
$(CC) $(CPPFLAGS) $(CCFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -23,7 +23,8 @@ LD = ilink
AR = ilib
RM = del
CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
CPPFLAGS = -I$(ZLIBINC)
CFLAGS = -Mc -O2 -W3
LDFLAGS =
# File extensions
@ -39,6 +40,9 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
# Targets
.c$(O):
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
all: libpng$(A) pngtest$(E)
# see scripts/pnglibconf.mak for more options

View File

@ -32,7 +32,8 @@ CALLING=r # __fastcall
# --------------------------------------------------------------------------
CC=icl -c
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
CPPFLAGS=-I$(ZLIBINC)
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo
LD=link
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
@ -49,49 +50,49 @@ pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS)
if exist libpng.lib del libpng.lib
@ -101,7 +102,7 @@ pngtest.exe: pngtest.obj libpng.lib
$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
pngtest$(O): png.h pngconf.h pnglibconf.h
$(CC) $(CFLAGS) $*.c $(ERRFILE)
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
test: pngtest.exe
pngtest.exe

View File

@ -27,7 +27,8 @@ LIBPATH=$(prefix)/lib
DESTDIR=
CC = cc
CFLAGS=-I../zlib -O
CPPFLAGS = -I../zlib
CFLAGS = -O
LDFLAGS = -L. -L../zlib/ -lpng -lz -lm
# flags for ansi2knr
ANSI2KNRFLAGS=
@ -48,12 +49,12 @@ pnglibconf.h: scripts/pnglibconf.h.prebuilt
# general rule to allow ansi2knr to work
.c.o:
./ansi2knr $*.c T$*.c
$(CC) $(CFLAGS) -c T$*.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c T$*.c
rm -f T$*.c $*.o
mv T$*.o $*.o
ansi2knr: ansi2knr.c
$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
libpng.a: ansi2knr $(OBJS)
ar rc $@ $(OBJS)

View File

@ -48,7 +48,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS= -W -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
@ -82,6 +83,9 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
@ -196,14 +200,14 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -22,7 +22,8 @@ LIBPATH=$(prefix)/lib
DESTDIR=
CC=cc
CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
CPPFLAGS=-I../zlib -DSYSV -Dmips
CFLAGS=-O -systype sysv -w
#CFLAGS=-O
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
@ -33,6 +34,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a pngtest
# see scripts/pnglibconf.mak for more options

View File

@ -10,7 +10,8 @@
# -------- Microsoft C 5.1 and later, does not use assembler code --------
MODEL=L
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
CPPFLAGS=-I..\zlib
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL)
#-Ox generates bad code with MSC 5.1
CC=cl
LD=link
@ -32,49 +33,49 @@ pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
del libpng.lib
@ -83,7 +84,7 @@ libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
lib libpng $(OBJS3);
pngtest$(O): png.h pngconf.h pnglibconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngtest.exe: pngtest.obj libpng.lib
$(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;

View File

@ -44,20 +44,13 @@ LN_SF=ln -sf
#ARCH = -march=pentium3
#ARCH = -march=i686
ARCH =
CDEBUG = -g -DPNG_DEBUG=5
LDDEBUG =
CRELEASE = -O2
LDRELEASE = -s
#CFLAGS = -W -Wall $(CDEBUG)
CFLAGS = -W -Wall $(CRELEASE) $(ARCH)
#LDFLAGS = $(LDDEBUG)
LDFLAGS = $(LDRELEASE)
CPPFLAGS = # -DPNG_DEBUG=5
CFLAGS = -W -Wall -O2 $(ARCH) # -g
LDFLAGS =
LIBS = -lz -lm
# File extensions
O=.o
A=.a
EXE=.exe
EXEEXT=.exe
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@ -81,9 +74,9 @@ DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH)
# Variables
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
# Targets
all: static shared
@ -92,10 +85,10 @@ all: static shared
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@
.c$(O):
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
static: libpng$(A) pngtest$(EXE)
static: libpng.a pngtest$(EXEEXT)
shared: $(LIBSOMAJ)
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSO)
@ -106,7 +99,7 @@ $(LIBSO): $(LIBSOMAJ)
$(LIBSOMAJ):
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ)
libpng$(A): $(OBJS)
libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
@ -175,30 +168,30 @@ install-config: libpng-config
install: install-static install-shared install-man install-config
test: pngtest$(EXE)
./pngtest$(EXE)
test: pngtest$(EXEEXT)
./pngtest$(EXEEXT)
pngtest$(EXE): pngtest$(O) libpng$(A)
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
pngtest$(EXEEXT): pngtest.o libpng.a
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
clean:
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h $(LIBSO) \
$(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h $(LIBSO) \
$(LIBSOMAJ) libpng-config
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtest$(O): png.h pngconf.h pnglibconf.h
pngtest.o: png.h pngconf.h pnglibconf.h

View File

@ -34,6 +34,9 @@ CPPFLAGS+=-I${.CURDIR}
CLEANFILES+=pngtest.o pngtest pnglibconf.h
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# see scripts/pnglibconf.mak for more options
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@

View File

@ -34,6 +34,9 @@ CPPFLAGS+=-I${.CURDIR}
CLEANFILES+=pngtest.o pngtest pnglibconf.h
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# see scripts/pnglibconf.mak for more options
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@

View File

@ -31,6 +31,9 @@ MAN= libpng.3 libpngpf.3 png.5
DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
libpng-manual.txt
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# see scripts/pnglibconf.mak for more options
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@

View File

@ -37,7 +37,8 @@ exec_prefix=$(prefix)
ZLIBLIB=../zlib
ZLIBINC=../zlib
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
CPPFLAGS=-I$(ZLIBINC)
CFLAGS= -dy -belf -O3
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
INCPATH=$(prefix)/include
@ -68,8 +69,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -175,14 +179,14 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CFLAGS) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CFLAGS) \
$(CC) $(CPPFLAGS) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`

View File

@ -42,8 +42,9 @@ ZLIBINC=../zlib
# See "man abi". zlib must be built with the same ABI.
ABI=
WARNMORE= # -g -DPNG_DEBUG=5
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
WARNMORE=
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
-set_version sgi$(PNGMAJ).0
@ -74,6 +75,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a pngtest shared libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options
@ -182,7 +186,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-rpath $(ZLIBLIB):$(DL) \
@ -192,7 +196,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \

View File

@ -44,8 +44,9 @@ ABI=
WARNMORE=-fullwarn
# Note: -KPIC is the default anyhow
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
CFLAGS=$(ABI) -O $(WARNMORE)
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
@ -77,6 +78,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a pngtest shared libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options
@ -182,7 +186,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) \
-rpath $(ZLIBLIB):$(DL) \
@ -192,7 +196,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) \
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \

View File

@ -46,8 +46,9 @@ ZLIBINC=/usr/include
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
#CFLAGS=-W -Wall -O3 $(WARNMORE) -g
CFLAGS=-O3
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
INCPATH=$(prefix)/include
@ -78,8 +79,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -194,7 +198,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
@ -203,7 +207,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
-L$(ZLIBLIB) -R$(ZLIBLIB)

View File

@ -42,7 +42,8 @@ ZLIBINC=/usr/local/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS= -W -Wall -O \
# $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
@ -74,8 +75,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@ -191,7 +195,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
@ -200,7 +204,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
-L$(ZLIBLIB) -R$(ZLIBLIB)

View File

@ -42,8 +42,8 @@ ZLIBINC=/usr/local/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
# $(WARNMORE) -g -DPNG_DEBUG=5
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-W -Wall -O # $(WARNMORE) -g
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
INCPATH=$(prefix)/include
@ -74,6 +74,9 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
@ -191,7 +194,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
$(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
@ -200,7 +203,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
$(CC) -I$(ZLIBINC) \
$(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
-L$(ZLIBLIB) -R$(ZLIBLIB)

View File

@ -40,13 +40,17 @@ ECHO = echo
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
DFA_EXTRA = # extra files that can be used to control configuration
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS = -O # -g
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a pngtest
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,

View File

@ -39,13 +39,17 @@ LN_SF=ln -f -s
RANLIB=ranlib
RM_F=/bin/rm -f
CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-O # $(WARNMORE)
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
all: libpng.a pngtest
# see scripts/pnglibconf.mak for more options

View File

@ -3,11 +3,11 @@
# To use, do "make -fmakefile.tc3"
# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
# ----- Turbo C++ 3.0 -----
MODEL=l
CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
CPPFLAGS=-I..\zlib
CFLAGS=-O2 -Z -m$(MODEL)
CC=tcc
LD=tcc
LIB=tlib
@ -35,52 +35,52 @@ test: pngtest$(E)
pngtest$(E)
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngtest$(O): png.h pngconf.h pnglibconf.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
$(LIB) libpng$(MODEL) +$(OBJSL1)

View File

@ -15,7 +15,8 @@
CC = cl
LD = link
AR = lib
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 -I..\zlib
CPPFLAGS = -I..\zlib
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3
LDFLAGS = -nologo
ARFLAGS = -nologo
RM = del
@ -40,56 +41,56 @@ pnglibconf.h: scripts\pnglibconf.h.prebuilt
copy scripts\pnglibconf.h.prebuilt $@
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS)
-$(RM) $@
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
pngtest$(O): png.h pngconf.h pnglibconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
pngtest.exe: pngtest$(O) libpng.lib
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)

View File

@ -2,7 +2,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng version 1.6.9beta04 - January 10, 2014 */
/* Libpng version 1.6.9beta04 - January 12, 2014 */
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */