mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
scripts: Clean up the makefiles
Delete variables (ALIGN, ARCH, DOCS) and targets (writelock) that are no longer necessary. Reorder the object file lists alphabetically, consistently across all makefiles and build scripts. Apply other minor fixes.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
||||
# Copyright (C) 1998,1999,2002,2006,2008,2010-2014,2017 Greg Roelofs and
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014, 2017 Greg Roelofs and
|
||||
# Glenn Randers-Pehrson
|
||||
# Copyright (C) 1996,1997 Andreas Dilger
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
#
|
||||
# This code is released under the libpng license.
|
||||
# For conditions of distribution and use, see the disclaimer
|
||||
@@ -39,25 +40,18 @@ exec_prefix=$(prefix)
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
ALIGN=
|
||||
# for i386:
|
||||
#ALIGN=-malign-loops=2 -malign-functions=2
|
||||
|
||||
#WARNMORE=-Wwrite-strings -Wpointer-arith \
|
||||
# -Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
# -Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
CPPFLAGS=-I$(ZLIBINC)
|
||||
CPPFLAGS += -DPNG_ARM_NEON
|
||||
CPPFLAGS += -DPNG_MIPS_MSA
|
||||
CPPFLAGS += -DPNG_INTEL_SSE
|
||||
CPPFLAGS += -DPNG_POWERPC_VSX
|
||||
CPPFLAGS+=-ansi -pedantic -Wextra -Wall -Wshadow -Wno-sign-conversion
|
||||
CPPFLAGS+=-W -Wall -Wconversion $(ALIGN)
|
||||
# CPPFLAGS+=$(WARNMORE)
|
||||
CFLAGS= -O3 -funroll-loops
|
||||
|
||||
CFLAGS=-W -Wall -O3 -funroll-loops # $(WARNMORE) -g
|
||||
CFLAGS += -ansi -pedantic
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||
@@ -86,13 +80,14 @@ DM=$(DESTDIR)$(MANPATH)
|
||||
# See scripts/pnglibconf.mak for more options
|
||||
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||
|
||||
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 \
|
||||
arm/arm_init.o arm/filter_neon_intrinsics.o \
|
||||
mips/mips_init.o mips/filter_msa_intrinsics.o \
|
||||
intel/intel_init.o intel/filter_sse2_intrinsics.o\
|
||||
powerpc/powerpc_init.o powerpc/filter_vsx_intrinsics.o
|
||||
# File lists
|
||||
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 \
|
||||
arm/arm_init.o arm/filter_neon_intrinsics.o \
|
||||
intel/intel_init.o intel/filter_sse2_intrinsics.o \
|
||||
mips/mips_init.o mips/filter_msa_intrinsics.o \
|
||||
powerpc/powerpc_init.o powerpc/filter_vsx_intrinsics.o
|
||||
|
||||
OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
|
||||
@@ -178,7 +173,6 @@ install-shared: install-headers $(LIBSOMAJ) libpng.pc
|
||||
(cd $(DL); \
|
||||
$(LN_SF) $(LIBSOREL) $(LIBSO); \
|
||||
$(LN_SF) $(LIBSO) $(OLDSO))
|
||||
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||
@@ -221,6 +215,8 @@ test-dd:
|
||||
./pngtestd pngtest.png
|
||||
|
||||
test-installed:
|
||||
echo
|
||||
echo Testing installed dynamic shared library.
|
||||
$(CC) $(CPPFLAGS) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||
@@ -228,38 +224,35 @@ test-installed:
|
||||
./pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
||||
libpng.pc pnglibconf.h
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
|
||||
writelock:
|
||||
chmod a-w *.[ch35] $(DOCS) scripts/*
|
||||
$(RM_F) $(OBJS) $(OBJSDLL) libpng.a
|
||||
$(RM_F) pngtest*.o pngtest pngtesti pngtest-static pngout.png
|
||||
$(RM_F) $(LIBSO) $(LIBSOMAJ)*
|
||||
$(RM_F) libpng.pc pnglibconf.h libpng-config
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
arm/arm_init.o arm/arm_init.o: pngpriv.h
|
||||
arm/filter_neon_intrinsics.o arm/filter_neon_intrinsics.pic.o: pngpriv.h
|
||||
mips/mips_init.o mips/mips_init.pic.o: pngpriv.h
|
||||
mips/filter_msa_intrinsics.o mips/filter_msa_intrinsics.pic.: pngpriv.h
|
||||
intel/intel_init.o intel/intel_init.pic.: pngpriv.h
|
||||
intel/filter_sse2_intrinsics.o intel/filter_sse2_intrinsics.pic.: pngpriv.h
|
||||
powerpc/powerpc_init.o powerpc/powerpc_init.pic.: pngpriv.h
|
||||
powerpc/filter_vsx_intrinsics.o powerpc/filter_vsx_intrinsics.pic.: pngpriv.h
|
||||
arm/arm_init.o arm/arm_init.o: pngpriv.h
|
||||
arm/filter_neon_intrinsics.o arm/filter_neon_intrinsics.pic.o: pngpriv.h
|
||||
intel/intel_init.o intel/intel_init.pic.o: pngpriv.h
|
||||
intel/filter_sse2_intrinsics.o intel/filter_sse2_intrinsics.pic.o: pngpriv.h
|
||||
mips/mips_init.o mips/mips_init.pic.o: pngpriv.h
|
||||
mips/filter_msa_intrinsics.o mips/filter_msa_intrinsics.pic.o: pngpriv.h
|
||||
powerpc/powerpc_init.o powerpc/powerpc_init.pic.o: pngpriv.h
|
||||
powerpc/filter_vsx_intrinsics.o powerpc/filter_vsx_intrinsics.pic.o: pngpriv.h
|
||||
|
||||
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||
|
||||
Reference in New Issue
Block a user