diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2002-05-21 18:06:08 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-04-06 16:07:10 -0500 |
commit | cfbed9bdf200652db330ccefdc3ba0e4b4d20d25 (patch) | |
tree | 4ee2f68a973a4bbca99d72848caad7659aec1e96 | |
parent | 22f28966c467c174eabf5735e0ed852021d62539 (diff) | |
download | libpng-cfbed9bdf200652db330ccefdc3ba0e4b4d20d25.tar.gz |
Imported from libpng-1.2.3.tarv1.2.3
63 files changed, 974 insertions, 1067 deletions
@@ -1,19 +1,16 @@ -Libpng 1.2.3rc6 - May 13, 2002 +Libpng 1.2.3 - May 21, 2002 -This is not intended to be a public release. It will be replaced -within a few weeks by a public version or by another test version. +This is a public release of libpng, intended for use in production codes. Changes since the last public release (1.2.2): -version 1.2.2patch03 [April 18, 2002] Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install Added install: target to makefile.32sunu and makefile.64sunu Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng subdirectory to libpngNN subdirectory without the full pathname. Moved generation of libpng.pc from "install" to "all" in 15 makefiles. -version 1.2.3rc1 [April 27, 2002] Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos). Added $(DESTDIR) feature to 24 makefiles (Tim Mooney) Fixed bug with $prefix, should be $(prefix) in makefile.hpux. @@ -23,36 +20,18 @@ version 1.2.3rc1 [April 27, 2002] Revised makefile.darwin to make relative links without full pathname. Added setjmp() at the end of png_create_*_struct_2() in case user forgets to put one in their application. - Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and - removed them from module definition files. -version 1.2.3rc2 [May 1, 2002] - Fixed bug in reporting number of channels in pngget.c and pngset.c, - that was introduced in version 1.2.2beta5. - Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(), - png_default_flush(), and png_push_fill_buffer() and included them in - module definition files. + Fixed bug in reporting number of channels in pngget.c, introduced in + version 1.2.2 Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles. -version 1.2.3rc3 [May 1, 2002] - Revised prototype for png_default_flush() Remove old libpng.pc and libpngNN.pc before installing new ones. -version 1.2.3rc4 [May 2, 2002] - Typos in *.def files (png_default_read|write -> png_default_read|write_data) - In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc - Added libpng-config and libpngNN-config and modified makefiles to install them. - Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles + Revised 15 makefiles to build libpng-config and libpngNN-config from + libpng-config-*.in. Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp -version 1.2.3rc5 [May 11, 2002] Changed "error" and "message" in prototypes to "error_message" and "warning_message" to avoid namespace conflict. - Revised 15 makefiles to build libpng-config from libpng-config-*.in - Once more restored png_zalloc and png_zfree to nonexported form. - Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer - to nonexported form, but with PNGAPI, and removed them from module def files. -version 1.2.3rc6 [May 13, 2002] - Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c - Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. - Removed leftover libpng-config "sed" script from four makefiles. - Revised libpng-config creating script in 16 makefiles. + Restored png_zalloc and png_zfree to nonexported form as in libpng-1.2.1. + Removed description of png_set_mem_fn() from documentation. + Revised projects/msvc/README.txt Send comments/corrections/commendations to png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu @@ -1113,11 +1113,18 @@ version 1.2.3rc5 [May 11, 2002] Once more restored png_zalloc and png_zfree to regular nonexported form. Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer to nonexported form, but with PNGAPI, and removed them from module def files. -version 1.2.3rc6 [May 13, 2002] +version 1.2.3rc6 [May 14, 2002] Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. Removed leftover libpng-config "sed" script from four makefiles. Revised libpng-config creating script in 16 makefiles. +version 1.2.3 [May 21, 2002] + Revised libpng-config target in makefile.cygwin. + Removed description of png_set_mem_fn() from documentation. + Revised makefile.freebsd. + Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR). + Revised projects/msvc/README.txt + Changed -lpng to -lpngNN in LDFLAGS in several makefiles. Send comments/corrections/commendations to png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu @@ -1,5 +1,5 @@ -Installing libpng version 1.2.3rc6 - May 13, 2002 +Installing libpng version 1.2.3 - May 21, 2002 Before installing libpng, you must first install zlib. zlib can usually be found wherever you got libpng. zlib can be @@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the version of zlib that's installed. You can rename the directories that you downloaded (they -might be called "libpng-1.2.3rc6" or "lpng109" and "zlib-1.1.3" +might be called "libpng-1.2.3" or "lpng109" and "zlib-1.1.3" or "zlib113") so that you have directories called "zlib" and "libpng". Your directory structure should look like this: @@ -64,8 +64,8 @@ The files that are presently available in the scripts directory include makefile.std => Generic UNIX makefile (cc, creates static libpng.a) - makefile.linux => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.3rc6) - makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.3rc6, + makefile.linux => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.3) + makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.3, uses assembler code tuned for Intel MMX platform) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with @@ -86,10 +86,10 @@ include makefile.ne0bsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) - makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.3rc6) + makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.3) makefile.sunos => Sun makefile - makefile.solaris => Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.3rc6) - makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.3rc6) + makefile.solaris => Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.3) + makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.3) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc @@ -1,5 +1,5 @@ -Known bugs in libpng version 1.2.3rc6 +Known bugs in libpng version 1.2.3 1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when reading interlaced PNG files, when assembler code is enabled. @@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence. -libpng versions 1.0.7, July 1, 2000, through 1.2.3rc6, May 13, 2002, are +libpng versions 1.0.7, July 1, 2000, through 1.2.3, May 21, 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors @@ -99,4 +99,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson randeg@alum.rpi.edu -May 13, 2002 +May 21, 2002 @@ -1,4 +1,4 @@ -README for libpng 1.2.3rc6 - May 13, 2002 (shared library 2.1) +README for libpng 1.2.3 - May 21, 2002 (shared library 2.1) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. @@ -187,9 +187,9 @@ Files in this distribution: descrip.mms => VMS makefile for MMS or MMK makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.linux => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.3rc6) + (gcc, creates libpng12.so.0.1.2.3) makefile.gcmmx => Linux/ELF makefile (gcc, creates - libpng12.so.0.1.2.3rc6, uses assembler code + libpng12.so.0.1.2.3, uses assembler code tuned for Intel MMX platform) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with @@ -210,12 +210,12 @@ Files in this distribution: makefile.ne0bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng0.so makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) - makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.3rc6) + makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.3) makefile.sunos => Sun makefile makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng12.so.0.1.2.3rc6) + (gcc, creates libpng12.so.0.1.2.3) makefile.so9 => Solaris 9 makefile - (gcc, creates libpng12.so.0.1.2.3rc6) + (gcc, creates libpng12.so.0.1.2.3) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc @@ -1,13 +1,13 @@ Y2K compliance in libpng: ========================= - May 13, 2002 + May 21, 2002 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and - upward through 1.2.3rc6 are Y2K compliant. It is my belief that earlier + upward through 1.2.3 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer @@ -1,5 +1,5 @@ echo " - There is no \"configure\" script for Libpng-1.2.3rc6. Instead, please + There is no \"configure\" script for Libpng-1.2.3. Instead, please copy the appropriate makefile for your system from the \"scripts\" directory. Read the INSTALL file for more details. " @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "May 13, 2002" +.TH LIBPNG 3 "May 21, 2002" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3rc6 +libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3 .SH SYNOPSIS \fI\fB @@ -787,7 +787,7 @@ Following is a copy of the libpng.txt file that accompanies libpng. .SH LIBPNG.TXT libpng.txt - A description on how to use and modify libpng - libpng version 1.2.3rc6 - May 13, 2002 + libpng version 1.2.3 - May 21, 2002 Updated and distributed by Glenn Randers-Pehrson <randeg@alum.rpi.edu> Copyright (c) 1998-2002 Glenn Randers-Pehrson @@ -3088,18 +3088,17 @@ goes through callbacks that are user-settable. The default routines are in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change these functions, call the appropriate png_set_*_fn() function. -Memory allocation is done through the functions png_malloc(), png_zalloc(), +Memory allocation is done through the functions png_malloc() and png_free(). These currently just call the standard C functions. If your pointers can't access more then 64K at a time, you will want to set MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling memory allocation on a platform will change between applications, these functions must be modified in the library at compile time. If you prefer to use a different method of allocating and freeing data, you can use +png_create_read_struct_2() or png_create_write_struct_2() to register +your own functions as described above. - png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn) - -This function also provides a void pointer that can be retrieved via +These functions also provide a void pointer that can be retrieved via mem_ptr=png_get_mem_ptr(png_ptr); @@ -3109,7 +3108,7 @@ Your replacement memory functions must have prototypes as follows: png_size_t size); void free_fn(png_structp png_ptr, png_voidp ptr); -Your malloc_fn() can return NULL in case of failure. The png_malloc() +Your malloc_fn() should return NULL in case of failure. The png_malloc() function will call png_error() if it receives a NULL from the system memory allocator or from your replacement malloc_fn(). @@ -3638,13 +3637,13 @@ application: .SH IX. Y2K Compliance in libpng -May 13, 2002 +May 21, 2002 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.3rc6 are Y2K compliant. It is my belief that earlier +upward through 1.2.3 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that @@ -3832,7 +3831,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.2.3rc6 - May 13, 2002: +Libpng version 1.2.3 - May 21, 2002: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu). @@ -3849,7 +3848,7 @@ included in the libpng distribution, the latter shall prevail.) If you modify libpng you may insert additional notices immediately following this sentence. -libpng versions 1.0.7, July 1, 2000, through 1.2.3rc6, May 13, 2002, are +libpng versions 1.0.7, July 1, 2000, through 1.2.3, May 21, 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors @@ -3941,7 +3940,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson randeg@alum.rpi.edu -May 13, 2002 +May 21, 2002 .\" end of man page diff --git a/libpng.txt b/libpng.txt index 4576a7ad4..9bac75771 100644 --- a/libpng.txt +++ b/libpng.txt @@ -1,6 +1,6 @@ libpng.txt - A description on how to use and modify libpng - libpng version 1.2.3rc6 - May 13, 2002 + libpng version 1.2.3 - May 21, 2002 Updated and distributed by Glenn Randers-Pehrson <randeg@alum.rpi.edu> Copyright (c) 1998-2002 Glenn Randers-Pehrson @@ -2301,18 +2301,17 @@ goes through callbacks that are user-settable. The default routines are in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change these functions, call the appropriate png_set_*_fn() function. -Memory allocation is done through the functions png_malloc(), png_zalloc(), +Memory allocation is done through the functions png_malloc() and png_free(). These currently just call the standard C functions. If your pointers can't access more then 64K at a time, you will want to set MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling memory allocation on a platform will change between applications, these functions must be modified in the library at compile time. If you prefer to use a different method of allocating and freeing data, you can use +png_create_read_struct_2() or png_create_write_struct_2() to register +your own functions as described above. - png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn) - -This function also provides a void pointer that can be retrieved via +These functions also provide a void pointer that can be retrieved via mem_ptr=png_get_mem_ptr(png_ptr); @@ -2322,7 +2321,7 @@ Your replacement memory functions must have prototypes as follows: png_size_t size); void free_fn(png_structp png_ptr, png_voidp ptr); -Your malloc_fn() can return NULL in case of failure. The png_malloc() +Your malloc_fn() should return NULL in case of failure. The png_malloc() function will call png_error() if it receives a NULL from the system memory allocator or from your replacement malloc_fn(). @@ -2851,13 +2850,13 @@ application: IX. Y2K Compliance in libpng -May 13, 2002 +May 21, 2002 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.3rc6 are Y2K compliant. It is my belief that earlier +upward through 1.2.3 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that diff --git a/libpngpf.3 b/libpngpf.3 index baaee4946..e5c91e057 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "May 13, 2002" +.TH LIBPNGPF 3 "May 21, 2002" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3rc6 +libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3 (private functions) .SH SYNOPSIS \fB#include <png.h>\fP @@ -1,4 +1,4 @@ -.TH PNG 5 "May 13, 2002" +.TH PNG 5 "May 21, 2002" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * libpng version 1.2.3rc6 - May 13, 2002 + * libpng version 1.2.3 - May 21, 2002 * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -13,14 +13,14 @@ #include "png.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_2_3rc6 Your_png_h_is_not_version_1_2_3rc6; +typedef version_1_2_3 Your_png_h_is_not_version_1_2_3; /* Version information for C files. This had better match the version * string defined in png.h. */ #ifdef PNG_USE_GLOBAL_ARRAYS /* png_libpng_ver was changed to a function in version 1.0.5c */ -const char png_libpng_ver[18] = "1.2.3rc6"; +const char png_libpng_ver[18] = "1.2.3"; /* png_sig was changed to a function in version 1.0.5c */ /* Place to hold the signature string for a PNG file. */ @@ -663,7 +663,7 @@ png_charp PNGAPI png_get_copyright(png_structp png_ptr) { if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */ - return ((png_charp) "\n libpng version 1.2.3rc6 - May 13, 2002\n\ + return ((png_charp) "\n libpng version 1.2.3 - May 21, 2002\n\ Copyright (c) 1998-2002 Glenn Randers-Pehrson\n\ Copyright (c) 1996-1997 Andreas Dilger\n\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); @@ -681,8 +681,8 @@ png_get_libpng_ver(png_structp png_ptr) { /* Version of *.c files used when building libpng */ if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ - return((png_charp) "1.2.3rc6"); - return((png_charp) "1.2.3rc6"); + return((png_charp) "1.2.3"); + return((png_charp) "1.2.3"); } png_charp PNGAPI @@ -1,6 +1,6 @@ /* png.h - header file for PNG reference library * - * libpng version 1.2.3rc6 - May 13, 2002 + * libpng version 1.2.3 - May 21, 2002 * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -8,7 +8,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.2.3rc6 - May 13, 2002: Glenn + * libpng versions 0.97, January 1998, through 1.2.3 - May 21, 2002: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -117,7 +117,7 @@ * If you modify libpng you may insert additional notices immediately following * this sentence. * - * libpng versions 1.0.7, July 1, 2000, through 1.2.3rc6, May 13, 2002, are + * libpng versions 1.0.7, July 1, 2000, through 1.2.3, May 21, 2002, are * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.0.6 * with the following individuals added to the list of Contributing Authors @@ -222,13 +222,13 @@ * Y2K compliance in libpng: * ========================= * - * May 13, 2002 + * May 21, 2002 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.2.3rc6 are Y2K compliant. It is my belief that earlier + * upward through 1.2.3 are Y2K compliant. It is my belief that earlier * versions were also Y2K compliant. * * Libpng only has three year fields. One is a 2-byte unsigned integer @@ -284,7 +284,7 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.2.3rc6" +#define PNG_LIBPNG_VER_STRING "1.2.3" #define PNG_LIBPNG_VER_SONUM 0 #define PNG_LIBPNG_VER_DLLNUM %DLLNUM% @@ -296,7 +296,7 @@ /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ -#define PNG_LIBPNG_VER_BUILD 6 +#define PNG_LIBPNG_VER_BUILD 0 #define PNG_LIBPNG_BUILD_ALPHA 1 #define PNG_LIBPNG_BUILD_BETA 2 @@ -304,7 +304,7 @@ #define PNG_LIBPNG_BUILD_STABLE 4 #define PNG_LIBPNG_BUILD_TYPEMASK 7 #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with STABLE only */ -#define PNG_LIBPNG_BUILD_TYPE 3 +#define PNG_LIBPNG_BUILD_TYPE 4 /* Careful here. At one time, Guy wanted to use 082, but that would be octal. * We must not include leading zeros. @@ -1264,9 +1264,9 @@ struct png_struct_def /* This prevents a compiler error in png.c if png.c and png.h are both at - version 1.2.3rc6 + version 1.2.3 */ -typedef png_structp version_1_2_3rc6; +typedef png_structp version_1_2_3; typedef png_struct FAR * FAR * png_structpp; @@ -2388,7 +2388,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp /* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */ #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.2.3rc6 - May 13, 2002 (header)\n" + " libpng version 1.2.3 - May 21, 2002 (header)\n" #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED /* With these routines we avoid an integer divide, which will be slower on diff --git a/pngasmrd.h b/pngasmrd.h index dfee05c71..2cb38e230 100644 --- a/pngasmrd.h +++ b/pngasmrd.h @@ -1,6 +1,6 @@ /* pngasmrd.h - assembler version of utilities to read a PNG file * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 2002 Glenn Randers-Pehrson * @@ -1,6 +1,6 @@ /* pngconf.h - machine configurable file for libpng * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngerror.c b/pngerror.c index 6eac62328..aeb06e5b2 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,7 +1,7 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -92,13 +92,13 @@ png_warning(png_structp png_ptr, png_const_charp warning_message) } } if (png_ptr->warning_fn != NULL) - (*(png_ptr->warning_fn))(png_ptr, (png_const_charp) - (warning_message+offset)); + (*(png_ptr->warning_fn))(png_ptr, + (png_const_charp)(warning_message+offset)); else png_default_warning(png_ptr, (png_const_charp)(warning_message+offset)); } -/* These utilities are used internally to build a warning message that relates +/* These utilities are used internally to build an error message that relates * to the current chunk. The chunk name comes from png_ptr->chunk_name, * this is used to prefix the message. The message is limited in length * to 63 bytes, the name characters are output as hex digits wrapped in [] diff --git a/pnggccrd.c b/pnggccrd.c index 05233c7d1..e6560bc97 100644 --- a/pnggccrd.c +++ b/pnggccrd.c @@ -6,7 +6,7 @@ * and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm * for Intel's performance analysis of the MMX vs. non-MMX code. * - * libpng version 1.2.3rc6 - May 13, 2002 + * libpng version 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * Copyright (c) 1998, Intel Corporation @@ -1,7 +1,7 @@ /* pngget.c - retrieval of values from info struct * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -1,7 +1,7 @@ /* pngmem.c - stub functions for memory allocation * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngpread.c b/pngpread.c index dd26afa63..452854d8a 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1,7 +1,7 @@ /* pngpread.c - read a png file in push mode * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -1,7 +1,7 @@ /* pngread.c - read a PNG file * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -795,7 +795,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) * not called png_set_interlace_handling(), the display_row buffer will * be ignored, so pass NULL to it. * - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.3rc6 + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.3 */ void PNGAPI @@ -844,7 +844,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row, * only call this function once. If you desire to have an image for * each pass of a interlaced image, use png_read_rows() instead. * - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.3rc6 + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.3 */ void PNGAPI png_read_image(png_structp png_ptr, png_bytepp image) @@ -1,7 +1,7 @@ /* pngrio.c - functions for data input * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngrtran.c b/pngrtran.c index 3542c6d11..b4dd25d87 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngrutil.c b/pngrutil.c index 2ff400754..44322383f 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -1,7 +1,7 @@ /* pngset.c - storage of image information into info struct * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -1,7 +1,7 @@ /* pngtest.c - a simple test program to test libpng * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -1512,4 +1512,4 @@ main(int argc, char *argv[]) } /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_2_3rc6 your_png_h_is_not_version_1_2_3rc6; +typedef version_1_2_3 your_png_h_is_not_version_1_2_3; diff --git a/pngtrans.c b/pngtrans.c index fc366c886..fd34bf696 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,7 +1,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -2,7 +2,7 @@ * * For Intel x86 CPU and Microsoft Visual C++ compiler * - * libpng version 1.2.3rc6 - May 13, 2002 + * libpng version 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * Copyright (c) 1998, Intel Corporation @@ -1,7 +1,7 @@ /* pngwio.c - functions for data output * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngwrite.c b/pngwrite.c index bf8f8fd30..bc302be17 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,7 +1,7 @@ /* pngwrite.c - general routines to write a PNG file * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngwtran.c b/pngwtran.c index c75e3f92c..07ebacacb 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -1,7 +1,7 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngwutil.c b/pngwutil.c index ec36d6449..f84f93153 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * libpng 1.2.3rc6 - May 13, 2002 + * libpng 1.2.3 - May 21, 2002 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2002 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/projects/msvc/README.txt b/projects/msvc/README.txt index ea0a4f69b..d215d7800 100644 --- a/projects/msvc/README.txt +++ b/projects/msvc/README.txt @@ -1,5 +1,5 @@ Microsoft Developer Studio Build File, Format Version 6.00 for -libpng 1.2.3rc6 (May 13, 2002) and zlib +libpng 1.2.3 (May 21, 2002) and zlib Copyright (C) 2000 Simon-Pierre Cadieux For conditions of distribution and use, see copyright notice in png.h @@ -9,14 +9,19 @@ Assumes that zlib sources have been copied to ..\..\..\zlib To build: -1) On the main menu Select "Build|Set Active configuration". +0) On the main menu, select "File | Open Workspace" and then + select "libpng.dsw". + +1) On the main menu Select "Build | Set Active configuration". Among the configurations beginning with "libpng" select the one you wish to build (the corresponding "zlib" configuration will be built automatically). -2) Select "Build|Clean" +2) Select "Build | Clean" -3) Select "Build|Rebuild All" +3) Select "Build | Rebuild All". Ignore warning messages about + not being able to find certain include files (e.g., m68881.h, + alloc.h). 4) Look in the appropriate "win32" subdirectories for both "zlib" and "libpng" binaries. @@ -25,13 +30,15 @@ This project will build the PNG Development Group's "official" versions of libpng and zlib libraries: libpng12.dll (default version, currently C code only) - libpng12.dll (C + Assembler version) - libpng12.dll (C + Assembler debug version) - libpng12.dll (C code debug version) + libpng12a.dll (C + Assembler version) + libpng12b.dll (C + Assembler debug version) + libpng12d.dll (C code debug version) + libpng12vb.dll (version for VB, uses "stdcall" protocol) libpng12[c,e-m].dll (reserved for official versions) libpng12[n-z].dll (available for private versions) zlib.dll (default version, currently C code only) zlibd.dll (debug version) + zlibvb.dll (version for Visual Basic, uses "stdcall" protocol) If you change anything in libpng, or select different compiler settings, please change the library name to an unreserved name, and define @@ -45,3 +52,6 @@ above mentioned libraries you should also include this DLL in your package. For a list of files that are redistributable in Visual C++ 6.0, see Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs. +5) For an example workspace that builds an application using the resulting + DLLs, go to Libpng's contrib\msvctest directory and use it to build + and run "pngtest". diff --git a/projects/msvc/png32ms.def b/projects/msvc/png32ms.def index dfe610382..233957d58 100644 --- a/projects/msvc/png32ms.def +++ b/projects/msvc/png32ms.def @@ -6,7 +6,7 @@ LIBRARY DESCRIPTION "PNG image compression library for Windows" EXPORTS -;Version 1.2.3rc6 +;Version 1.2.3 png_build_grayscale_palette @1 png_check_sig @2 png_chunk_error @3 diff --git a/projects/netware.txt b/projects/netware.txt index 28338587a..806a954b5 100644 --- a/projects/netware.txt +++ b/projects/netware.txt @@ -1,6 +1,6 @@ A set of project files is available for Netware. Get -libpng-1.2.3rc6-project-netware.zip from a libpng distribution +libpng-1.2.3-project-netware.zip from a libpng distribution site such as http://libpng.sourceforge.net Put the zip file in this directory (projects) and then run -"unzip -a libpng-1.2.3rc6-project-netware.zip" +"unzip -a libpng-1.2.3-project-netware.zip" diff --git a/projects/wince.txt b/projects/wince.txt index 34b1dd45c..e89b34670 100644 --- a/projects/wince.txt +++ b/projects/wince.txt @@ -1,6 +1,6 @@ A set of project files is available for WinCE. Get -libpng-1.2.3rc6-project-wince.zip from a libpng distribution +libpng-1.2.3-project-wince.zip from a libpng distribution site such as http://libpng.sourceforge.net Put the zip file in this directory (projects) and then run -"unzip -a libpng-1.2.3rc6-project-wince.zip" +"unzip -a libpng-1.2.3-project-wince.zip" diff --git a/scripts/libpng-config-body.in b/scripts/libpng-config-body.in index ad3697f4f..ad3697f4f 100644..100755 --- a/scripts/libpng-config-body.in +++ b/scripts/libpng-config-body.in diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in index 5196c43a2..ebbfe7f80 100644..100755 --- a/scripts/libpng-config-head.in +++ b/scripts/libpng-config-head.in @@ -8,7 +8,7 @@ # Modeled after libxml-config. -version=1.2.3rc6 +version=1.2.3 prefix="" cppflags="" cflags="" diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in index 4024c6e68..81e37107c 100644 --- a/scripts/libpng.pc.in +++ b/scripts/libpng.pc.in @@ -6,6 +6,6 @@ includedir=${exec_prefix}/include Name: libpng12 Description: Loads and saves PNG files -Version: 1.2.3rc6 +Version: 1.2.3 Libs: -L${libdir} -lpng12 -lz -lm Cflags: -I${includedir}/libpng12 diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu index 25db68989..58efd8332 100644 --- a/scripts/makefile.32sunu +++ b/scripts/makefile.32sunu @@ -33,7 +33,7 @@ RANLIB=echo LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) INCPATH=$(prefix)/include @@ -51,6 +51,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -110,68 +115,63 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; \ ln -f -s $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s libpng12.pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig + -@/bin/rm -f $(DL)/pkgconfig/libpng12.pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/libpng12.pc + chmod 644 $(DL)/pkgconfig/libpng12.pc + (cd $(DL)/pkgconfig; ln -f -s libpng12.pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng12-config - cp libpng-config $(DESTDIR)$(BINPATH)/libpng12-config - chmod 755 $(DESTDIR)$(BINPATH)/libpng12-config - (cd $(DESTDIR)$(BINPATH); ln -sf libpng12-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/libpng12-config + cp libpng-config $(DB)/libpng12-config + chmod 755 $(DB)/libpng12-config + (cd $(DB); ln -sf libpng12-config libpng-config) install: install-static install-shared install-man install-config diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu index 323f5475c..d6c89cd98 100644 --- a/scripts/makefile.64sunu +++ b/scripts/makefile.64sunu @@ -33,7 +33,7 @@ RANLIB=echo LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) INCPATH=$(prefix)/include @@ -51,6 +51,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -110,68 +115,63 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; \ ln -f -s $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.aix b/scripts/makefile.aix index 857851529..f5a75a50d 100644 --- a/scripts/makefile.aix +++ b/scripts/makefile.aix @@ -16,10 +16,8 @@ AR = ar rcs RANLIB = ranlib RM = rm -f -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc4 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) prefix=/usr/local @@ -36,6 +34,9 @@ LIBPATH=$(prefix)/lib # you execute make install. DESTDIR= +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) + CDEBUG = -g -DPNG_DEBUG=5 LDDEBUG = CRELEASE = -O2 @@ -67,17 +68,16 @@ pngtest$(E): pngtest$(O) libpng$(A) $(LD) -o $@ pngtest$(O) $(LDFLAGS) install: libpng.a - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/libpng ]; then mkdir \ - $(DESTDIR)$(INCPATH)/libpng; fi - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@rm $(DESTDIR)$(INCPATH)/png.h - -@rm $(DESTDIR)$(INCPATH)/pngconf.h - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h \ - $(DESTDIR)$(INCPATH)/libpng/pngconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/libpng ]; then mkdir $(DI)/libpng; fi + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@rm $(DI)/png.h + -@rm $(DI)/pngconf.h + cp png.h pngconf.h $(DI)/libpng + chmod 644 $(DI)/libpng/png.h \ + $(DI)/libpng/pngconf.h + (cd $(DI); ln -f -s libpng/* .) + cp libpng.a $(DL) clean: /bin/rm -f *.o libpng.a pngtest pngout.png diff --git a/scripts/makefile.beos b/scripts/makefile.beos index 5f7e4bc05..90793c4f9 100644 --- a/scripts/makefile.beos +++ b/scripts/makefile.beos @@ -11,10 +11,8 @@ CC=gcc ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) ALIGN= @@ -52,6 +50,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + LIBNAME=libpng12 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ @@ -100,67 +103,62 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin index 6e78b92b5..d406afb41 100644 --- a/scripts/makefile.cygwin +++ b/scripts/makefile.cygwin @@ -1,15 +1,16 @@ # makefile for cygwin on x86 -# builds both dll (with import lib) and static lib versions +# Builds both dll (with import lib) and static lib versions # of the library, and builds two copies of pngtest: one # statically linked and one dynamically linked. # +# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson # based on makefile for linux-elf w/mmx by: # Copyright (C) 1998-2000 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # For conditions of distribution and use, see copyright notice in png.h -# this makefile intends to support building outside the src directory -# if desired. when invoking it, specify an argument to SRCDIR on the +# This makefile intends to support building outside the src directory +# if desired. When invoking it, specify an argument to SRCDIR on the # command line that points to the top of the directory where your source # is located. @@ -19,7 +20,7 @@ else SRCDIR = . endif -# override DESTDIR= on the make install command line to easily support +# Override DESTDIR= on the make install command line to easily support # installing into a temporary location. Example: # # make install DESTDIR=/tmp/build/libpng @@ -30,12 +31,9 @@ endif DESTDIR= -# cosmetic: shortened strings: -S =$(SRCDIR) -D =$(DESTDIR) - # To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to -# $CFLAGS, and include pnggccrd.o in $OBJS, below. +# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency +# list at the bottom of this makefile. CC=gcc ifdef MINGW @@ -43,7 +41,7 @@ MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw endif -# where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h +# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h ifndef prefix prefix=/usr $(warning You haven't specified a 'prefix=' location. Defaulting to "/usr") @@ -81,7 +79,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ LIBNAME = libpng12 PNGMAJ = 0 PNGDLL = 12 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) SHAREDLIB=cygpng$(PNGDLL).dll @@ -107,6 +105,13 @@ MANPATH=$(prefix)/man MAN3PATH=$(MANPATH)/man3 MAN5PATH=$(MANPATH)/man5 +# cosmetic: shortened strings: +S =$(SRCDIR) +D =$(DESTDIR) +DB =$(D)/$(BINPATH) +DI =$(D)/$(INCPATH) +DL =$(D)/$(LIBPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o # pnggccrd.o @@ -123,7 +128,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) all: all-static all-shared libpng.pc libpng-config -# make this to verify that "make [...] install" will do what you want. +# Make this to verify that "make [...] install" will do what you want. buildsetup-tell: @echo VPATH is set to: \"$(VPATH)\" @echo prefix is set to: \"$(prefix)\" @@ -134,9 +139,10 @@ buildsetup-tell: libpng.pc: scripts/libpng.pc.in @echo -e Making pkg-config file for this libpng installation..'\n' \ using PREFIX=\"$(prefix)\"'\n' - cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ + sed -e s/-lm// > libpng.pc -libpng-config: scripts/libpng-config.in +libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ installation..'\n' using PREFIX=\"$(prefix)\"'\n' ( cat $(S)/scripts/libpng-config-head.in; \ @@ -155,15 +161,15 @@ all-shared: $(SHAREDLIB) pngtest$(EXE) pnggccrd.o: pnggccrd.c png.h pngconf.h @echo "" - @echo ' You can ignore the single "control reaches end of non-void function"' - @echo ' warning and multiple "<variable> defined but not used" warnings:' + @echo ' You can ignore the "control reaches end of non-void function"' + @echo ' warning and "<variable> defined but not used" warnings:' @echo "" $(CC) -c $(CFLAGS) -o $@ $< pnggccrd.pic.o: pnggccrd.c png.h pngconf.h @echo "" - @echo ' You can ignore the single "control reaches end of non-void function"' - @echo ' warning and multiple "<variable> defined but not used" warnings:' + @echo ' You can ignore the "control reaches end of non-void function"' + @echo ' warning and "<variable> defined but not used" warnings:' @echo "" $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $< @@ -199,62 +205,56 @@ test-shared: pngtest$(EXE) ./pngtest $(S)/pngtest.png install-static: $(STATLIB) install-headers install-man - -@if [ ! -d $(D)$(LIBPATH) ]; then $(MKDIR) $(D)$(LIBPATH); fi - install -m 644 $(STATLIB) $(D)$(LIBPATH)/$(LIBNAME).a - -@rm -f $(D)$(LIBPATH)/$(STATLIB) - (cd $(D)$(LIBPATH); ln -sf $(LIBNAME).a $(STATLIB)) + -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi + install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a + -@rm -f $(DL)/$(STATLIB) + (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB)) install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man - -@if [ ! -d $(D)$(LIBPATH) ]; then $(MKDIR) $(D)$(LIBPATH); fi - -@if [ ! -d $(D)$(BINPATH) ]; then $(MKDIR) $(D)$(BINPATH); fi - -@if [ ! -d $(D)$(LIBPATH)/pkgconfig ]; then \ - $(MKDIR) $(D)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(D)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(D)$(LIBPATH)/pkgconfig/libpng.pc - install -m 644 $(IMPLIB) $(D)$(LIBPATH)/$(LIBNAME).dll.a - -@rm -f $(D)$(LIBPATH)/$(IMPLIB) - (cd $(D)$(LIBPATH); ln -sf $(LIBNAME).dll.a $(IMPLIB)) - install -s -m 755 $(SHAREDLIB) $(D)$(BINPATH) - install -m 644 libpng.pc $(D)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(D)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi + -@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a + -@rm -f $(DL)/$(IMPLIB) + (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB)) + install -s -m 755 $(SHAREDLIB) $(DB) + install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) install-headers: - -@if [ ! -d $(D)$(INCPATH) ]; then \ - $(MKDIR) $(D)$(INCPATH); fi - -@if [ ! -d $(D)$(INCPATH)/$(LIBNAME) ]; then \ - $(MKDIR) $(D)$(INCPATH)/$(LIBNAME); fi - -@rm -f $(D)$(INCPATH)/png.h - -@rm -f $(D)$(INCPATH)/pngconf.h - install -m 644 $(S)/png.h $(S)/pngconf.h $(D)$(INCPATH)/$(LIBNAME) - -@rm -f $(D)$(INCPATH)/libpng - (cd $(D)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi + -@rm -f $(DI)/png.h + -@rm -f $(DI)/pngconf.h + install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME) + -@rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-man: - -@if [ ! -d $(D)$(MAN3PATH) ]; then \ - $(MKDIR) $(D)$(MAN3PATH); fi - -@if [ ! -d $(D)$(MAN5PATH) ]; then \ - $(MKDIR) $(D)$(MAN5PATH); fi + -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi + -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH) install -m 644 $(S)/png.5 $(D)$(MAN5PATH) install-config: libpng-config - -@if [ ! -d $(D)$(BINPATH) ]; then \ - mkdir $(D)$(BINPATH); fi - -@/bin/rm -f $(D)$(BINPATH)/libpng-config - -@/bin/rm -f $(D)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(D)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(D)$(BINPATH)/$(LIBNAME)-config - (cd $(D)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) - -# run this to verify that a future `configure' run will pick up the settings + -@if [ ! -d $(DB) ]; then mkdir $(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) + +# Run this to verify that a future `configure' run will pick up the settings # you want. test-config-install: SHELL=/bin/bash -test-config-install: $(D)$(BINPATH)/libpng-config +test-config-install: $(DB)/libpng-config @echo -e Testing libpng-config functions...'\n' @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \ do \ - printf "(%d)\t %s = %s\n" $$(($$gytiu + 1)) $$TYRA \ - "$$($(D)$(BINPATH)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \ + printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \ + "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \ gytiu=$$(( $$gytiu + 1 )); \ done @@ -295,5 +295,3 @@ pngtest-stat.o: png.h pngconf.h pngtest.c - - diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin index 4e8901ebb..05388ceca 100644 --- a/scripts/makefile.darwin +++ b/scripts/makefile.darwin @@ -17,15 +17,13 @@ ZLIBINC=../zlib CC=cc CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz +LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz #RANLIB=echo RANLIB=ranlib -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -44,6 +42,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -83,7 +86,7 @@ $(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGVER).dylib: $(OBJSDLL) $(CC) -dynamiclib \ - -install_name $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \ + -install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \ -current_version $(PNGMIN) -compatibility_version $(PNGMIN) \ -o $(LIBNAME).$(PNGVER).dylib \ $(OBJSDLL) -L$(ZLIBLIB) -lz @@ -95,67 +98,62 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).dylib libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.dylib - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).dylib - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.dylib - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.3.dylib - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.3.*.dylib - cp $(LIBNAME).$(PNGVER).dylib $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGVER).dylib - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib + -@/bin/rm -f $(DL)/$(LIBNAME).dylib + -@/bin/rm -f $(DL)/libpng.dylib + -@/bin/rm -f $(DL)/libpng.3.dylib + -@/bin/rm -f $(DL)/libpng.3.*.dylib + cp $(LIBNAME).$(PNGVER).dylib $(DL) + chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib + (cd $(DL); \ ln -sf $(LIBNAME).$(PNGVER).dylib libpng.dylib; \ ln -sf $(LIBNAME).$(PNGVER).dylib libpng.3.dylib; \ ln -sf $(LIBNAME).$(PNGVER).dylib libpng.3.$(PNGMIN).dylib; \ ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \ ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.dec b/scripts/makefile.dec index 1dbf3b8b1..5c6a9d96c 100644 --- a/scripts/makefile.dec +++ b/scripts/makefile.dec @@ -20,16 +20,19 @@ BINPATH=$(prefix)/bin # 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 ZLIBLIB=../zlib ZLIBINC=../zlib -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -79,67 +82,62 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd index 717e755d5..d7d5faedd 100644 --- a/scripts/makefile.freebsd +++ b/scripts/makefile.freebsd @@ -1,107 +1,48 @@ # makefile for libpng under FreeBSD # Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # For conditions of distribution and use, see copyright notice in png.h -.include <bsd.own.mk> +PREFIX?= /usr/local +SHLIB_VER?= 5 -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man - -# 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, that location must already exist before -# you execute make install. -DESTDIR= +LIB= png +SHLIB_MAJOR= ${SHLIB_VER} +SHLIB_MINOR= 0 +NOPROFILE= YES +NOOBJ= YES -PNGMAJ= 5 -.if (${OBJFORMAT} == "elf") -PNGVER= $(PNGMAJ) -.else -PNGMIN= 0 -PNGVER= $(PNGMAJ).$(PNGMIN) -.endif +# where make install puts libpng.a and png.h +DESTDIR= ${PREFIX} +LIBDIR= /lib +INCS= png.h pngconf.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 +LDADD+= -lm -lz +DPADD+= ${LIBM} ${LIBZ} CFLAGS+= -I. -DPNG_USE_PNGGCCRD .if (${MACHINE_ARCH} != "i386") CFLAGS+= -DPNG_NO_ASSEMBLER_CODE .endif -LDFLAGS+=-L. -lpng -lz -lm -static - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o - -.SUFFIXES: .c .so .o - -.c.so: - ${CC} ${CFLAGS} -fPIC -DPIC -o $@ -c $< - -all: libpng.a libpng.so.${PNGVER} pngtest -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.so.${PNGVER}: $(OBJS:S/o$/so/g) -.if (${OBJFORMAT} == "elf") - ${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm -.else - ${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm -.endif +SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm + +CLEANFILES= pngtest pngtest.o pngout.png test: pngtest ./pngtest -install: libpng.a libpng.so.${PNGVER} - -@mkdir $(DESTDIR)$(INCPATH)/libpng - ${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \ - png.h pngconf.h $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); rm -f png.h pngconf.h; ln -sf libpng/*.h .) - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - libpng.a libpng.so.${PNGVER} $(DESTDIR)$(LIBPATH) - $(RANLIB) $(DESTDIR)$(LIBPATH)/libpng.a - ln -sf libpng.so.${PNGVER} $(DESTDIR)$(LIBPATH)/libpng.so - /sbin/ldconfig -R - ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \ - libpng.3 libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \ - png.5 $(DESTDIR)$(MANPATH)/man5 - -clean: - rm -f *.o *.so libpng.a libpng.so.${PNGVER} pngtest pngout.png - DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: chmod a-w *.[ch35] $(DOCS) scripts/* -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pnggccrd.o: png.h pngconf.h - +.include <bsd.lib.mk> diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx index a7cac2c0f..abde79c1f 100644 --- a/scripts/makefile.gcmmx +++ b/scripts/makefile.gcmmx @@ -15,7 +15,7 @@ LIBNAME = libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -75,6 +75,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o @@ -139,67 +144,62 @@ test: pngtest pngtest-static ./pngtest-static install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc index 5e8bc27aa..6f78470ea 100644 --- a/scripts/makefile.hpgcc +++ b/scripts/makefile.hpgcc @@ -26,16 +26,14 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 -#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm +#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm RANLIB=ranlib #RANLIB=echo -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -54,6 +52,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -102,68 +105,63 @@ test: pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then \ - mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).sl.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).sl.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).sl + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).sl.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3; \ ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3.$(PNGMIN); \ ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \ ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \ - $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \ + $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux index 9c9b9ccd4..4a307100f 100644 --- a/scripts/makefile.hpux +++ b/scripts/makefile.hpux @@ -16,10 +16,8 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm RANLIB=ranlib -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -40,6 +38,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -88,67 +91,62 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).sl.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.sl - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.sl.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.sl.3.* - cp $(LIBNAME).sl.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).sl + -@/bin/rm -f $(DL)/libpng.sl + -@/bin/rm -f $(DL)/libpng.sl.3 + -@/bin/rm -f $(DL)/libpng.sl.3.* + cp $(LIBNAME).sl.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl; \ ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3; \ ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3.$(PNGMIN); \ ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \ ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.linux b/scripts/makefile.linux index 8ab6e7784..e8637accf 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -5,7 +5,7 @@ LIBNAME = libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -54,6 +54,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -112,67 +117,63 @@ test: pngtest pngtest-static ./pngtest-static install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \ - $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \ + $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.macosx b/scripts/makefile.macosx index b8c916a0b..16c3cce83 100644 --- a/scripts/makefile.macosx +++ b/scripts/makefile.macosx @@ -17,7 +17,7 @@ ZLIBINC=../zlib CC=cc PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 @@ -42,6 +42,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + #RANLIB=echo RANLIB=ranlib @@ -81,35 +86,34 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; \ ln -f -s $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@/bin/rm -f \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX) - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(SHAREDLIB_POSTFIX) + $(DL)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX) + -@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX) -@/bin/rm -f libpng.$(SHARED_POSTFIX) -@/bin/rm -f libpng.3.$(SHARED_POSTFIX) -@/bin/rm -f libpng.3.*.$(SHARED_POSTFIX) - cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) - (cd $(DESTDIR)$(LIBPATH); \ + cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL) + chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) + (cd $(DL); \ ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \ libpng.$(SHARED_POSTFIX); \ ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \ @@ -120,35 +124,31 @@ install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) libpng $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \ ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \ $(LIBNAME).$(SHAREDLIB_POSTFIX)) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd index cbb0a6227..6f47a5b64 100644 --- a/scripts/makefile.ne12bsd +++ b/scripts/makefile.ne12bsd @@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12 LIB= png12 SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.3rc6 +SHLIB_MINOR= 1.2.3 SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd index eea55f807..705647880 100644 --- a/scripts/makefile.netbsd +++ b/scripts/makefile.netbsd @@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng LIB= png SHLIB_MAJOR= 3 -SHLIB_MINOR= 1.2.3rc6 +SHLIB_MINOR= 1.2.3 SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd index fdd830da5..0edaee0f6 100644 --- a/scripts/makefile.openbsd +++ b/scripts/makefile.openbsd @@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib MANDIR= ${PREFIX}/man/cat SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.3rc4 +SHLIB_MINOR= 1.2.3 LIB= png SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ diff --git a/scripts/makefile.sco b/scripts/makefile.sco index 08d556d99..061e3e24d 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -18,15 +18,13 @@ ZLIBLIB=../zlib ZLIBINC=../zlib CFLAGS= -dy -belf -I$(ZLIBINC) -O3 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm +LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm #RANLIB=ranlib RANLIB=echo -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -45,6 +43,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -93,70 +96,65 @@ test: pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/pngconf.h - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + -@/bin/rm -f $(DI)/png.h + -@/bin/rm -f $(DI)/pngconf.h + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; \ ln -f -s $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc index 985a355cf..d1c6e7eca 100644 --- a/scripts/makefile.sggcc +++ b/scripts/makefile.sggcc @@ -5,18 +5,6 @@ # 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, that location must already exist before -# you execute make install. -DESTDIR= # Where the zlib library and include files are located ZLIBLIB=/usr/local/lib32 @@ -38,7 +26,7 @@ LDSHARED=CC $(ABI) -shared LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBS=$(LIBNAME).so.$(PNGVER) INCPATH=$(prefix)/include @@ -56,6 +44,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + RANLIB=echo #RANLIB=ranlib @@ -97,68 +90,63 @@ test: pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; \ ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi index e8b64910f..8c0d557e2 100644 --- a/scripts/makefile.sgi +++ b/scripts/makefile.sgi @@ -31,7 +31,7 @@ LDSHARED=cc $(ABI) -shared LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) RANLIB=echo @@ -54,6 +54,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -93,68 +98,63 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; \ ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(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 $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/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 $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.so9 b/scripts/makefile.so9 index a0675d7af..249b16844 100644 --- a/scripts/makefile.so9 +++ b/scripts/makefile.so9 @@ -28,15 +28,13 @@ ZLIBINC=/usr/include -Wstrict-prototypes -Wmissing-prototypes #-Wconversion #CFLAGS=-I$(ZLIBINC) -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 CFLAGS=-I$(ZLIBINC) -O3 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm #RANLIB=ranlib RANLIB=echo -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -55,6 +53,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -114,68 +117,64 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DI); ln -f -s $(LIBNAME) libpng; \ ln -f -s $(LIBNAME)/* .) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \ - $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \ + $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index 3e6628498..6e678b7a7 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -24,15 +24,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion CFLAGS=-I$(ZLIBINC) -Wall -O3 \ # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm #RANLIB=ranlib RANLIB=echo -# read libpng.txt or png.h to see why PNGMAJ is 0. You should not -# have to change it. PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -51,6 +49,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -111,68 +114,63 @@ test: pngtest ./pngtest install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; \ ln -f -s $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \ - mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(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 $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(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 diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas index b60afc7b2..c39c2f047 100644 --- a/scripts/pngdef.pas +++ b/scripts/pngdef.pas @@ -7,7 +7,7 @@ unit pngdef; interface const - PNG_LIBPNG_VER_STRING = '1.2.3rc6'; + PNG_LIBPNG_VER_STRING = '1.2.3'; PNG_LIBPNG_VER = 10203; type diff --git a/scripts/pngos2.def b/scripts/pngos2.def index 9f0540e1c..2ad1e4241 100644 --- a/scripts/pngos2.def +++ b/scripts/pngos2.def @@ -2,7 +2,7 @@ ; PNG.LIB module definition file for OS/2 ;---------------------------------------- -; Version 1.2.3rc6 +; Version 1.2.3 LIBRARY PNG DESCRIPTION "PNG image compression library for OS/2" |