mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
build: Update scripts/makefile.*
Apply the following updates: * Tidy up the compiler flag definitions. * Update the Darwin, Linux and MSYS makefiles to match the compiler flags used in scripts/makefile.clang and scripts/makefile.gcc. * Add the `pngtest-static` target in the Darwin makefile, following on the Linux makefile. * Rewrite some of the implicit make rules to match one another more consistently. * Make corrections in the copyright years to match git log.
This commit is contained in:
parent
36a16fd761
commit
9cc729b523
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -36,13 +36,10 @@ SUN_LD_FLAGS=-fast -xtarget=ultra
|
|||||||
ZLIBLIB=/usr/lib
|
ZLIBLIB=/usr/lib
|
||||||
ZLIBINC=/usr/include
|
ZLIBINC=/usr/include
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
|
CFLAGS=$(SUN_CC_FLAGS) # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm # -g
|
||||||
|
|
||||||
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
@ -53,7 +50,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -36,13 +36,10 @@ SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
|
|||||||
ZLIBLIB=/usr/lib
|
ZLIBLIB=/usr/lib
|
||||||
ZLIBINC=/usr/include
|
ZLIBINC=/usr/include
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
|
CFLAGS=$(SUN_CC_FLAGS) # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||||
|
|
||||||
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
@ -53,7 +50,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using gcc (generic, static library)
|
# makefile for libpng using gcc (generic, static library)
|
||||||
# Copyright (C) 2000, 2020-2024 Cosmin Truta
|
# Copyright (C) 2000, 2020-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
@ -22,9 +22,8 @@ RM_F = rm -f
|
|||||||
LIBNAME = libpng16
|
LIBNAME = libpng16
|
||||||
PNGMAJ = 16
|
PNGMAJ = 16
|
||||||
|
|
||||||
WARNMORE =
|
|
||||||
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
|
CFLAGS = -O2 # -g
|
||||||
ARFLAGS = rc
|
ARFLAGS = rc
|
||||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: $(LIBNAME).a pngtest
|
all: $(LIBNAME).a pngtest
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2022 Cosmin Truta
|
# Copyright (C) 2022-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -28,7 +28,7 @@ OBJS = $(LBR)(png.o) $(LBR)(pngerror.o) $(LBR)(pngget.o) $(LBR)(pngmem.o) \
|
|||||||
all: $(LBR) pngtest.ttp
|
all: $(LBR) pngtest.ttp
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
$(LBR): $(OBJS)
|
$(LBR): $(OBJS)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on BeOS x86 ELF with gcc
|
# makefile for libpng on BeOS x86 ELF with gcc
|
||||||
# modified from makefile.linux by Sander Stoks
|
# modified from makefile.linux by Sander Stoks
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2020-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1999 Greg Roelofs
|
# Copyright (C) 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -33,14 +33,10 @@ ALIGN=
|
|||||||
# For i386:
|
# For i386:
|
||||||
# ALIGN=-malign-loops=2 -malign-functions=2
|
# ALIGN=-malign-loops=2 -malign-functions=2
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
|
||||||
|
|
||||||
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
||||||
# still here in R4.5
|
# still here in R4.5
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g
|
CFLAGS=-O1 -funroll-loops $(ALIGN) # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
||||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
|
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
|
||||||
@ -58,7 +54,7 @@ OBJSDLL = $(OBJS)
|
|||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest
|
all: libpng.a $(LIBSO) pngtest
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Darwin / macOS
|
# makefile for libpng on Darwin / macOS
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2014, 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001 Christoph Pfisterer
|
# Copyright (C) 2001 Christoph Pfisterer
|
||||||
# derived from makefile.linux:
|
# derived from makefile.linux:
|
||||||
@ -10,10 +10,6 @@
|
|||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
# and license in png.h
|
# and license in png.h
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
|
||||||
ZLIBLIB=/usr/lib
|
|
||||||
ZLIBINC=/usr/include
|
|
||||||
|
|
||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME=libpng16
|
LIBNAME=libpng16
|
||||||
PNGMAJ=16
|
PNGMAJ=16
|
||||||
@ -30,13 +26,22 @@ LN_SF=ln -sf
|
|||||||
CP=cp
|
CP=cp
|
||||||
RM_F=rm -f
|
RM_F=rm -f
|
||||||
|
|
||||||
NOHWOPT=-DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
# Compiler and linker flags
|
||||||
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
||||||
DEFS=$(NOHWOPT)
|
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
||||||
CPPFLAGS=-I$(ZLIBINC) $(DEFS)
|
STDC = -pedantic-errors
|
||||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef
|
WARN = -Wall -Wextra -Wundef
|
||||||
ARFLAGS=rc
|
WARNMORE = -Wcast-align -Wconversion -Wshadow -Wpointer-arith -Wwrite-strings \
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
|
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
|
||||||
|
LOCAL_CPPFLAGS = $(NOHWOPT)
|
||||||
|
CPPFLAGS = # -DPNG_DEBUG=5
|
||||||
|
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)
|
||||||
|
LOCAL_CFLAGS = $(STDC) $(WARN) # $(WARNMORE)
|
||||||
|
CFLAGS = -O3 -funroll-loops # -g
|
||||||
|
ALL_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
|
||||||
|
ARFLAGS = rc
|
||||||
|
LDFLAGS = -L. -lpng16 -lz # -g
|
||||||
|
LDFLAGS_A = libpng.a -lz -lm # -g
|
||||||
|
|
||||||
# Pre-built configuration
|
# Pre-built configuration
|
||||||
# See scripts/pnglibconf.mak for more options
|
# See scripts/pnglibconf.mak for more options
|
||||||
@ -52,12 +57,12 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fno-common -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest
|
all: libpng.a $(LIBSO) pngtest pngtest-static
|
||||||
|
|
||||||
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
@ -71,15 +76,25 @@ $(LIBSO): $(LIBSOMAJ)
|
|||||||
|
|
||||||
$(LIBSOMAJ): $(OBJSDLL)
|
$(LIBSOMAJ): $(OBJSDLL)
|
||||||
$(CC) -dynamiclib \
|
$(CC) -dynamiclib \
|
||||||
-current_version 16 -compatibility_version 16 \
|
-current_version 16 -compatibility_version 16 \
|
||||||
-o $(LIBSOMAJ) \
|
-o $(LIBSOMAJ) \
|
||||||
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
$(OBJSDLL) -lz
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBSO)
|
pngtest: pngtest.o $(LIBSO)
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
test: pngtest
|
pngtest-static: pngtest.o libpng.a
|
||||||
|
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
|
||||||
|
|
||||||
|
test: pngtest pngtest-static
|
||||||
|
@echo ""
|
||||||
|
@echo " Running pngtest dynamically linked with $(LIBSO):"
|
||||||
|
@echo ""
|
||||||
./pngtest
|
./pngtest
|
||||||
|
@echo ""
|
||||||
|
@echo " Running pngtest statically linked with libpng.a:"
|
||||||
|
@echo ""
|
||||||
|
./pngtest-static
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@echo "The $@ target is no longer supported by this makefile."
|
@echo "The $@ target is no longer supported by this makefile."
|
||||||
@ -94,8 +109,9 @@ install-shared:
|
|||||||
@false
|
@false
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *.o libpng.a pngtest pngout.png
|
$(RM_F) $(OBJS) $(OBJSDLL) libpng.a
|
||||||
$(RM_F) $(LIBNAME).*dylib pnglibconf.h
|
$(RM_F) $(LIBNAME).*dylib pnglibconf.h
|
||||||
|
$(RM_F) pngtest*.o pngtest pngtest-static pngout.png
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on DEC Alpha Unix
|
# makefile for libpng on DEC Alpha Unix
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2020-2025 Cosmin Truta
|
||||||
# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -30,7 +30,7 @@ ZLIBLIB=../zlib
|
|||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=-std -w1 -O # -g
|
CFLAGS=-std -w1 -O
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: $(LIBSO) libpng.a pngtest
|
all: $(LIBSO) libpng.a pngtest
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# DJGPP (DOS gcc) makefile for libpng
|
# DJGPP (DOS gcc) makefile for libpng
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2020-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -11,7 +11,7 @@ CC=gcc
|
|||||||
AR=ar
|
AR=ar
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
|
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
|
||||||
CFLAGS=-O
|
CFLAGS=-O2 -Wall -Wextra -Wundef
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng under FreeBSD
|
# makefile for libpng under FreeBSD
|
||||||
# Copyright (C) 2020-2022 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
|
# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||||
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||||
#
|
#
|
||||||
@ -35,7 +35,7 @@ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
|||||||
pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
|
pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
|
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $*.c
|
||||||
|
|
||||||
pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
||||||
cp ${PNGLIBCONF_H_PREBUILT} $@
|
cp ${PNGLIBCONF_H_PREBUILT} $@
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
@ -56,7 +56,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001, Laurent faillie
|
# Copyright (C) 2001, Laurent faillie
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
@ -37,12 +37,8 @@ ZLIBINC=/opt/zlib/include
|
|||||||
# LDSHARED=ld -b
|
# LDSHARED=ld -b
|
||||||
# SHAREDLIB=libz.sl
|
# SHAREDLIB=libz.sl
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
|
||||||
|
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
|
CFLAGS=-O3 -funroll-loops # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
|
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||||
@ -56,7 +52,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
@ -55,7 +55,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Makefile for libpng (static)
|
# Makefile for libpng (static)
|
||||||
# IBM C version 3.x for Win32 and OS/2
|
# IBM C version 3.x for Win32 and OS/2
|
||||||
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000, 2020 Cosmin Truta
|
# Copyright (C) 2000, 2020-2025 Cosmin Truta
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@ -46,7 +46,7 @@ LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
|
|||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
all: libpng$(A) pngtest$(E)
|
all: libpng$(A) pngtest$(E)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
||||||
# Glenn Randers-Pehrson
|
# Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -24,24 +24,22 @@ LN_SF=ln -sf
|
|||||||
CP=cp
|
CP=cp
|
||||||
RM_F=rm -f
|
RM_F=rm -f
|
||||||
|
|
||||||
# Where the zlib library and include files are located.
|
|
||||||
#ZLIBLIB=/usr/local/lib
|
|
||||||
#ZLIBINC=/usr/local/include
|
|
||||||
ZLIBLIB=../zlib
|
|
||||||
ZLIBINC=../zlib
|
|
||||||
|
|
||||||
# Compiler and linker flags
|
# Compiler and linker flags
|
||||||
NOHWOPT=-DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
||||||
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
STDC = -pedantic-errors
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
WARN = -Wall -Wextra -Wundef
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
WARNMORE = -Wcast-align -Wconversion -Wshadow -Wpointer-arith -Wwrite-strings \
|
||||||
DEFS=$(NOHWOPT)
|
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
|
||||||
CPPFLAGS=-I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
|
LOCAL_CPPFLAGS = $(NOHWOPT)
|
||||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
|
CPPFLAGS = # -DPNG_DEBUG=5
|
||||||
ARFLAGS=rc
|
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)
|
||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
|
LOCAL_CFLAGS = $(STDC) $(WARN) # $(WARNMORE)
|
||||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g
|
CFLAGS = -O3 -funroll-loops # -g
|
||||||
|
ALL_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
|
||||||
|
ARFLAGS = rc
|
||||||
|
LDFLAGS = -L. -Wl,-rpath,. -lpng16 -lz -lm # -g
|
||||||
|
LDFLAGS_A = libpng.a -lz -lm # -g
|
||||||
|
|
||||||
# Pre-built configuration
|
# Pre-built configuration
|
||||||
# See scripts/pnglibconf.mak for more options
|
# See scripts/pnglibconf.mak for more options
|
||||||
@ -57,10 +55,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest pngtest-static
|
all: libpng.a $(LIBSO) pngtest pngtest-static
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 1998-2014 Glenn Randers-Pehrson
|
# Copyright (C) 1998-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -26,7 +26,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using MSYS/gcc (shared, static library)
|
# makefile for libpng using MSYS/gcc (shared, static library)
|
||||||
# Copyright (C) 2000, 2019-2024 Cosmin Truta
|
# Copyright (C) 2000, 2019-2025 Cosmin Truta
|
||||||
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
||||||
#
|
#
|
||||||
# Portions taken from makefile.linux and makefile.gcc:
|
# Portions taken from makefile.linux and makefile.gcc:
|
||||||
@ -21,23 +21,28 @@ PNGMAJ=16
|
|||||||
LIBSO=$(LIBNAME).dll
|
LIBSO=$(LIBNAME).dll
|
||||||
LIBSOMAJ=$(LIBNAME).dll.$(PNGMAJ)
|
LIBSOMAJ=$(LIBNAME).dll.$(PNGMAJ)
|
||||||
|
|
||||||
# Where the zlib library and include files are located.
|
|
||||||
#ZLIBLIB=../zlib
|
|
||||||
#ZLIBINC=../zlib
|
|
||||||
ZLIBLIB=/usr/local/lib
|
|
||||||
ZLIBINC=/usr/local/include
|
|
||||||
|
|
||||||
# Compiler, linker, lib and other tools
|
# Compiler, linker, lib and other tools
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
AR = ar
|
AR = ar
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
CP = cp
|
CP = cp
|
||||||
RM_F = rm -rf
|
RM_F = rm -f
|
||||||
LN_SF = ln -sf
|
LN_SF = ln -sf
|
||||||
|
|
||||||
|
# Compiler and linker flags
|
||||||
|
NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
||||||
|
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
||||||
|
STDC = -pedantic-errors
|
||||||
|
WARN = -Wall -Wextra -Wundef
|
||||||
|
WARNMORE = -Wcast-align -Wconversion -Wshadow -Wpointer-arith -Wwrite-strings \
|
||||||
|
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
|
||||||
|
LOCAL_CPPFLAGS = $(NOHWOPT)
|
||||||
CPPFLAGS = # -DPNG_DEBUG=5
|
CPPFLAGS = # -DPNG_DEBUG=5
|
||||||
CFLAGS = -O2 -Wall -Wextra -Wundef # -g
|
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)
|
||||||
|
LOCAL_CFLAGS = $(STDC) $(WARN) # $(WARNMORE)
|
||||||
|
CFLAGS = -O2 # -g
|
||||||
|
ALL_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
|
||||||
ARFLAGS = rc
|
ARFLAGS = rc
|
||||||
LDFLAGS = # -g
|
LDFLAGS = # -g
|
||||||
LIBS = -lz -lm
|
LIBS = -lz -lm
|
||||||
@ -61,7 +66,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
|||||||
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
static: libpng.a pngtest$(EXEEXT)
|
static: libpng.a pngtest$(EXEEXT)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on NetBSD
|
# makefile for libpng on NetBSD
|
||||||
# Copyright (C) 2020-2022 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2002 Patrick R.L. Welche
|
# Copyright (C) 2002 Patrick R.L. Welche
|
||||||
#
|
#
|
||||||
@ -32,7 +32,7 @@ PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
|||||||
# .endif
|
# .endif
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
|
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $*.c
|
||||||
|
|
||||||
pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
||||||
cp ${PNGLIBCONF_H_PREBUILT} $@
|
cp ${PNGLIBCONF_H_PREBUILT} $@
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2020-2022 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -26,7 +26,7 @@ CLEANFILES+= pngtest.o pngtest pnglibconf.h
|
|||||||
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
|
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $*.c
|
||||||
|
|
||||||
pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
||||||
cp ${PNGLIBCONF_H_PREBUILT} $@
|
cp ${PNGLIBCONF_H_PREBUILT} $@
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
# Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
|
# Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
|
||||||
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -50,7 +50,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -35,9 +35,8 @@ ZLIBINC=../zlib
|
|||||||
# See "man abi". zlib must be built with the same ABI.
|
# See "man abi". zlib must be built with the same ABI.
|
||||||
ABI=
|
ABI=
|
||||||
|
|
||||||
WARNMORE=
|
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
|
CFLAGS=$(ABI) -O -fPIC -mabi=n32 # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
@ -53,7 +52,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a pngtest shared
|
all: libpng.a pngtest shared
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -35,11 +35,10 @@ ZLIBINC=../zlib
|
|||||||
# See "man abi". zlib must be built with the same ABI.
|
# See "man abi". zlib must be built with the same ABI.
|
||||||
ABI=
|
ABI=
|
||||||
|
|
||||||
WARNMORE=-fullwarn
|
|
||||||
# Note: -KPIC is the default anyhow
|
# Note: -KPIC is the default anyhow
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
|
#CFLAGS=$(ABI) -O -fullwarn -KPIC # -g
|
||||||
CFLAGS=$(ABI) -O $(WARNMORE) # -g
|
CFLAGS=$(ABI) -O -fullwarn # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
||||||
@ -56,7 +55,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a pngtest shared
|
all: libpng.a pngtest shared
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
||||||
# Updated by Chad Schrock for Solaris 9
|
# Updated by Chad Schrock for Solaris 9
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998-2001 Greg Roelofs
|
# Copyright (C) 1998-2001 Greg Roelofs
|
||||||
# Copyright (C) 1996-1997 Andreas Dilger
|
# Copyright (C) 1996-1997 Andreas Dilger
|
||||||
@ -19,7 +19,6 @@ LIBSO=$(LIBNAME).so
|
|||||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||||
|
|
||||||
# Utilities:
|
# Utilities:
|
||||||
# gcc 2.95 doesn't work.
|
|
||||||
CC=cc
|
CC=cc
|
||||||
AR=ar
|
AR=ar
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
@ -56,7 +55,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Solaris 2.x with gcc
|
# makefile for libpng on Solaris 2.x with gcc
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
@ -34,11 +34,8 @@ RM_F=/bin/rm -f
|
|||||||
ZLIBLIB=/usr/local/lib
|
ZLIBLIB=/usr/local/lib
|
||||||
ZLIBINC=/usr/local/include
|
ZLIBINC=/usr/local/include
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
|
||||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g
|
CFLAGS=-O # -g
|
||||||
ARFLAGS=rc
|
ARFLAGS=rc
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||||
|
|
||||||
@ -55,7 +52,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2015, 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -23,7 +23,7 @@ RM_F = rm -f
|
|||||||
AWK = awk
|
AWK = awk
|
||||||
|
|
||||||
NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
|
||||||
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
-DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
|
||||||
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
||||||
DFA_EXTRA = # extra files that can be used to control configuration
|
DFA_EXTRA = # extra files that can be used to control configuration
|
||||||
CPPFLAGS = -I$(ZLIBINC) $(NOHWOPT) # -DPNG_DEBUG=5
|
CPPFLAGS = -I$(ZLIBINC) $(NOHWOPT) # -DPNG_DEBUG=5
|
||||||
@ -41,7 +41,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2020-2024 Cosmin Truta
|
# Copyright (C) 2018-2025 Cosmin Truta
|
||||||
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -33,7 +33,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
|||||||
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user