aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadaf Ebrahimi <sadafebrahimi@google.com>2023-02-15 23:40:19 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-02-15 23:40:19 +0000
commit725d7d60eedfcb59eafeca3b144194baa8164147 (patch)
tree68c45f923408e540b3e415fc671de3d73e3b2b24
parent1a56ed26ad9357b85375cc92a4eaffbeb88626cc (diff)
parentc05ebac4402364fe0f5dd8472b087d4021313316 (diff)
downloadlibpng-725d7d60eedfcb59eafeca3b144194baa8164147.tar.gz
Merge "Upgrade libpng to v1.6.39" am: cb9e209cab am: c05ebac440
Original change: https://android-review.googlesource.com/c/platform/external/libpng/+/2435872 Change-Id: I1f08558da6b79ca77bcc65ab0552010aec33166f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.gitignore3
-rw-r--r--ANNOUNCE30
-rw-r--r--AUTHORS3
-rw-r--r--CHANGES22
-rw-r--r--CMakeLists.txt7
-rw-r--r--INSTALL10
-rw-r--r--METADATA8
-rw-r--r--README137
-rw-r--r--arm/arm_init.c5
-rwxr-xr-xconfigure24
-rw-r--r--configure.ac14
-rw-r--r--contrib/arm-neon/android-ndk.c2
-rw-r--r--contrib/arm-neon/linux-auxv.c2
-rw-r--r--contrib/arm-neon/linux.c2
-rw-r--r--contrib/examples/pngtopng.c2
-rw-r--r--contrib/oss-fuzz/README.txt1
-rwxr-xr-xcontrib/oss-fuzz/build.sh3
-rw-r--r--contrib/oss-fuzz/libpng_read_fuzzer.cc5
-rw-r--r--contrib/powerpc-vsx/linux.c3
-rw-r--r--contrib/powerpc-vsx/linux_aux.c1
-rwxr-xr-xcontrib/testpngs/makepngs.sh4
-rw-r--r--contrib/tools/checksum-icc.c4
-rwxr-xr-xcontrib/tools/chkfmt.sh (renamed from contrib/tools/chkfmt)55
-rw-r--r--contrib/tools/cvtcolor.c6
-rw-r--r--contrib/tools/genpng.c3
-rwxr-xr-xcontrib/tools/intgamma.sh16
-rw-r--r--contrib/tools/makesRGB.c3
-rw-r--r--contrib/tools/png-fix-itxt.c6
-rw-r--r--contrib/tools/pngcp.c77
-rw-r--r--contrib/tools/pngfix.c11
-rwxr-xr-xcontrib/tools/reindent25
-rw-r--r--contrib/tools/sRGB.h6
-rw-r--r--intel/filter_sse2_intrinsics.c2
-rw-r--r--libpng-manual.txt4
-rw-r--r--libpng.38
-rw-r--r--libpngpf.34
-rw-r--r--png.c6
-rw-r--r--png.h16
-rw-r--r--pngconf.h2
-rw-r--r--pngpriv.h2
-rw-r--r--pngread.c4
-rw-r--r--pngrutil.c2
-rw-r--r--pngtest.c2
-rw-r--r--pngwrite.c8
-rw-r--r--pngwutil.c6
-rw-r--r--scripts/README.txt2
-rwxr-xr-xscripts/checksym.awk1
-rwxr-xr-xscripts/dfn.awk3
-rw-r--r--scripts/genout.cmake.in2
-rw-r--r--scripts/intprefix.c1
-rw-r--r--scripts/libpng-config-head.in2
-rw-r--r--scripts/libpng.pc.in2
-rw-r--r--scripts/makefile.32sunu143
-rw-r--r--scripts/makefile.64sunu143
-rw-r--r--scripts/makefile.aix51
-rw-r--r--scripts/makefile.atari38
-rw-r--r--scripts/makefile.beos137
-rw-r--r--scripts/makefile.cegcc116
-rw-r--r--scripts/makefile.darwin141
-rw-r--r--scripts/makefile.dec143
-rw-r--r--scripts/makefile.dj211
-rw-r--r--scripts/makefile.freebsd39
-rw-r--r--scripts/makefile.hp64139
-rw-r--r--scripts/makefile.hpgcc138
-rw-r--r--scripts/makefile.hpux139
-rw-r--r--scripts/makefile.linux143
-rw-r--r--scripts/makefile.mips41
-rw-r--r--scripts/makefile.msys107
-rw-r--r--scripts/makefile.netbsd30
-rw-r--r--scripts/makefile.openbsd58
-rw-r--r--scripts/makefile.sco141
-rw-r--r--scripts/makefile.sggcc145
-rw-r--r--scripts/makefile.sgi145
-rw-r--r--scripts/makefile.so9140
-rw-r--r--scripts/makefile.solaris141
-rw-r--r--scripts/makefile.std36
-rw-r--r--scripts/makefile.sunos35
-rwxr-xr-xscripts/options.awk5
-rw-r--r--scripts/pnglibconf.h.prebuilt2
-rw-r--r--scripts/prefix.c1
-rw-r--r--scripts/sym.c1
-rw-r--r--scripts/symbols.c1
-rw-r--r--scripts/vers.c1
83 files changed, 620 insertions, 2510 deletions
diff --git a/.gitignore b/.gitignore
index e280e7cb3..18696e723 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,9 +42,12 @@
.deps/
.dirstamp
Makefile
+autom4te.cache/
config.h
+config.h.in~
config.log
config.status
+configure~
libpng-config
libpng.pc
libpng.vers
diff --git a/ANNOUNCE b/ANNOUNCE
index 9c9bb1891..5675b973a 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-libpng 1.6.38 - September 14, 2022
-==================================
+libpng 1.6.39 - November 20, 2022
+=================================
This is a public release of libpng, intended for use in production code.
@@ -9,13 +9,13 @@ Files available for download
Source files with LF line endings (for Unix/Linux):
- * libpng-1.6.38.tar.xz (LZMA-compressed, recommended)
- * libpng-1.6.38.tar.gz
+ * libpng-1.6.39.tar.xz (LZMA-compressed, recommended)
+ * libpng-1.6.39.tar.gz
Source files with CRLF line endings (for Windows):
- * lp1638.7z (LZMA-compressed, recommended)
- * lp1638.zip
+ * lpng1639.7z (LZMA-compressed, recommended)
+ * lpng1639.zip
Other information:
@@ -25,13 +25,19 @@ Other information:
* TRADEMARK.md
-Changes since the previous public release (version 1.6.37)
-----------------------------------------------------------
+Changes from version 1.6.38 to version 1.6.39
+---------------------------------------------
- * Added configurations and scripts for continuous integration.
- * Fixed various errors in the handling of tRNS, hIST and eXIf.
- * Implemented many stability improvements across all platforms.
- * Updated the internal documentation.
+ * Changed the error handler of oversized chunks (i.e. larger than
+ PNG_USER_CHUNK_MALLOC_MAX) from png_chunk_error to png_benign_error.
+ * Fixed a buffer overflow error in contrib/tools/pngfix.
+ * Fixed a memory leak (CVE-2019-6129) in contrib/tools/pngcp.
+ * Disabled the ARM Neon optimizations by default in the CMake file,
+ following the default behavior of the configure script.
+ * Allowed configure.ac to work with the trunk version of autoconf.
+ * Removed the support for "install" targets from the legacy makefiles;
+ removed the obsolete makefile.cegcc.
+ * Cleaned up the code and updated the internal documentation.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
diff --git a/AUTHORS b/AUTHORS
index e6a58d245..9a8e3869e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -35,9 +35,10 @@ Authors, for copyright and licensing purposes.
* Arm Holdings
- Richard Townsend
* Google Inc.
+ - Dan Field
+ - Leon Scroggins III
- Matt Sarett
- Mike Klein
- - Dan Field
- Sami Boukortt
The build projects, the build scripts, the test scripts, and other
diff --git a/CHANGES b/CHANGES
index 9a8686968..366e0f6a7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4052,7 +4052,7 @@ Version 1.6.0beta16 [March 6, 2012]
(in fact this is harmless, but the PNG data produced may be sub-optimal).
Version 1.6.0beta17 [March 10, 2012]
- Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
+ Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
Reject all iCCP chunks after the first, even if the first one is invalid.
Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c. A new shared keyword check routine was also added
@@ -4962,7 +4962,7 @@ Version 1.6.13beta01 [July 4, 2014]
Changed "if defined(__ARM_NEON__)" to
"if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
Fixed clang no-warning builds: png_digit was defined but never used.
-
+
Version 1.6.13beta02 [July 21, 2014]
Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
(bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11.
@@ -5453,7 +5453,7 @@ Version 1.6.21beta01 [December 11, 2015]
Version 1.6.21beta02 [December 14, 2015]
Moved png_check_keyword() from pngwutil.c to pngset.c
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
- in the BigEndian tests by not testing it, making the BE code the same
+ in the BigEndian tests by not testing it, making the BE code the same
as the LE version.
Fixes to pngvalid for various reduced build configurations (eliminate unused
statics) and a fix for the case in rgb_to_gray when the digitize option
@@ -5517,7 +5517,7 @@ Version 1.6.22beta03 [March 9, 2016]
Added a common-law trademark notice and export control information
to the LICENSE file, png.h, and the man page.
Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
- were accidentally removed from libpng-1.6.17.
+ were accidentally removed from libpng-1.6.17.
Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
(Robert C. Seacord).
Removed dubious "#if INT_MAX" test from png.h that was added to
@@ -5950,7 +5950,7 @@ Version 1.6.32beta09 [August 3, 2017]
Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation,
no longer using deprecated cmake LOCATION feature (Clifford Yapp).
Fixed five-byte error in the calculation of IDAT maximum possible size.
-
+
Version 1.6.32beta10 [August 5, 2017]
Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin).
@@ -6109,6 +6109,18 @@ Version 1.6.38 [September 14, 2022]
Implemented many stability improvements across all platforms.
Updated the internal documentation.
+Version 1.6.39 [November 20, 2022]
+ Changed the error handler of oversized chunks (i.e. larger than
+ PNG_USER_CHUNK_MALLOC_MAX) from png_chunk_error to png_benign_error.
+ Fixed a buffer overflow error in contrib/tools/pngfix.
+ Fixed a memory leak (CVE-2019-6129) in contrib/tools/pngcp.
+ Disabled the ARM Neon optimizations by default in the CMake file,
+ following the default behavior of the configure script.
+ Allowed configure.ac to work with the trunk version of autoconf.
+ Removed the support for "install" targets from the legacy makefiles;
+ removed the obsolete makefile.cegcc.
+ Cleaned up the code and updated the internal documentation.
+
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
Subscription is required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8652564b6..86e0affc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@
# Revised by Owen Rudge, 2020
# Revised by Gleb Mazovetskiy, 2021
# Revised by Christopher Sean Morrison, 2022
+# Revised by Martin Storsjo, 2022
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
@@ -32,7 +33,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
-set(PNGLIB_REVISION 38)
+set(PNGLIB_REVISION 39)
set(PNGLIB_SUBREVISION 0)
#set(PNGLIB_SUBREVISION "git")
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
@@ -98,8 +99,8 @@ if(TARGET_ARCH MATCHES "^arm" OR
CACHE STRING "Enable ARM NEON optimizations: on|off; on is default")
else()
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
- set(PNG_ARM_NEON "check"
- CACHE STRING "Enable ARM NEON optimizations: check|on|off; check is default")
+ set(PNG_ARM_NEON "off"
+ CACHE STRING "Enable ARM NEON optimizations: check|on|off; off is default")
endif()
set_property(CACHE PNG_ARM_NEON
PROPERTY STRINGS ${PNG_ARM_NEON_POSSIBLE_VALUES})
diff --git a/INSTALL b/INSTALL
index d3aaa2884..042d72929 100644
--- a/INSTALL
+++ b/INSTALL
@@ -192,11 +192,11 @@ test. For more confidence, you can run another test by typing
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
your output with the result shown in contrib/pngsuite/README.
-Most of the makefiles will allow you to run "make install" to
-put the library in its final resting place (if you want to
-do that, run "make install" in the zlib directory first if necessary).
-Some also allow you to run "make test-installed" after you have
-run "make install".
+Most of the makefiles used to allow you to run "make install" to put
+the library in its final resting place, but that feature is no longer
+supported. The only tested and supported manners to install libpng are
+the conventional build and install procedures driven by the configure
+script or by the CMake file.
VIII. Configuring for DOS and other 16-bit platforms
diff --git a/METADATA b/METADATA
index 52e7a9540..c2db76ca6 100644
--- a/METADATA
+++ b/METADATA
@@ -9,14 +9,14 @@ third_party {
type: GIT
value: "https://github.com/glennrp/libpng.git"
}
- version: "v1.6.38"
+ version: "v1.6.39"
license_type: NOTICE
security {
tag: "NVD-CPE2.3:cpe:/a:libpng:libpng:1.6.37"
}
last_upgrade_date {
- year: 2022
- month: 11
- day: 16
+ year: 2023
+ month: 2
+ day: 14
}
}
diff --git a/README b/README
index e6e72aa54..097a3c218 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.6.38
+README for libpng version 1.6.39
================================
See the note about version numbers near the top of png.h.
@@ -106,73 +106,74 @@ subscribe).
Files in this distribution:
- ANNOUNCE => Announcement of this version, with recent changes
- AUTHORS => List of contributing authors
- CHANGES => Description of changes between libpng versions
- KNOWNBUG => List of known bugs and deficiencies
- LICENSE => License to use and redistribute libpng
- README => This file
- TODO => Things not implemented in the current library
- TRADEMARK => Trademark information
- example.c => Example code for using libpng functions
- libpng.3 => manual page for libpng (includes libpng-manual.txt)
- libpng-manual.txt => Description of libpng and its functions
- libpngpf.3 => manual page for libpng's private functions
- png.5 => manual page for the PNG format
- png.c => Basic interface functions common to library
- png.h => Library function and interface declarations (public)
- pngpriv.h => Library function and interface declarations (private)
- pngconf.h => System specific library configuration (public)
- pngstruct.h => png_struct declaration (private)
- pnginfo.h => png_info struct declaration (private)
- pngdebug.h => debugging macros (private)
- pngerror.c => Error/warning message I/O functions
- pngget.c => Functions for retrieving info from struct
- pngmem.c => Memory handling functions
- pngbar.png => PNG logo, 88x31
- pngnow.png => PNG logo, 98x31
- pngpread.c => Progressive reading functions
- pngread.c => Read data/helper high-level functions
- pngrio.c => Lowest-level data read I/O functions
- pngrtran.c => Read data transformation functions
- pngrutil.c => Read data utility functions
- pngset.c => Functions for storing data into the info_struct
- pngtest.c => Library test program
- pngtest.png => Library test sample image
- pngtrans.c => Common data transformation functions
- pngwio.c => Lowest-level write I/O functions
- pngwrite.c => High-level write functions
- pngwtran.c => Write data transformations
- pngwutil.c => Write utility functions
- arm => Contains optimized code for the ARM platform
- powerpc => Contains optimized code for the PowerPC platform
- contrib => Contributions
- arm-neon => Optimized code for ARM-NEON platform
- powerpc-vsx => Optimized code for POWERPC-VSX platform
- examples => Example programs
- gregbook => source code for PNG reading and writing, from
- Greg Roelofs' "PNG: The Definitive Guide",
- O'Reilly, 1999
- libtests => Test programs
- mips-msa => Optimized code for MIPS-MSA platform
- pngminim => Minimal decoder, encoder, and progressive decoder
- programs demonstrating use of pngusr.dfa
- pngminus => Simple pnm2png and png2pnm programs
- pngsuite => Test images
- testpngs
- tools => Various tools
- visupng => Contains a MSVC workspace for VisualPng
- intel => Optimized code for INTEL-SSE2 platform
- mips => Optimized code for MIPS platform
- projects => Contains project files and workspaces for
- building a DLL
- owatcom => Contains a WATCOM project for building libpng
- visualc71 => Contains a Microsoft Visual C++ (MSVC)
- workspace for building libpng and zlib
- vstudio => Contains a Microsoft Visual C++ (MSVC)
- workspace for building libpng and zlib
- scripts => Directory containing scripts for building libpng:
- (see scripts/README.txt for the list of scripts)
+ ANNOUNCE => Announcement of this version, with recent changes
+ AUTHORS => List of contributing authors
+ CHANGES => Description of changes between libpng versions
+ INSTALL => Instructions to install libpng
+ LICENSE => License to use and redistribute libpng
+ README => This file
+ TODO => Things not implemented in the current library
+ TRADEMARK => Trademark information
+ example.c => Example code for using libpng functions
+ libpng.3 => Manual page for libpng (includes libpng-manual.txt)
+ libpng-manual.txt => Description of libpng and its functions
+ libpngpf.3 => Manual page for libpng's private functions (deprecated)
+ png.5 => Manual page for the PNG format
+ png.c => Basic interface functions common to library
+ png.h => Library function and interface declarations (public)
+ pngpriv.h => Library function and interface declarations (private)
+ pngconf.h => System specific library configuration (public)
+ pngstruct.h => png_struct declaration (private)
+ pnginfo.h => png_info struct declaration (private)
+ pngdebug.h => debugging macros (private)
+ pngerror.c => Error/warning message I/O functions
+ pngget.c => Functions for retrieving info from struct
+ pngmem.c => Memory handling functions
+ pngbar.png => PNG logo, 88x31
+ pngnow.png => PNG logo, 98x31
+ pngpread.c => Progressive reading functions
+ pngread.c => Read data/helper high-level functions
+ pngrio.c => Lowest-level data read I/O functions
+ pngrtran.c => Read data transformation functions
+ pngrutil.c => Read data utility functions
+ pngset.c => Functions for storing data into the info_struct
+ pngtest.c => Library test program
+ pngtest.png => Library test sample image
+ pngtrans.c => Common data transformation functions
+ pngwio.c => Lowest-level write I/O functions
+ pngwrite.c => High-level write functions
+ pngwtran.c => Write data transformations
+ pngwutil.c => Write utility functions
+ arm/ => Optimized code for the ARM platform
+ intel/ => Optimized code for the INTEL-SSE2 platform
+ mips/ => Optimized code for the MIPS platform
+ powerpc/ => Optimized code for the PowerPC platform
+ ci/ => Scripts for continuous integration
+ contrib/ => External contributions
+ arm-neon/ => Optimized code for the ARM-NEON platform
+ mips-msa/ => Optimized code for the MIPS-MSA platform
+ powerpc-vsx/ => Optimized code for the POWERPC-VSX platform
+ examples/ => Example programs
+ gregbook/ => Source code for PNG reading and writing, from
+ "PNG: The Definitive Guide" by Greg Roelofs,
+ O'Reilly, 1999
+ libtests/ => Test programs
+ oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing
+ libpng
+ pngminim/ => Minimal decoder, encoder, and progressive decoder
+ programs demonstrating the use of pngusr.dfa
+ pngminus/ => Simple pnm2png and png2pnm programs
+ pngsuite/ => Test images
+ testpngs/ => Test images
+ tools/ => Various tools
+ visupng/ => VisualPng, a Windows viewer for PNG images
+ projects/ => Project files and workspaces for various IDEs
+ owatcom/ => OpenWatcom project
+ visualc71/ => Microsoft Visual C++ 7.1 workspace
+ vstudio/ => Microsoft Visual Studio workspace
+ scripts/ => Scripts and makefiles for building libpng
+ (see scripts/README.txt for the complete list)
+ tests/ => Test scripts
Good luck, and happy coding!
diff --git a/arm/arm_init.c b/arm/arm_init.c
index ab22525b3..84d05556f 100644
--- a/arm/arm_init.c
+++ b/arm/arm_init.c
@@ -36,7 +36,10 @@
#ifndef PNG_ARM_NEON_FILE
# if defined(__aarch64__) || defined(_M_ARM64)
/* ARM Neon is expected to be unconditionally available on ARM64. */
-# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this platform"
+# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64"
+# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
+ /* ARM Neon is expected to be available on the target CPU architecture. */
+# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
# elif defined(__linux__)
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
# else
diff --git a/configure b/configure
index b66bb113a..8ad4092ca 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for libpng 1.6.38.
+# Generated by GNU Autoconf 2.71 for libpng 1.6.39.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.6.38'
-PACKAGE_STRING='libpng 1.6.38'
+PACKAGE_VERSION='1.6.39'
+PACKAGE_STRING='libpng 1.6.39'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
PACKAGE_URL=''
@@ -1411,7 +1411,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libpng 1.6.38 to adapt to many kinds of systems.
+\`configure' configures libpng 1.6.39 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1482,7 +1482,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libpng 1.6.38:";;
+ short | recursive ) echo "Configuration of libpng 1.6.39:";;
esac
cat <<\_ACEOF
@@ -1663,7 +1663,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libpng configure 1.6.38
+libpng configure 1.6.39
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1919,7 +1919,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libpng $as_me 1.6.38, which was
+It was created by libpng $as_me 1.6.39, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3196,7 +3196,7 @@ fi
# Define the identity of the package.
PACKAGE='libpng'
- VERSION='1.6.38'
+ VERSION='1.6.39'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3328,10 +3328,10 @@ fi
-PNGLIB_VERSION=1.6.38
+PNGLIB_VERSION=1.6.39
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
-PNGLIB_RELEASE=38
+PNGLIB_RELEASE=39
@@ -14894,7 +14894,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libpng $as_me 1.6.38, which was
+This file was extended by libpng $as_me 1.6.39, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14962,7 +14962,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-libpng config.status 1.6.38
+libpng config.status 1.6.39
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 7b6d5b929..986c77470 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
-AC_INIT([libpng],[1.6.38],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.39],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,10 +46,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
-PNGLIB_VERSION=1.6.38
+PNGLIB_VERSION=1.6.39
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
-PNGLIB_RELEASE=38
+PNGLIB_RELEASE=39
dnl End of version number stuff
@@ -138,7 +138,8 @@ AC_STRUCT_TM
AC_C_RESTRICT
# Checks for library functions.
-AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)))
+AC_CHECK_FUNCS([pow], ,
+ [AC_CHECK_LIB([m], [pow], , [AC_MSG_ERROR([cannot find pow])])])
# Some later POSIX 1003.1 functions are required for test programs, failure
# here is soft (the corresponding test program is not built).
@@ -150,8 +151,9 @@ AC_ARG_WITH(zlib-prefix,
[prefix that may have been used in installed zlib]),
[ZPREFIX=${withval}],
[ZPREFIX='z_'])
-AC_CHECK_LIB(z, zlibVersion, ,
- AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed)))
+AC_CHECK_LIB([z], [zlibVersion], ,
+ [AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], ,
+ [AC_MSG_ERROR([zlib not installed])])])
# The following is for pngvalid, to ensure it catches FP errors even on
# platforms that don't enable FP exceptions, the function appears in the math
diff --git a/contrib/arm-neon/android-ndk.c b/contrib/arm-neon/android-ndk.c
index fb3a4898d..c72c468a7 100644
--- a/contrib/arm-neon/android-ndk.c
+++ b/contrib/arm-neon/android-ndk.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by John Bowler, 2014.
- * Last changed in libpng 1.6.10 [March 6, 2014]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -24,6 +23,7 @@
* has been compiled only, not linked: no version of the library has been found,
* only the header files exist in the NDK.
*/
+
#include <cpu-features.h>
static int
diff --git a/contrib/arm-neon/linux-auxv.c b/contrib/arm-neon/linux-auxv.c
index 4d26bd3b3..c5d7f5127 100644
--- a/contrib/arm-neon/linux-auxv.c
+++ b/contrib/arm-neon/linux-auxv.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
- * Last changed in libpng 1.6.10 [March 6, 2014]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -22,6 +21,7 @@
* This generic __linux__ implementation requires reading /proc/self/auxv and
* looking at each element for one that records NEON capabilities.
*/
+
#include <unistd.h> /* for POSIX 1003.1 */
#include <errno.h> /* for EINTR */
diff --git a/contrib/arm-neon/linux.c b/contrib/arm-neon/linux.c
index a9bc360dd..b5429d0c3 100644
--- a/contrib/arm-neon/linux.c
+++ b/contrib/arm-neon/linux.c
@@ -1,6 +1,5 @@
/* contrib/arm-neon/linux.c
*
- * Last changed in libpng 1.6.31 [July 27, 2017]
* Copyright (c) 2014, 2017 Glenn Randers-Pehrson
* Written by John Bowler, 2014, 2017.
*
@@ -19,6 +18,7 @@
* This code is strict ANSI-C and is probably moderately portable; it does
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
*/
+
#include <stdio.h>
static int
diff --git a/contrib/examples/pngtopng.c b/contrib/examples/pngtopng.c
index 904b97238..1d55496ac 100644
--- a/contrib/examples/pngtopng.c
+++ b/contrib/examples/pngtopng.c
@@ -5,8 +5,6 @@
* related or neighboring rights to this work. This work is published from:
* United States.
*
- * Last changed in libpng 1.6.29 [March 16, 2017]
- *
* Read a PNG and write it out in a fixed format, using the 'simplified API'
* that was introduced in libpng-1.6.0.
*
diff --git a/contrib/oss-fuzz/README.txt b/contrib/oss-fuzz/README.txt
index 3b3656fbb..66d5242c5 100644
--- a/contrib/oss-fuzz/README.txt
+++ b/contrib/oss-fuzz/README.txt
@@ -1,4 +1,3 @@
-Last changed in libpng 1.6.33 [September 28, 2017]
Copyright (c) 2017 Glenn Randers-Pehrson
This code is released under the libpng license.
diff --git a/contrib/oss-fuzz/build.sh b/contrib/oss-fuzz/build.sh
index f9e1b0776..7b8f02639 100755
--- a/contrib/oss-fuzz/build.sh
+++ b/contrib/oss-fuzz/build.sh
@@ -1,4 +1,5 @@
#!/bin/bash -eu
+
# Copyright 2017-2018 Glenn Randers-Pehrson
# Copyright 2016 Google Inc.
#
@@ -14,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Last changed in libpng 1.6.35 [July 15, 2018]
-#
# Revisions by Glenn Randers-Pehrson, 2017:
# 1. Build only the library, not the tools (changed "make -j$(nproc) all" to
# "make -j$(nproc) libpng16.la").
diff --git a/contrib/oss-fuzz/libpng_read_fuzzer.cc b/contrib/oss-fuzz/libpng_read_fuzzer.cc
index 2064a8486..0190cf786 100644
--- a/contrib/oss-fuzz/libpng_read_fuzzer.cc
+++ b/contrib/oss-fuzz/libpng_read_fuzzer.cc
@@ -5,8 +5,6 @@
// Use of this source code is governed by a BSD-style license that may
// be found in the LICENSE file https://cs.chromium.org/chromium/src/LICENSE
-// Last changed in libpng 1.6.35 [July 15, 2018]
-
// The modifications in 2017 by Glenn Randers-Pehrson include
// 1. addition of a PNG_CLEANUP macro,
// 2. setting the option to ignore ADLER32 checksums,
@@ -17,6 +15,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include <vector>
@@ -60,7 +59,7 @@ struct PngObjectHandler {
png_free(png_ptr, row_ptr);
if (end_info_ptr)
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info_ptr);
- else if (info_ptr)
+ else if (info_ptr)
png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
else
png_destroy_read_struct(&png_ptr, nullptr, nullptr);
diff --git a/contrib/powerpc-vsx/linux.c b/contrib/powerpc-vsx/linux.c
index 32ed9d749..d861b2826 100644
--- a/contrib/powerpc-vsx/linux.c
+++ b/contrib/powerpc-vsx/linux.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2017 Glenn Randers-Pehrson
* Written by Vadim Barkov, 2017.
- * Last changed in libpng 1.6.29 [March 16, 2017]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -12,7 +11,7 @@
* BUG REPORTS: png-mng-implement@sourceforge.net
*
* png_have_vsx implemented for Linux by reading the widely available
- * pseudo-file /proc/cpuinfo.
+ * pseudo-file /proc/cpuinfo.
*
* This code is strict ANSI-C and is probably moderately portable; it does
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
diff --git a/contrib/powerpc-vsx/linux_aux.c b/contrib/powerpc-vsx/linux_aux.c
index 7828acafb..6ec048e80 100644
--- a/contrib/powerpc-vsx/linux_aux.c
+++ b/contrib/powerpc-vsx/linux_aux.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2017 Glenn Randers-Pehrson
* Written by Vadim Barkov, 2017.
- * Last changed in libpng 1.6.29 [March 16, 2017]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/contrib/testpngs/makepngs.sh b/contrib/testpngs/makepngs.sh
index eb1c15fc9..270f0630a 100755
--- a/contrib/testpngs/makepngs.sh
+++ b/contrib/testpngs/makepngs.sh
@@ -1,12 +1,10 @@
#!/bin/sh
-#
+
# Make a set of test PNG files, MAKEPNG is the name of the makepng executable
# built from contrib/libtests/makepng.c
# Copyright (c) 2015 John Cunningham Bowler
-# Last changed in libpng 1.6.20 [December 3, 2015]
-
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
diff --git a/contrib/tools/checksum-icc.c b/contrib/tools/checksum-icc.c
index 581e7088a..83e1f9a43 100644
--- a/contrib/tools/checksum-icc.c
+++ b/contrib/tools/checksum-icc.c
@@ -2,8 +2,6 @@
*
* Copyright (c) 2013 John Cunningham Bowler
*
- * Last changed in libpng 1.6.0 [February 14, 2013]
- *
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
@@ -11,8 +9,8 @@
* Generate crc32 and adler32 checksums of the given input files, used to
* generate check-codes for use when matching ICC profiles within libpng.
*/
-#include <stdio.h>
+#include <stdio.h>
#include <zlib.h>
static int
diff --git a/contrib/tools/chkfmt b/contrib/tools/chkfmt.sh
index 95181fde2..8810aa7b5 100755
--- a/contrib/tools/chkfmt
+++ b/contrib/tools/chkfmt.sh
@@ -1,21 +1,28 @@
#!/bin/sh
-# chkfmt
+# chkfmt.sh
#
-# COPYRIGHT: Written by John Cunningham Bowler, 2010.
+# COPYRIGHT:
+# Written by John Cunningham Bowler, 2010.
+# Revised by Cosmin Truta, 2022.
# To the extent possible under law, the author has waived all copyright and
-# related or neighboring rights to this work. This work is published from:
-# United States.
+# related or neighboring rights to this work. The author published this work
+# from the United States.
#
-# Check the format of the source files in the current directory - checks for a
-# line length of 80 characters max and no tab characters.
+# Check the format of the source files in the current directory:
+#
+# * The lines should not exceed a predefined maximum length.
+# * Tab characters should appear only where necessary (e.g. in makefiles).
#
# Optionally arguments are files or directories to check.
#
-# -v: output the long lines (makes fixing them easier)
-# -e: spawn an editor for each file that needs a change ($EDITOR must be
-# defined). When using -e the script MUST be run from an interactive
-# command line.
+# -v: output the long lines (makes fixing them easier)
+# -e: spawn an editor for each file that needs a change ($EDITOR must be
+# defined). When using -e the script MUST be run from an interactive
+# command line.
+
+script_name=`basename "$0"`
+
verbose=
edit=
vers=
@@ -32,14 +39,14 @@ test "$1" = "-e" && {
# Copy the standard streams for the editor
exec 3>&0 4>&1 5>&2
else
- echo "chkfmt -e: EDITOR must be defined" >&2
+ echo "$script_name -e: EDITOR must be defined" >&2
exit 1
fi
}
# Function to edit a single file - if the file isn't changed ask the user
-# whether or not to continue. This stuff only works if the script is run from
-# the command line (otherwise, don't specify -e or you will be sorry).
+# whether or not to continue. This stuff only works if the script is run
+# from the command line (otherwise, don't specify -e or you will be sorry).
doed(){
cp "$file" "$file".orig
"$EDITOR" "$file" 0>&3 1>&4 2>&5 3>&- 4>&- 5>&- || exit 1
@@ -53,19 +60,22 @@ doed(){
return 0
}
-# In beta versions the version string which appears in files can be a little
-# long and cause spuriously overlong lines. To avoid this substitute the version
-# string with a 'standard' version a.b.cc before checking for long lines.
+# In beta versions, the version string which appears in files can be a little
+# long and cause spuriously overlong lines. To avoid this, substitute the
+# version string with a placeholder string "a.b.cc" before checking for long
+# lines.
+# (Starting from libpng version 1.6.36, we switched to a conventional Git
+# workflow, and we are no longer publishing beta versions.)
if test -r png.h
then
vers="`sed -n -e \
's/^#define PNG_LIBPNG_VER_STRING .\([0-9]\.[0-9]\.[0-9][0-9a-z]*\).$/\1/p' \
png.h`"
- echo "chkfmt: checking version $vers"
+ echo "$script_name: checking version $vers"
fi
if test -z "$vers"
then
- echo "chkfmt: png.h not found, ignoring version number" >&2
+ echo "$script_name: png.h not found, ignoring version number" >&2
fi
test -n "$1" || set -- .
@@ -89,13 +99,16 @@ find "$@" \( -type d \( -name '.git' -o -name '.libs' -o -name 'projects' \) \
check_tabs=
line_length=100;;
*.awk)
- # Includes literal tabs
+ # Allow literal tabs.
check_tabs=
- # The following is arbitrary
+ # Mainframe line printer, anyone?
line_length=132;;
+ */ci_*.sh)
+ check_tabs=yes
+ line_length=100;;
*contrib/*/*.[ch])
check_tabs=yes
- line_length=96;;
+ line_length=100;;
*)
check_tabs=yes
line_length=80;;
diff --git a/contrib/tools/cvtcolor.c b/contrib/tools/cvtcolor.c
index e6793c7d5..111dfcee7 100644
--- a/contrib/tools/cvtcolor.c
+++ b/contrib/tools/cvtcolor.c
@@ -1,7 +1,4 @@
-/*-
- * convert.c
- *
- * Last changed in libpng 1.6.0 [February 14, 2013]
+/* convert.c
*
* COPYRIGHT: Written by John Cunningham Bowler, 2013.
* To the extent possible under law, the author has waived all copyright and
@@ -10,6 +7,7 @@
*
* Convert 8-bit sRGB or 16-bit linear values to another format.
*/
+
#define _ISOC99_SOURCE 1
#include <stdlib.h>
diff --git a/contrib/tools/genpng.c b/contrib/tools/genpng.c
index 3140fb49d..c43bea906 100644
--- a/contrib/tools/genpng.c
+++ b/contrib/tools/genpng.c
@@ -1,4 +1,4 @@
-/*- genpng
+/* genpng
*
* COPYRIGHT: Written by John Cunningham Bowler, 2015.
* Revised by Glenn Randers-Pehrson, 2017, to add buffer-size check.
@@ -69,6 +69,7 @@
* joins are mitres; the outside of the lines are continued to the point of
* intersection.
*/
+
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/tools/intgamma.sh b/contrib/tools/intgamma.sh
index 41c5d6dd2..3198cb241 100755
--- a/contrib/tools/intgamma.sh
+++ b/contrib/tools/intgamma.sh
@@ -1,13 +1,11 @@
#!/bin/sh
-#
+
# intgamma.sh
#
-# Last changed in libpng 1.6.0 [February 14, 2013]
-#
# COPYRIGHT: Written by John Cunningham Bowler, 2013.
# To the extent possible under law, the author has waived all copyright and
-# related or neighboring rights to this work. This work is published from:
-# United States.
+# related or neighboring rights to this work. The author published this work
+# from the United States.
#
# Shell script to generate png.c 8-bit and 16-bit log tables (see the code in
# png.c for details).
@@ -17,10 +15,10 @@
# (0..255) value and a similar table for the exponent calculation.
#
# "bc" must be on the path when the script is executed, and the math library
-# (-lm) must be available
-#
-# function to print out a list of numbers as integers; the function truncates
-# the integers which must be one-per-line
+# (-lm) must be available.
+
+# Function to print out a list of numbers as integers; the function truncates
+# the integers which must be one-per-line.
function print(){
awk 'BEGIN{
str = ""
diff --git a/contrib/tools/makesRGB.c b/contrib/tools/makesRGB.c
index d0c0ca931..5ef3ddf99 100644
--- a/contrib/tools/makesRGB.c
+++ b/contrib/tools/makesRGB.c
@@ -1,7 +1,5 @@
/* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables
*
- * Last changed in libpng 1.6.0 [February 14, 2013]
- *
* COPYRIGHT: Written by John Cunningham Bowler, 2013.
* To the extent possible under law, the author has waived all copyright and
* related or neighboring rights to this work. This work is published from:
@@ -14,6 +12,7 @@
* approximation to the 8-bit sRGB encoded value. Calculate the error in these
* tables and display it.
*/
+
#define _C99_SOURCE 1
#include <stdio.h>
#include <math.h>
diff --git a/contrib/tools/png-fix-itxt.c b/contrib/tools/png-fix-itxt.c
index c7654c113..b8286b9e5 100644
--- a/contrib/tools/png-fix-itxt.c
+++ b/contrib/tools/png-fix-itxt.c
@@ -1,8 +1,6 @@
-
-/* png-fix-itxt version 1.0.0
+/* png-fix-itxt
*
* Copyright 2015 Glenn Randers-Pehrson
- * Last changed in libpng 1.6.18 [July 23, 2015]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -10,7 +8,7 @@
*
* Usage:
*
- * png-fix-itxt.exe < bad.png > good.png
+ * png-fix-itxt < bad.png > good.png
*
* Fixes a PNG file written with libpng-1.6.0 or 1.6.1 that has one or more
* uncompressed iTXt chunks. Assumes that the actual length is greater
diff --git a/contrib/tools/pngcp.c b/contrib/tools/pngcp.c
index c03b6c7fc..579e28d2b 100644
--- a/contrib/tools/pngcp.c
+++ b/contrib/tools/pngcp.c
@@ -1,8 +1,6 @@
/* pngcp.c
*
- * Copyright (c) 2016 John Cunningham Bowler
- *
- * Last changed in libpng 1.6.24 [August 4, 2016]
+ * Copyright (c) 2016,2022 John Cunningham Bowler
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -14,7 +12,12 @@
*
* For a more extensive example that uses the transforms see
* contrib/libtests/pngimage.c in the libpng distribution.
+ *
+ * This code is not intended for installation in a release system; the command
+ * line options are not documented and most of the behavior is intended for
+ * testing libpng performance, both speed and compression.
*/
+
#include "pnglibconf.h" /* To find how libpng was configured. */
#ifdef PNG_PNGCP_TIMING_SUPPORTED
@@ -503,10 +506,10 @@ display_init(struct display *dp)
}
static void
-display_clean_read(struct display *dp)
+display_clean_read(struct display *dp, int freeinfo)
{
if (dp->read_pp != NULL)
- png_destroy_read_struct(&dp->read_pp, NULL, NULL);
+ png_destroy_read_struct(&dp->read_pp, freeinfo ? &dp->ip : NULL, NULL);
if (dp->fp != NULL)
{
@@ -517,7 +520,7 @@ display_clean_read(struct display *dp)
}
static void
-display_clean_write(struct display *dp)
+display_clean_write(struct display *dp, int freeinfo)
{
if (dp->fp != NULL)
{
@@ -527,14 +530,14 @@ display_clean_write(struct display *dp)
}
if (dp->write_pp != NULL)
- png_destroy_write_struct(&dp->write_pp, dp->tsp > 0 ? NULL : &dp->ip);
+ png_destroy_write_struct(&dp->write_pp, freeinfo ? &dp->ip : NULL);
}
static void
display_clean(struct display *dp)
{
- display_clean_read(dp);
- display_clean_write(dp);
+ display_clean_read(dp, 1/*freeinfo*/);
+ display_clean_write(dp, 1/*freeinfo*/);
dp->output_file = NULL;
# if PNG_LIBPNG_VER < 10700 && defined PNG_TEXT_SUPPORTED
@@ -778,7 +781,7 @@ static void
set_opt_string(struct display *dp, unsigned int sp)
/* Add the appropriate option string to dp->curr. */
{
- dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt,
+ dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt,
options[dp->stack[sp].opt].values[dp->stack[sp].entry].name);
}
@@ -1745,7 +1748,17 @@ read_function(png_structp pp, png_bytep data, size_t size)
static void
read_png(struct display *dp, const char *filename)
{
- display_clean_read(dp); /* safety */
+ /* This is an assumption of the code; it may happen if a previous write fails
+ * and there is a bug in the cleanup handling below (look for setjmp).
+ * Passing freeinfo==1 to display_clean_read below avoids a second error
+ * on dp->ip != NULL below.
+ */
+ if (dp->read_pp != NULL)
+ {
+ display_log(dp, APP_FAIL, "unexpected png_read_struct");
+ display_clean_read(dp, 1/*freeinfo*/); /* recovery */
+ }
+
display_start_read(dp, filename);
dp->read_pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, dp,
@@ -1769,6 +1782,13 @@ read_png(struct display *dp, const char *filename)
png_set_check_for_invalid_index(dp->read_pp, -1/*off completely*/);
# endif /* IGNORE_INDEX */
+ if (dp->ip != NULL)
+ {
+ /* UNEXPECTED: some problem in the display_clean function calls! */
+ display_log(dp, APP_FAIL, "read_png: freeing old info struct");
+ png_destroy_info_struct(dp->read_pp, &dp->ip);
+ }
+
/* The png_read_png API requires us to make the info struct, but it does the
* call to png_read_info.
*/
@@ -1848,7 +1868,14 @@ read_png(struct display *dp, const char *filename)
}
#endif /* FIX_INDEX */
- display_clean_read(dp);
+ /* NOTE: dp->ip is where all the information about the PNG that was just read
+ * is stored. It can be used to write and write again a single PNG file,
+ * however be aware that prior to libpng 1.7 text chunks could only be
+ * written once; this is a bug which would require a significant code rewrite
+ * to fix, it has been there in several versions of libpng (it was introduced
+ * to fix another bug involving duplicate writes of the text chunks.)
+ */
+ display_clean_read(dp, 0/*freeiinfo*/);
dp->operation = "none";
}
@@ -1975,7 +2002,21 @@ set_text_compression(struct display *dp)
static void
write_png(struct display *dp, const char *destname)
{
- display_clean_write(dp); /* safety */
+ /* If this test fails png_write_png would fail *silently* below; this
+ * is not helpful, so catch the problem now and give up:
+ */
+ if (dp->ip == NULL)
+ display_log(dp, INTERNAL_ERROR, "missing png_info");
+
+ /* This is an assumption of the code; it may happen if a previous
+ * write fails and there is a bug in the cleanup handling below.
+ */
+ if (dp->write_pp != NULL)
+ {
+ display_log(dp, APP_FAIL, "unexpected png_write_struct");
+ display_clean_write(dp, 0/*!freeinfo*/);
+ }
+
display_start_write(dp, destname);
dp->write_pp = png_create_write_struct(PNG_LIBPNG_VER_STRING, dp,
@@ -2073,10 +2114,6 @@ write_png(struct display *dp, const char *destname)
destname == NULL ? "stdout" : destname, strerror(errno));
}
- /* Clean it on the way out - if control returns to the caller then the
- * written_file contains the required data.
- */
- display_clean_write(dp);
dp->operation = "none";
}
@@ -2243,6 +2280,10 @@ cp_one_file(struct display *dp, const char *filename, const char *destname)
/* Loop to find the best option. */
do
{
+ /* Clean before each write_png; this just removes *dp->write_pp which
+ * cannot be reused.
+ */
+ display_clean_write(dp, 0/*!freeinfo*/);
write_png(dp, tmpname);
/* And compare the sizes (the write function makes sure write_size
@@ -2272,6 +2313,8 @@ cp_one_file(struct display *dp, const char *filename, const char *destname)
/* Do this for the 'sizes' option so that it reports the correct size. */
dp->write_size = dp->best_size;
}
+
+ display_clean_write(dp, 1/*freeinfo*/);
}
static int
diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c
index 389434ff4..54a467daf 100644
--- a/contrib/tools/pngfix.c
+++ b/contrib/tools/pngfix.c
@@ -1,6 +1,5 @@
/* pngfix.c
*
- * Last changed in libpng 1.6.31 [July 27, 2017]
* Copyright (c) 2014-2017 John Cunningham Bowler
*
* This code is released under the libpng license.
@@ -10,6 +9,7 @@
* Tool to check and fix the zlib inflate 'too far back' problem.
* See the usage message for more information.
*/
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -3961,6 +3961,14 @@ main(int argc, const char **argv)
{
size_t outlen = strlen(*argv);
+ if (outlen > FILENAME_MAX)
+ {
+ fprintf(stderr, "%s: output file name too long: %s%s%s\n",
+ prog, prefix, *argv, suffix ? suffix : "");
+ global.status_code |= WRITE_ERROR;
+ continue;
+ }
+
if (outfile == NULL) /* else this takes precedence */
{
/* Consider the prefix/suffix options */
@@ -4046,4 +4054,3 @@ main(void)
return 77;
}
#endif /* PNG_SETJMP_SUPPORTED */
-
diff --git a/contrib/tools/reindent b/contrib/tools/reindent
deleted file mode 100755
index f4df309b6..000000000
--- a/contrib/tools/reindent
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# reindent a libpng C source
-
-# COPYRIGHT: Written by Glenn Randers-Pehrson, 2016.
-# To the extent possible under law, the author has waived all copyright and
-# related or neighboring rights to this work. This work is published from:
-# United States.
-
-# Usage:
-# reindent inputtabsize outputtabsize inputcontinuestring outputcontinuestring
-#
-# Assumes that continued lines begin with indentation plus one space, and
-# that continued comments begin with indentation plus " *".
-#
-# eg, to change libpng coding style from 3-space indentation with 4-space
-# continuations to 4-space indentation with 2-space continuations:
-#
-# reindent 3 4 "\t " " " < example.c > example.c_4_2
-# and to restore the file back to libpng coding style
-# reindent 4 3 " " " " < example.c_4_2 > example.c_3_4
-
-unexpand --first-only --t $1 | \
- sed -e "/^ *$3[^\*]/{s/$3/$4/}" | \
- expand -t $2
diff --git a/contrib/tools/sRGB.h b/contrib/tools/sRGB.h
index d1ece5129..7f6bdfc28 100644
--- a/contrib/tools/sRGB.h
+++ b/contrib/tools/sRGB.h
@@ -1,7 +1,4 @@
-/*-
- * sRGB.h
- *
- * Last changed in libpng 1.6.0 [February 14, 2013]
+/* sRGB.h
*
* COPYRIGHT: Written by John Cunningham Bowler, 2013.
* To the extent possible under law, the author has waived all copyright and
@@ -16,6 +13,7 @@
* (in fact the source of the numbers is the wikipedia article at
* https://en.wikipedia.org/wiki/SRGB).
*/
+
static double
sRGB_from_linear(double l)
{
diff --git a/intel/filter_sse2_intrinsics.c b/intel/filter_sse2_intrinsics.c
index f52aaa800..d3c0fe9e2 100644
--- a/intel/filter_sse2_intrinsics.c
+++ b/intel/filter_sse2_intrinsics.c
@@ -259,7 +259,7 @@ void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
a = d; d = _mm_unpacklo_epi8(load4(row ), zero);
/* (p-a) == (a+b-c - a) == (b-c) */
-
+
pa = _mm_sub_epi16(b,c);
/* (p-b) == (a+b-c - b) == (a-c) */
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 19b1e0c35..d85679616 100644
--- a/libpng-manual.txt
+++ b/libpng-manual.txt
@@ -9,7 +9,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng version 1.6.36, December 2018, through 1.6.38 - September 2022
+ libpng version 1.6.36, December 2018, through 1.6.39 - November 2022
Updated and distributed by Cosmin Truta
Copyright (c) 2018-2022 Cosmin Truta
@@ -877,7 +877,7 @@ described below (the latter being the two common names for associated alpha
color channels). Note that PNG files always contain non-associated color
channels; png_set_alpha_mode() with one of the modes causes the decoder to
convert the pixels to an associated form before returning them to your
-application.
+application.
Since it is not necessary to perform arithmetic on opaque color values so
long as they are not to be resampled and are in the final color space it is
diff --git a/libpng.3 b/libpng.3
index b7fc18296..2ea6af3b4 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "September 14, 2022"
+.TH LIBPNG 3 "November 20, 2022"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.38
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.39
.SH SYNOPSIS
\fB#include <png.h>\fP
@@ -528,7 +528,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng version 1.6.36, December 2018, through 1.6.38 - September 2022
+ libpng version 1.6.36, December 2018, through 1.6.39 - November 2022
Updated and distributed by Cosmin Truta
Copyright (c) 2018-2022 Cosmin Truta
@@ -1396,7 +1396,7 @@ described below (the latter being the two common names for associated alpha
color channels). Note that PNG files always contain non-associated color
channels; png_set_alpha_mode() with one of the modes causes the decoder to
convert the pixels to an associated form before returning them to your
-application.
+application.
Since it is not necessary to perform arithmetic on opaque color values so
long as they are not to be resampled and are in the final color space it is
diff --git a/libpngpf.3 b/libpngpf.3
index 3da3b863d..dbf40d436 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "September 14, 2022"
+.TH LIBPNGPF 3 "November 20, 2022"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.38
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.39
(private functions)
.SH SYNOPSIS
diff --git a/png.c b/png.c
index fc0956426..4f3e8bbd3 100644
--- a/png.c
+++ b/png.c
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_38 Your_png_h_is_not_version_1_6_38;
+typedef png_libpng_version_1_6_39 Your_png_h_is_not_version_1_6_39;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
@@ -815,7 +815,7 @@ png_get_copyright(png_const_structrp png_ptr)
return PNG_STRING_COPYRIGHT
#else
return PNG_STRING_NEWLINE \
- "libpng version 1.6.38" PNG_STRING_NEWLINE \
+ "libpng version 1.6.39" PNG_STRING_NEWLINE \
"Copyright (c) 2018-2022 Cosmin Truta" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
@@ -2710,7 +2710,7 @@ png_check_IHDR(png_const_structrp png_ptr,
int /* PRIVATE */
png_check_fp_number(png_const_charp string, size_t size, int *statep,
- png_size_tp whereami)
+ size_t *whereami)
{
int state = *statep;
size_t i = *whereami;
diff --git a/png.h b/png.h
index 5fb494fb1..f109cdf33 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.38 - September 14, 2022
+ * libpng version 1.6.39 - November 20, 2022
*
* Copyright (c) 2018-2022 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
@@ -15,7 +15,7 @@
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* Glenn Randers-Pehrson
- * libpng versions 1.6.36, December 2018, through 1.6.38, September 2022:
+ * libpng versions 1.6.36, December 2018, through 1.6.39, November 2022:
* Cosmin Truta
* See also "Contributing Authors", below.
*/
@@ -239,7 +239,7 @@
* ...
* 1.5.30 15 10530 15.so.15.30[.0]
* ...
- * 1.6.38 16 10638 16.so.16.38[.0]
+ * 1.6.39 16 10639 16.so.16.39[.0]
*
* Henceforth the source version will match the shared-library major and
* minor numbers; the shared-library major version number will be used for
@@ -278,8 +278,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.38"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.38 - September 14, 2022\n"
+#define PNG_LIBPNG_VER_STRING "1.6.39"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.6.39 - November 20, 2022\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -287,7 +287,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
-#define PNG_LIBPNG_VER_RELEASE 38
+#define PNG_LIBPNG_VER_RELEASE 39
/* This should be zero for a public release, or non-zero for a
* development version. [Deprecated]
@@ -318,7 +318,7 @@
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
-#define PNG_LIBPNG_VER 10638 /* 1.6.38 */
+#define PNG_LIBPNG_VER 10639 /* 1.6.39 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -428,7 +428,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_6_38;
+typedef char* png_libpng_version_1_6_39;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
diff --git a/pngconf.h b/pngconf.h
index 89d28f83a..fcb4b4306 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine-configurable file for libpng
*
- * libpng version 1.6.38
+ * libpng version 1.6.39
*
* Copyright (c) 2018-2022 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
diff --git a/pngpriv.h b/pngpriv.h
index 2e426cf47..b8a73b685 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -1946,7 +1946,7 @@ PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
* the problem character.) This has not been tested within libpng.
*/
PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
- size_t size, int *statep, png_size_tp whereami),PNG_EMPTY);
+ size_t size, int *statep, size_t *whereami),PNG_EMPTY);
/* This is the same but it checks a complete string and returns true
* only if it just contains a floating point number. As of 1.5.4 this
diff --git a/pngread.c b/pngread.c
index 5ab922403..96996ced5 100644
--- a/pngread.c
+++ b/pngread.c
@@ -3762,13 +3762,13 @@ png_image_read_direct(png_voidp argument)
mode = PNG_ALPHA_PNG;
output_gamma = PNG_DEFAULT_sRGB;
}
-
+
if ((change & PNG_FORMAT_FLAG_ASSOCIATED_ALPHA) != 0)
{
mode = PNG_ALPHA_OPTIMIZED;
change &= ~PNG_FORMAT_FLAG_ASSOCIATED_ALPHA;
}
-
+
/* If 'do_local_background' is set check for the presence of gamma
* correction; this is part of the work-round for the libpng bug
* described above.
diff --git a/pngrutil.c b/pngrutil.c
index ca060dd15..068ab193a 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -3186,7 +3186,7 @@ png_check_chunk_length(png_const_structrp png_ptr, png_uint_32 length)
{
png_debug2(0," length = %lu, limit = %lu",
(unsigned long)length,(unsigned long)limit);
- png_chunk_error(png_ptr, "chunk data is too large");
+ png_benign_error(png_ptr, "chunk data is too large");
}
}
diff --git a/pngtest.c b/pngtest.c
index 6f1830029..542ee9593 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -2155,4 +2155,4 @@ main(void)
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_38 Your_png_h_is_not_version_1_6_38;
+typedef png_libpng_version_1_6_39 Your_png_h_is_not_version_1_6_39;
diff --git a/pngwrite.c b/pngwrite.c
index 06c45d16a..4e58d776a 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -75,10 +75,10 @@ write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr,
* library. If you have a new chunk to add, make a function to write it,
* and put it in the correct location here. If you want the chunk written
* after the image data, put it in png_write_end(). I strongly encourage
- * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing
- * the chunk, as that will keep the code from breaking if you want to just
- * write a plain PNG file. If you have long comments, I suggest writing
- * them in png_write_end(), and compressing them.
+ * you to supply a PNG_INFO_<chunk> flag, and check info_ptr->valid before
+ * writing the chunk, as that will keep the code from breaking if you want
+ * to just write a plain PNG file. If you have long comments, I suggest
+ * writing them in png_write_end(), and compressing them.
*/
void PNGAPI
png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr)
diff --git a/pngwutil.c b/pngwutil.c
index 16345e4c0..01f0607c7 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
- * Copyright (c) 2018 Cosmin Truta
+ * Copyright (c) 2018-2022 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -1747,7 +1747,7 @@ png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
{
png_uint_32 purpose_len;
size_t units_len, total_len;
- png_size_tp params_len;
+ size_t *params_len;
png_byte buf[10];
png_byte new_purpose[80];
int i;
@@ -1769,7 +1769,7 @@ png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
png_debug1(3, "pCAL units length = %d", (int)units_len);
total_len = purpose_len + units_len + 10;
- params_len = (png_size_tp)png_malloc(png_ptr,
+ params_len = (size_t *)png_malloc(png_ptr,
(png_alloc_size_t)((png_alloc_size_t)nparams * (sizeof (size_t))));
/* Find the length of each parameter, making sure we don't count the
diff --git a/scripts/README.txt b/scripts/README.txt
index f7bceecf0..326160cbb 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -13,7 +13,7 @@ pnglibconf.h.prebuilt => Configuration settings
makefile.atari => Atari makefile
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.beos => BeOS makefile
- makefile.cegcc => minge32ce for Windows CE makefile
+ makefile.clang => Generic clang makefile
makefile.darwin => Darwin makefile, for macOS (formerly Mac OS X)
makefile.dec => DEC Alpha UNIX makefile
makefile.dj2 => DJGPP 2 makefile
diff --git a/scripts/checksym.awk b/scripts/checksym.awk
index fe3af55e0..48e55e60e 100755
--- a/scripts/checksym.awk
+++ b/scripts/checksym.awk
@@ -1,4 +1,5 @@
#!/bin/awk -f
+
# Check a list of symbols against the master definition
# (official) list. Arguments:
#
diff --git a/scripts/dfn.awk b/scripts/dfn.awk
index 0dc99df0f..0b25c8a37 100755
--- a/scripts/dfn.awk
+++ b/scripts/dfn.awk
@@ -1,8 +1,7 @@
#!/bin/awk -f
+
# scripts/dfn.awk - process a .dfn file
#
-# last changed in libpng version 1.5.19 - August 21, 2014
-#
# Copyright (c) 2013-2014 Glenn Randers-Pehrson
#
# This code is released under the libpng license.
diff --git a/scripts/genout.cmake.in b/scripts/genout.cmake.in
index 01f12de2f..91d3bd48a 100644
--- a/scripts/genout.cmake.in
+++ b/scripts/genout.cmake.in
@@ -20,7 +20,7 @@ set(PNG_PREFIX "@PNG_PREFIX@")
set(PNGLIB_MAJOR "@PNGLIB_MAJOR@")
set(PNGLIB_MINOR "@PNGLIB_MINOR@")
set(PNGLIB_VERSION "@PNGLIB_VERSION@")
-set(ZLIBINCDIR "@ZLIB_INCLUDE_DIR@")
+set(ZLIBINCDIR "@ZLIB_INCLUDE_DIRS@")
set(PLATFORM_C_FLAGS)
if(APPLE)
diff --git a/scripts/intprefix.c b/scripts/intprefix.c
index 254f8e94b..4085e5401 100644
--- a/scripts/intprefix.c
+++ b/scripts/intprefix.c
@@ -1,7 +1,6 @@
/* intprefix.c - generate an unprefixed internal symbol list
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2013-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index 028c3b8ae..57874b7bc 100644
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.6.38
+version=1.6.39
prefix=""
libdir=""
libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 70ae04140..2cb84475d 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng
Description: Loads and saves PNG files
-Version: 1.6.38
+Version: 1.6.39
Libs: -L${libdir} -lpng16
Cflags: -I${includedir}
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
index 2993e0f4c..ea4894e74 100644
--- a/scripts/makefile.32sunu
+++ b/scripts/makefile.32sunu
@@ -4,20 +4,18 @@
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
LIBNAME=libpng16
-PNGMAJ = 16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=cc
@@ -30,10 +28,6 @@ RM_F=/bin/rm -f
SUN_CC_FLAGS=-fast -xtarget=ultra
SUN_LD_FLAGS=-fast -xtarget=ultra
-# where make install puts libpng.a, libpng16.so and libpng16/png.h
-prefix=/a
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
# Changing these to ../zlib poses a security risk. If you want
# to have zlib in an adjacent directory, specify the full path instead of "..".
@@ -50,26 +44,6 @@ 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
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
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
@@ -84,7 +58,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
include scripts/pnglibconf.mak
DELETE = $(RM_F)
@@ -94,26 +68,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo ccopts=\"-fast -xtarget=ultra\"; \
- echo ldopts=\"-fast -xtarget=ultra\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -139,86 +93,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)*
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
index 567c7e612..3f603d3f1 100644
--- a/scripts/makefile.64sunu
+++ b/scripts/makefile.64sunu
@@ -4,20 +4,18 @@
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
-
+#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
LIBNAME=libpng16
-PNGMAJ = 16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=cc
@@ -30,10 +28,6 @@ RM_F=/bin/rm -f
SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
-# where make install puts libpng.a, libpng16.so and libpng16/png.h
-prefix=/a
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
# Changing these to ../zlib poses a security risk. If you want
# to have zlib in an adjacent directory, specify the full path instead of "..".
@@ -50,26 +44,6 @@ 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
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
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
@@ -84,7 +58,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
include scripts/pnglibconf.mak
DELETE = $(RM_F)
@@ -94,26 +68,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo ccopts=\"-fast -xtarget=ultra -xarch=v9\"; \
- echo ldopts=\"-fast -xtarget=ultra -xarch=v9\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -139,86 +93,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)*
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index c5cc530a7..f00734e90 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -19,28 +19,10 @@ AR_RC = ar rcs
RANLIB = ranlib
MKDIR_P = mkdir -p
RM_F = rm -f
-LN_SF = ln -f -s
LIBNAME = libpng16
PNGMAJ = 16
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-
WARNMORE =
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
@@ -55,7 +37,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-all: $(LIBNAME).a pngtest$(E)
+all: $(LIBNAME).a pngtest
include scripts/pnglibconf.mak
REMOVE = $(RM_F)
@@ -65,34 +47,15 @@ $(LIBNAME).a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-test: pngtest$(E)
- ./pngtest$(E)
+test: pngtest
+ ./pngtest
-pngtest$(E): pngtest.o $(LIBNAME).a
+pngtest: pngtest.o $(LIBNAME).a
$(LD) -o $@ pngtest.o $(LDFLAGS)
-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
- -@$(RM_F) $(DI)/$(LIBNAME)/png.h
- -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h
- -@$(RM_F) $(DI)/pngconf.h
- -@$(RM_F) $(DI)/pnglibconf.h
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h \
- $(DI)/$(LIBNAME)/pngconf.h \
- $(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)
- (cd $(DI); $(LN_SF) libpng/* .;)
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
$(RM_F) *.o $(LIBNAME).a pngtest pngout.png pnglibconf.h
diff --git a/scripts/makefile.atari b/scripts/makefile.atari
index 5b7baea41..6ed1f7990 100644
--- a/scripts/makefile.atari
+++ b/scripts/makefile.atari
@@ -1,4 +1,5 @@
# makefile for libpng
+# Copyright (C) 2022 Cosmin Truta
# Copyright (C) 2002, 2014 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
#
@@ -9,25 +10,10 @@
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
# rules for library management
#
-CPPFLAGS = -I..\zlib
+CPPFLAGS = -I../zlib
CFLAGS = -O
LBR = png.lib
-LDFLAGS = -L. -L..\zlib -lpng -lz -lm
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
+LDFLAGS = -L. -L../zlib -lpng -lz -lm
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
@@ -54,18 +40,6 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pngtest.ttp: pngtest.o $(LBR)
$(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
-install: libpng.a
- -@mkdir $(DESTDIR)$(INCPATH)
- -@mkdir $(DESTDIR)$(INCPATH)/libpng
- -@mkdir $(DESTDIR)$(LIBPATH)
- -@rm -f $(DESTDIR)$(INCPATH)/png.h
- -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
- -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
- ln -f -s $(LIBNAME)/* .)
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index 2ed049e82..e02bdc3f4 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -11,13 +11,11 @@
# Library name:
LIBNAME=libpng16
-PNGMAJ = 16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=gcc
@@ -47,29 +45,6 @@ CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
-# where make install puts libpng.a, libpng16.so*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -85,7 +60,7 @@ OBJSDLL = $(OBJS)
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -94,28 +69,13 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo libs=\"-lpng16 -lz \"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
cp $(LIBSO)* /boot/home/config/lib
$(LIBSOMAJ): $(OBJSDLL)
- $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
- $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
+ $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) \
+ -o $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
pngtest: pngtest.o $(LIBSO)
$(CC) -L$(ZLIBLIB) -L. -lz -lpng16 -o pngtest pngtest.o
@@ -123,84 +83,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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) $(CPPFLAGS) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtesti \
- pnglibconf.h libpng.pc
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.cegcc b/scripts/makefile.cegcc
deleted file mode 100644
index 6f915c2bf..000000000
--- a/scripts/makefile.cegcc
+++ /dev/null
@@ -1,116 +0,0 @@
-# Makefile for creating Windows CE release archives, with the
-# mingw32ce compiler.
-
-# Last updated: 22-Jul-2008
-
-# Copyright (C) 2008 Vincent Torri
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# To get some help, type
-#
-# make help
-#
-# To create the archives
-#
-# make
-#
-# To remove everything, type:
-#
-# make clean
-
-VERMAJ = 1
-VERMIN = 6
-VERMIC = 37
-VER = $(VERMAJ).$(VERMIN).$(VERMIC)
-NAME = libpng
-PACKAGE = $(NAME)-$(VER)
-
-BIN = libpng16-0.dll
-LIB = libpng16.a libpng16.dll.a libpng.a libpng.dll.a
-INCLUDE = png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
-PC = libpng16.pc libpng.pc
-
-MANIFESTVERBIN = "Libpng-$(VER): Binary files"
-MANIFESTVERDEV = "Libpng-$(VER): Developer files"
-MANIFESTVERDESC = "Libpng: the official PNG reference library"
-
-all: $(NAME)
-
-$(NAME): remove-old copy-src compilation copy manifest archive
- @echo " * Removal of the directories"
- @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/
-
-remove-old:
- @echo " * Removal of the old files"
- @rm -rf $(PACKAGE)-bin*
- @rm -rf $(PACKAGE)-dev*
-
-copy-src:
- @echo " * Copy of source files"
- @cp -R ../src/$(PACKAGE) .
- @echo " * Creation of directories and files"
- @mkdir -p $(PACKAGE)-bin/bin
- @mkdir -p $(PACKAGE)-bin/manifest
- @mkdir -p $(PACKAGE)-dev/lib/pkgconfig
- @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN)
- @mkdir -p $(PACKAGE)-dev/manifest
- @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft
- @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver
- @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft
- @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver
-
-compilation:
- @echo " * Compilation of $(PACKAGE)"
- cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_CONSOLE_IO_SUPPORTED -D_WIN32_WCE=0x0420" \
- CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" \
- LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" \
- ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
-
-copy:
- @echo " * Copy of binary and development files"
- @for i in $(BIN); do \
- cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \
- done
- @for i in $(LIB); do \
- cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \
- done
- @for i in $(INCLUDE); do \
- cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \
- done
- @for i in $(PC); do \
- cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \
- done
-
-manifest:
- @echo " * Creation of the manifest"
- @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft
- @cd $(PACKAGE)-bin && \
- echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \
- echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver
- @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft
- @cd $(PACKAGE)-dev && \
- echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \
- echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver
-
-archive:
- @echo " * Creation of the archives"
- @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin
- @bzip2 -9 $(PACKAGE)-bin.tar
- @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev
- @bzip2 -9 $(PACKAGE)-dev.tar
-
-clean:
- @echo " * Cleaning"
- @rm -rf $(PACKAGE)*
-
-help:
- @echo
- @echo "To create the archives, type:"
- @echo " make"
- @echo
- @echo "To remove everything, type:"
- @echo " make clean"
- @echo
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index 247343f02..0c50b57e6 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -10,26 +10,17 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# where "make install" puts libpng.a, libpng16.dylib, png.h, pngconf.h,
-# and pnglibconf.h
-
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
ZLIBLIB=/usr/lib
ZLIBINC=/usr/include
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
-RELEASE = 38
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).dylib
LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
-LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib
-OLDSO=libpng.dylib
# Utilities:
CC=cc
@@ -47,26 +38,6 @@ CPPFLAGS=-I$(ZLIBINC) $(DEFS)
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -86,7 +57,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -95,28 +66,11 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
$(LIBSOMAJ): $(OBJSDLL)
$(CC) -dynamiclib \
- -install_name $(LIBPATH)/$(LIBSOMAJ) \
-current_version 16 -compatibility_version 16 \
-o $(LIBSOMAJ) \
$(OBJSDLL) -L$(ZLIBLIB) -lz
@@ -127,84 +81,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- $(RANLIB) $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)
- chmod 755 $(DL)/$(LIBSOMAJ)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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) $(CPPFLAGS) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- libpng.pc $(LIBNAME).*dylib pngtesti pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBNAME).*dylib pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 80a9cb3bb..b788b5aa3 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -1,4 +1,5 @@
# makefile for libpng on DEC Alpha Unix
+# Copyright (C) 2020-2022 Cosmin Truta
# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
#
@@ -7,14 +8,12 @@
# and license in png.h
# Library name:
-PNGMAJ = 16
-LIBNAME = libpng16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=cc
@@ -25,29 +24,6 @@ LN_SF=ln -f -s
CP=cp
RM_F=/bin/rm -f
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
@@ -69,7 +45,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
+all: $(LIBSO) libpng.a pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -78,29 +54,11 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-std\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
$(LIBSOMAJ): $(OBJS)
- $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
- -soname $(LIBSOMAJ)
+ $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -soname $(LIBSOMAJ)
pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@@ -108,86 +66,21 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@/bin/rm -f $(DI)/libpng
- (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@/bin/rm -f $(DL)/libpng.a
- (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@/bin/rm -f $(DM)/man3/libpng.3
- -@/bin/rm -f $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@/bin/rm -f $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@/bin/rm -f $(DB)/libpng-config
- -@/bin/rm -f $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -w1 $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -R$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.dj2 b/scripts/makefile.dj2
index 3d493e69e..ff0d33286 100644
--- a/scripts/makefile.dj2
+++ b/scripts/makefile.dj2
@@ -7,12 +7,6 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# where make install will put libpng.a and png.h
-#prefix=/usr/local
-prefix=.
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
CC=gcc
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
CFLAGS=-O
@@ -47,6 +41,11 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
+
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
clean:
$(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd
index cdd39943a..e4e96a14b 100644
--- a/scripts/makefile.freebsd
+++ b/scripts/makefile.freebsd
@@ -7,28 +7,11 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-PREFIX?= /usr/local
-SHLIB_VER?= 16
-
LIB= png
+SHLIB_VER= 16
SHLIB_MAJOR= ${SHLIB_VER}
SHLIB_MINOR= 0
-NO_PROFILE= YES
-NO_OBJ= YES
-
-# where make install puts libpng.a and png.h
-DESTDIR= ${PREFIX}
-LIBDIR= /lib
-INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
-INCSDIR= /include/libpng
-INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
-MAN= libpng.3 libpngpf.3 png.5
-MANDIR= /man/man
-SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
- libpng/pngconf.h ${INCSDIR}/../pngconf.h \
- libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
-# where make install finds libz.a and zlib.h
ZLIBLIB= /usr/lib
ZLIBINC= /usr/include
@@ -39,6 +22,9 @@ DPADD+= ${LIBM} ${LIBZ}
CPPFLAGS+= -I. -I${ZLIBINC}
CFLAGS+= -Wall -Wextra -Wundef
+LDFLAGS+= -L. -L${ZLIBLIB}
+
+CLEANFILES+= pngtest pngtest.o pngout.png
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
@@ -49,18 +35,19 @@ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
.c.o:
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+ ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
-pngtest: pngtest.o libpng.a
- ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
- -lpng ${LDADD}
+pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
+ cp ${PNGLIBCONF_H_PREBUILT} $@
-CLEANFILES= pngtest pngtest.o pngout.png
+pngtest: pngtest.o libpng.a
+ ${CC} ${LDFLAGS} -static -o pngtest pngtest.o -lpng ${LDADD}
-test: pngtest
+test: pngtest
./pngtest
-pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
- cp $(PNGLIBCONF_H_PREBUILT) $@
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
.include <bsd.lib.mk>
diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64
index c05b14101..e9c0a6938 100644
--- a/scripts/makefile.hp64
+++ b/scripts/makefile.hp64
@@ -20,14 +20,12 @@ ZLIBINC=/opt/zlib/include
# SHAREDLIB=libz.sl
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).sl
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.sl
# Utilities:
CC=cc
@@ -46,29 +44,6 @@ CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-# where make install puts libpng.a, libpng16.sl, and png.h
-prefix=/opt/libpng
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -87,7 +62,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -96,23 +71,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-O -Ae -Wl,+vnocompatwarnings +DD64 +Z\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -126,86 +84,21 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 84bdb54b5..3686bd0ae 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -10,14 +10,12 @@
# and license in png.h
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).sl
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.sl
# Utilities:
CC=gcc
@@ -29,11 +27,6 @@ LN_SF=ln -sf
CP=cp
RM_F=/bin/rm -f
-# where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h
-# and pnglibconf.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
ZLIBLIB=/opt/zlib/lib
ZLIBINC=/opt/zlib/include
@@ -54,26 +47,6 @@ CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
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
@@ -88,27 +61,12 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -122,87 +80,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index 58b0f9d9f..59041f02a 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -21,14 +21,12 @@ ZLIBINC=/opt/zlib/include
# SHAREDLIB=libz.sl
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).sl
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.sl
# Utilities:
CC=cc
@@ -38,35 +36,12 @@ MKDIR_P=mkdir -p
LN_SF=ln -sf
RM_F=/bin/rm -f
-# where make install puts libpng.a, libpng16.sl, and png.h
-prefix=/opt/libpng
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
CPPFLAGS=-I$(ZLIBINC)
CFLAGS=-O -Ae +DA1.1 +DS2.0
# Caution: be sure you have built zlib with the same CFLAGS.
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
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -85,7 +60,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -94,23 +69,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-O -Ae +DA1.1 +DS2.0\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -124,86 +82,21 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 1d8c66301..3fece3d6c 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -9,15 +9,12 @@
# and license in png.h
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
-RELEASE = 38
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=gcc
@@ -28,12 +25,6 @@ LN_SF=ln -sf
CP=cp
RM_F=rm -f
-# where "make install" puts libpng16.a, libpng16.so*,
-# libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located.
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
@@ -52,26 +43,6 @@ CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -91,7 +62,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest pngtest-static
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -100,23 +71,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -139,87 +93,22 @@ test: pngtest pngtest-static
@echo ""
./pngtest-static
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
$(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
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
+ $(RM_F) pngtest*.o pngtest pngtest-static pngout.png
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.mips b/scripts/makefile.mips
index c96eb61cb..ca50f6077 100644
--- a/scripts/makefile.mips
+++ b/scripts/makefile.mips
@@ -7,32 +7,16 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
CC=cc
CPPFLAGS=-I../zlib -DSYSV -Dmips
CFLAGS=-O -systype sysv -w
#CFLAGS=-O
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
+AR_RC=ar rc
#RANLIB=ranlib
RANLIB=echo
-CP=cp
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -47,10 +31,10 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
all: libpng.a pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
- $(CP) $(PNGLIBCONF_H_PREBUILT) $@
+ cp $(PNGLIBCONF_H_PREBUILT) $@
libpng.a: $(OBJS)
- ar rc $@ $(OBJS)
+ $(AR_RC) $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a
@@ -59,22 +43,9 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
-install: libpng.a
- -@mkdir $(DESTDIR)$(INCPATH)
- -@mkdir $(DESTDIR)$(INCPATH)/libpng
- -@mkdir $(DESTDIR)$(LIBPATH)
- -@rm -f $(DESTDIR)$(INCPATH)/png.h
- -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
- -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
rm -f *.o libpng.a pngtest pngout.png pnglibconf.h
diff --git a/scripts/makefile.msys b/scripts/makefile.msys
index d5fadc16b..e2878233c 100644
--- a/scripts/makefile.msys
+++ b/scripts/makefile.msys
@@ -12,20 +12,14 @@
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# # # # # # # # # # # # # # # # #
-prefix=/usr/local
-exec_prefix=$(prefix)
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
-RELEASE = 38
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).dll
LIBSOMAJ=$(LIBNAME).dll.$(PNGMAJ)
-LIBSOREL=$(PNGMAJ).$(RELEASE)
-OLDSO=libpng.dll
# Where the zlib library and include files are located.
#ZLIBLIB=../zlib
@@ -51,26 +45,6 @@ LIBS = -lz -lm
# File extensions
EXEEXT=.exe
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -104,69 +78,17 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSO) $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
test: pngtest$(EXEEXT)
./pngtest$(EXEEXT)
@@ -176,9 +98,8 @@ pngtest$(EXEEXT): pngtest.o libpng.a
clean:
$(RM_F) $(OBJS) libpng.a
+ $(RM_F) $(LIBSO) $(LIBSOMAJ) pnglibconf.h
$(RM_F) pngtest*.o pngtest$(EXEEXT) pngout.png
- $(RM_F) $(LIBSO) $(LIBSOMAJ)
- $(RM_F) libpng.pc pnglibconf.h 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
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 48cac07d5..d3419f29b 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -1,29 +1,25 @@
-# makefile for libpng for NetBSD for the standard
-# make obj && make depend && make && make test
-# make includes && make install
-# Copyright (C) 2002 Patrick R.L. Welche
+# makefile for libpng on NetBSD
+# Copyright (C) 2020-2022 Cosmin Truta
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
+# Copyright (C) 2002 Patrick R.L. Welche
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-LOCALBASE?=/usr/local
-LIBDIR= ${LOCALBASE}/lib
-MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include
-
SHLIB_MAJOR= 16
-SHLIB_MINOR= 1.6.38
+SHLIB_MINOR= 0
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
INCS= png.h pngconf.h pnglibconf.h
-MAN= libpng.3 libpngpf.3 png.5
-CPPFLAGS+=-I${.CURDIR}
+CPPFLAGS+= -I${.CURDIR}
+CFLAGS+= -Wall -Wextra -Wundef
+
+CLEANFILES+= pngtest.o pngtest pnglibconf.h
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
@@ -35,12 +31,10 @@ PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
# MKLINT= no
# .endif
-CLEANFILES+=pngtest.o pngtest pnglibconf.h
-
.c.o:
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
-pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
+pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
cp ${PNGLIBCONF_H_PREBUILT} $@
pngtest.o: pngtest.c
@@ -50,6 +44,10 @@ pngtest: pngtest.o libpng.a
${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
test: pngtest
- cd ${.CURDIR} && ${.OBJDIR}/pngtest
+ ./pngtest
+
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
.include <bsd.lib.mk>
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index 97d11b867..6bfeab779 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -7,28 +7,19 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-PREFIX?= /usr/local
-LIBDIR= ${PREFIX}/lib
-MANDIR= ${PREFIX}/man/cat
-
SHLIB_MAJOR= 16
-SHLIB_MINOR= 1.6.38
+SHLIB_MINOR= 0
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
HDRS= png.h pngconf.h pnglibconf.h
-MAN= libpng.3 libpngpf.3 png.5
-DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO \
- libpng-manual.txt
-
-CFLAGS+= -Wall -Wextra -Wundef
-CPPFLAGS+= -I${.CURDIR}
-NOPROFILE= Yes
+CPPFLAGS+= -I${.CURDIR}
+CFLAGS+= -Wall -Wextra -Wundef
-CLEANFILES+= pngtest.o pngtest pnglibconf.h
+CLEANFILES+= pngtest.o pngtest pnglibconf.h
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
@@ -37,7 +28,7 @@ PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
.c.o:
${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
-pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
+pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
cp ${PNGLIBCONF_H_PREBUILT} $@
pngtest.o: pngtest.c
@@ -47,41 +38,10 @@ pngtest: pngtest.o
${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
test: pngtest
- cd ${.OBJDIR} && env \
- LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
-
-beforeinstall:
- if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
- fi
- if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
- fi
- if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
- fi
- if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
- fi
- if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
- fi
- if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
- fi
+ env LD_LIBRARY_PATH="${.OBJDIR}" ./pngtest
-afterinstall:
- @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
- @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
- @rm -f ${DESTDIR}${PREFIX}/include/png.h
- @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
- @rm -f ${DESTDIR}${PREFIX}/include/pnglibconf.h
- @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
.include <bsd.lib.mk>
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index 67cc8e74c..002cd3f9b 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -11,14 +11,12 @@
# and license in png.h
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=cc
@@ -29,10 +27,6 @@ LN_SF=ln -f -s
CP=cp
RM_F=/bin/rm -f
-# where make install puts libpng.a, $(OLDSO)*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
@@ -43,26 +37,6 @@ CPPFLAGS=-I$(ZLIBINC)
CFLAGS= -dy -belf -O3
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -81,7 +55,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -90,23 +64,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-belf\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -120,87 +77,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- -@$(RM_F) $(DI)/png.h
- -@$(RM_F) $(DI)/pngconf.h
- -@$(RM_F) $(DI)/pnglibconf.h
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(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) $(CPPFLAGS) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
- pnglibconf.h libpng.pc
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pngtest-static pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index 37f7d2d2a..e017916ef 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -9,13 +9,11 @@
# Library name:
LIBNAME=libpng16
-PNGMAJ = 16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=gcc
@@ -26,12 +24,6 @@ LN_SF=ln -sf
CP=cp
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng16.so, and libpng16/png.h
-# Prefix must be a full pathname.
-
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib32
#ZLIBINC=/usr/local/include
@@ -52,27 +44,6 @@ LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
-set_version sgi$(PNGMAJ).0
# See "man dso" for info about shared objects
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-#LIBPATH=$(exec_prefix)/lib32
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -84,7 +55,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-all: libpng.a pngtest shared libpng.pc libpng-config
+all: libpng.a pngtest shared
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -95,26 +66,6 @@ libpng.a: $(OBJS)
shared: $(LIBSOMAJ)
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"$(ABI)\"; \
- echo cppflags=\"\"; \
- echo ldopts=\"$(ABI)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -130,87 +81,21 @@ test: pngtest
echo Testing local static library.
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):$(DL) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \
- so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
+ $(RM_F) libpng.a pngtest pngout.png
+ $(RM_F) so_locations $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index 1ead8d88d..c7f8720e5 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -9,13 +9,11 @@
# Library name:
LIBNAME=libpng16
-PNGMAJ = 16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=cc
@@ -26,12 +24,6 @@ LN_SF=ln -sf
CP=cp
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng16.so, and libpng16/png.h
-# Prefix must be a full pathname.
-
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib32
#ZLIBINC=/usr/local/include
@@ -55,27 +47,6 @@ LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
-set_version sgi$(PNGMAJ).0
# See "man dso" for info about shared objects
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-#LIBPATH=$(exec_prefix)/lib32
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -87,7 +58,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-all: libpng.a pngtest shared libpng.pc libpng-config
+all: libpng.a pngtest shared
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -96,25 +67,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"$(ABI)\"; \
- echo ldopts=\"$(ABI)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -130,88 +82,21 @@ test: pngtest
echo Testing local static library.
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):$(DL) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
- $(LIBSO) $(LIBSOMAJ)* \
- so_locations pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* so_locations pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
index 865c0606a..2fd8e7017 100644
--- a/scripts/makefile.so9
+++ b/scripts/makefile.so9
@@ -11,14 +11,12 @@
# and license in png.h
# Library name:
-PNGMAJ = 16
-LIBNAME = libpng16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
# gcc 2.95 doesn't work.
@@ -30,10 +28,6 @@ LN_SF=ln -f -s
CP=cp
RM_F=/bin/rm -f
-# Where make install puts libpng.a, $(OLDSO)*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
# Changing these to ../zlib poses a security risk. If you want
# to have zlib in an adjacent directory, specify the full path instead of "..".
@@ -49,26 +43,6 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-O3
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -87,7 +61,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -96,23 +70,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -138,86 +95,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 180bdd0a0..4aa672deb 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -10,14 +10,12 @@
# and license in png.h
# Library name:
-LIBNAME = libpng16
-PNGMAJ = 16
+LIBNAME=libpng16
+PNGMAJ=16
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOREL=$(LIBSOMAJ).$(RELEASE)
-OLDSO=libpng.so
# Utilities:
CC=gcc
@@ -28,10 +26,6 @@ LN_SF=ln -f -s
CP=cp
RM_F=/bin/rm -f
-# Where make install puts libpng.a, libpng16.so*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
# Where the zlib library and include files are located
# Changing these to ../zlib poses a security risk. If you want
# to have zlib in an adjacent directory, specify the full path instead of "..".
@@ -48,26 +42,6 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
@@ -86,7 +60,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+all: libpng.a $(LIBSO) pngtest
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
@@ -95,24 +69,6 @@ libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo cppflags=\"\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng16 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
@@ -138,86 +94,21 @@ pngtest: pngtest.o $(LIBSO)
test: pngtest
./pngtest
-install-headers: png.h pngconf.h pnglibconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOMAJ) libpng.pc
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
- -@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
- (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
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CPPFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-static:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
+
+install-shared:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- libpng.pc pnglibconf.h
+ $(RM_F) *.o libpng.a pngtest pngout.png
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/scripts/makefile.std b/scripts/makefile.std
index ed1105f9a..6ce0a498a 100644
--- a/scripts/makefile.std
+++ b/scripts/makefile.std
@@ -7,21 +7,6 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
@@ -34,8 +19,6 @@ LD = $(CC)
AR_RC = ar rc
RANLIB = ranlib
MKDIR_P = mkdir
-LN_SF = ln -sf
-CP = cp
MV_F = mv -f
RM_F = rm -f
AWK = awk
@@ -92,22 +75,9 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
-install: libpng.a pnglibconf.h
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
- -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
- -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
- -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
- -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
$(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
diff --git a/scripts/makefile.sunos b/scripts/makefile.sunos
index 13450ec97..675e8760f 100644
--- a/scripts/makefile.sunos
+++ b/scripts/makefile.sunos
@@ -7,21 +7,6 @@
# For conditions of distribution and use, see the disclaimer
# and license in png.h
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
@@ -32,7 +17,6 @@ CC=gcc
AR_RC=ar rc
RANLIB=ranlib
MKDIR_P=mkdir -p
-LN_SF=ln -f -s
CP=cp
RM_F=/bin/rm -f
@@ -66,22 +50,9 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
-install: libpng.a
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
- -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
- -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
- -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
- -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
- (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+install:
+ @echo "The $@ target is no longer supported by this makefile."
+ @false
clean:
$(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
diff --git a/scripts/options.awk b/scripts/options.awk
index fef5dfd78..284811967 100755
--- a/scripts/options.awk
+++ b/scripts/options.awk
@@ -1,8 +1,7 @@
#!/bin/awk -f
+
# scripts/options.awk - library build configuration control
#
-# last changed in libpng version 1.6.11 - June 5, 2014
-#
# Copyright (c) 1998-2014 Glenn Randers-Pehrson
#
# This code is released under the libpng license.
@@ -243,7 +242,7 @@ $1 == "file" && NF >= 2{
# option NAME ( (requires|enables|if) NAME* | on | off | disabled |
# sets SETTING VALUE+ )*
-#
+#
# Declares an option 'NAME' and describes its default setting (disabled)
# and its relationship to other options. The option is disabled
# unless *all* the options listed after 'requires' are set and at
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index 89d5b4c8a..e5948c8ce 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -1,6 +1,6 @@
/* pnglibconf.h - library build configuration */
-/* libpng version 1.6.38 */
+/* libpng version 1.6.39 */
/* Copyright (c) 2018-2022 Cosmin Truta */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
diff --git a/scripts/prefix.c b/scripts/prefix.c
index 8b604a091..06576ae6a 100644
--- a/scripts/prefix.c
+++ b/scripts/prefix.c
@@ -1,7 +1,6 @@
/* prefix.c - generate an unprefixed symbol list
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2013-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/sym.c b/scripts/sym.c
index ea9e4c507..7571de2b7 100644
--- a/scripts/sym.c
+++ b/scripts/sym.c
@@ -1,7 +1,6 @@
/* sym.c - define format of libpng.sym
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/symbols.c b/scripts/symbols.c
index 28b841d8b..d51a8303c 100644
--- a/scripts/symbols.c
+++ b/scripts/symbols.c
@@ -1,7 +1,6 @@
/* symbols.c - find all exported symbols
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/vers.c b/scripts/vers.c
index de7319716..d74972643 100644
--- a/scripts/vers.c
+++ b/scripts/vers.c
@@ -1,7 +1,6 @@
/* vers.c - define format of libpng.vers
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.