From 9b65ad49d3269afc7e0eefe1f75c19aed7d28212 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Sun, 18 Sep 2022 19:37:40 +0300 Subject: scripts: Remove the support for "install" targets from all makefiles In most of the legacy makefiles (with only a few notable exceptions such as makefile.linux), the "install" targets have been broken since libpng-1.5.0beta01. Specifically, the "install-shared" targets produced incorrect library names, due to a missing symbol in the definition of the LIBSOREL macro. Rather than correcting this long-standing and long-untested error, we decided to remove the support for "make install" altogether, from all legacy makefiles. Further use of "make install", "make install-static" or "make install-shared" will fail with an error message. Going forward, the only tested and supported manners to install libpng shall be the conventional build and install procedures driven by the configure script or by the CMake file. --- INSTALL | 10 ++-- scripts/makefile.32sunu | 143 ++++++---------------------------------------- scripts/makefile.64sunu | 143 ++++++---------------------------------------- scripts/makefile.aix | 51 +++-------------- scripts/makefile.atari | 38 ++----------- scripts/makefile.beos | 137 ++++++-------------------------------------- scripts/makefile.darwin | 141 ++++++--------------------------------------- scripts/makefile.dec | 143 ++++++---------------------------------------- scripts/makefile.dj2 | 11 ++-- scripts/makefile.freebsd | 39 +++++-------- scripts/makefile.hp64 | 139 ++++++--------------------------------------- scripts/makefile.hpgcc | 138 +++++--------------------------------------- scripts/makefile.hpux | 139 ++++++--------------------------------------- scripts/makefile.linux | 143 ++++++---------------------------------------- scripts/makefile.mips | 41 ++------------ scripts/makefile.msys | 107 +++++----------------------------- scripts/makefile.netbsd | 30 +++++----- scripts/makefile.openbsd | 58 +++---------------- scripts/makefile.sco | 141 ++++++--------------------------------------- scripts/makefile.sggcc | 145 +++++------------------------------------------ scripts/makefile.sgi | 145 +++++------------------------------------------ scripts/makefile.so9 | 140 ++++++--------------------------------------- scripts/makefile.solaris | 141 ++++++--------------------------------------- scripts/makefile.std | 36 +----------- scripts/makefile.sunos | 35 +----------- 25 files changed, 309 insertions(+), 2125 deletions(-) diff --git a/INSTALL b/INSTALL index d3aaa2884..042d72929 100644 --- a/INSTALL +++ b/INSTALL @@ -192,11 +192,11 @@ test. For more confidence, you can run another test by typing Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare your output with the result shown in contrib/pngsuite/README. -Most of the makefiles will allow you to run "make install" to -put the library in its final resting place (if you want to -do that, run "make install" in the zlib directory first if necessary). -Some also allow you to run "make test-installed" after you have -run "make install". +Most of the makefiles used to allow you to run "make install" to put +the library in its final resting place, but that feature is no longer +supported. The only tested and supported manners to install libpng are +the conventional build and install procedures driven by the configure +script or by the CMake file. VIII. Configuring for DOS and other 16-bit platforms diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu index 2993e0f4c..ea4894e74 100644 --- a/scripts/makefile.32sunu +++ b/scripts/makefile.32sunu @@ -4,20 +4,18 @@ # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: LIBNAME=libpng16 -PNGMAJ = 16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=cc @@ -30,10 +28,6 @@ RM_F=/bin/rm -f SUN_CC_FLAGS=-fast -xtarget=ultra SUN_LD_FLAGS=-fast -xtarget=ultra -# where make install puts libpng.a, libpng16.so and libpng16/png.h -prefix=/a -exec_prefix=$(prefix) - # Where the zlib library and include files are located # Changing these to ../zlib poses a security risk. If you want # to have zlib in an adjacent directory, specify the full path instead of "..". @@ -50,26 +44,6 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o @@ -84,7 +58,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest include scripts/pnglibconf.mak DELETE = $(RM_F) @@ -94,26 +68,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo ccopts=\"-fast -xtarget=ultra\"; \ - echo ldopts=\"-fast -xtarget=ultra\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -139,86 +93,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu index 567c7e612..3f603d3f1 100644 --- a/scripts/makefile.64sunu +++ b/scripts/makefile.64sunu @@ -4,20 +4,18 @@ # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger - +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: LIBNAME=libpng16 -PNGMAJ = 16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=cc @@ -30,10 +28,6 @@ RM_F=/bin/rm -f SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9 SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9 -# where make install puts libpng.a, libpng16.so and libpng16/png.h -prefix=/a -exec_prefix=$(prefix) - # Where the zlib library and include files are located # Changing these to ../zlib poses a security risk. If you want # to have zlib in an adjacent directory, specify the full path instead of "..". @@ -50,26 +44,6 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o @@ -84,7 +58,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest include scripts/pnglibconf.mak DELETE = $(RM_F) @@ -94,26 +68,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo ccopts=\"-fast -xtarget=ultra -xarch=v9\"; \ - echo ldopts=\"-fast -xtarget=ultra -xarch=v9\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -139,86 +93,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.aix b/scripts/makefile.aix index c5cc530a7..f00734e90 100644 --- a/scripts/makefile.aix +++ b/scripts/makefile.aix @@ -19,28 +19,10 @@ AR_RC = ar rcs RANLIB = ranlib MKDIR_P = mkdir -p RM_F = rm -f -LN_SF = ln -f -s LIBNAME = libpng16 PNGMAJ = 16 -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) - WARNMORE = CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g @@ -55,7 +37,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -all: $(LIBNAME).a pngtest$(E) +all: $(LIBNAME).a pngtest include scripts/pnglibconf.mak REMOVE = $(RM_F) @@ -65,34 +47,15 @@ $(LIBNAME).a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -test: pngtest$(E) - ./pngtest$(E) +test: pngtest + ./pngtest -pngtest$(E): pngtest.o $(LIBNAME).a +pngtest: pngtest.o $(LIBNAME).a $(LD) -o $@ pngtest.o $(LDFLAGS) -install: $(LIBNAME).a - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DI)/$(LIBNAME)/png.h - -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h - -@$(RM_F) $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h - -@$(RM_F) $(DI)/pngconf.h - -@$(RM_F) $(DI)/pnglibconf.h - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h \ - $(DI)/$(LIBNAME)/pngconf.h \ - $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) -r $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -@$(RM_F) $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - cp $(LIBNAME).a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - (cd $(DI); $(LN_SF) libpng/* .;) +install: + @echo "The $@ target is no longer supported by this makefile." + @false clean: $(RM_F) *.o $(LIBNAME).a pngtest pngout.png pnglibconf.h diff --git a/scripts/makefile.atari b/scripts/makefile.atari index 5b7baea41..6ed1f7990 100644 --- a/scripts/makefile.atari +++ b/scripts/makefile.atari @@ -1,4 +1,5 @@ # makefile for libpng +# Copyright (C) 2022 Cosmin Truta # Copyright (C) 2002, 2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -9,25 +10,10 @@ # Modified for LC56/ATARI assumes libz.lib is in same dir and uses default # rules for library management # -CPPFLAGS = -I..\zlib +CPPFLAGS = -I../zlib CFLAGS = -O LBR = png.lib -LDFLAGS = -L. -L..\zlib -lpng -lz -lm - -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= +LDFLAGS = -L. -L../zlib -lpng -lz -lm # Pre-built configuration # See scripts/pnglibconf.mak for more options @@ -54,18 +40,6 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) pngtest.ttp: pngtest.o $(LBR) $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o -install: libpng.a - -@mkdir $(DESTDIR)$(INCPATH) - -@mkdir $(DESTDIR)$(INCPATH)/libpng - -@mkdir $(DESTDIR)$(LIBPATH) - -@rm -f $(DESTDIR)$(INCPATH)/png.h - -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h - -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \ - ln -f -s $(LIBNAME)/* .) +install: + @echo "The $@ target is no longer supported by this makefile." + @false diff --git a/scripts/makefile.beos b/scripts/makefile.beos index 2ed049e82..e02bdc3f4 100644 --- a/scripts/makefile.beos +++ b/scripts/makefile.beos @@ -11,13 +11,11 @@ # Library name: LIBNAME=libpng16 -PNGMAJ = 16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=gcc @@ -47,29 +45,6 @@ CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g # LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g -# where make install puts libpng.a, libpng16.so*, and png.h -prefix=/usr/local -exec_prefix=$(prefix) -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -85,7 +60,7 @@ OBJSDLL = $(OBJS) .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -94,28 +69,13 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo libs=\"-lpng16 -lz \"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) cp $(LIBSO)* /boot/home/config/lib $(LIBSOMAJ): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \ - $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS) + $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) \ + -o $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS) pngtest: pngtest.o $(LIBSO) $(CC) -L$(ZLIBLIB) -L. -lz -lpng16 -o pngtest pngtest.o @@ -123,84 +83,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) $(CFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - $(CC) $(CPPFLAGS) $(CFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBSO) $(LIBSOMAJ)* pngtesti \ - pnglibconf.h libpng.pc + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin index 247343f02..0c50b57e6 100644 --- a/scripts/makefile.darwin +++ b/scripts/makefile.darwin @@ -10,26 +10,17 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -# where "make install" puts libpng.a, libpng16.dylib, png.h, pngconf.h, -# and pnglibconf.h - -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located ZLIBLIB=/usr/lib ZLIBINC=/usr/include # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 -RELEASE = 38 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).dylib LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib -LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib -OLDSO=libpng.dylib # Utilities: CC=cc @@ -47,26 +38,6 @@ CPPFLAGS=-I$(ZLIBINC) $(DEFS) CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -86,7 +57,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -95,28 +66,11 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) $(LIBSOMAJ): $(OBJSDLL) $(CC) -dynamiclib \ - -install_name $(LIBPATH)/$(LIBSOMAJ) \ -current_version 16 -compatibility_version 16 \ -o $(LIBSOMAJ) \ $(OBJSDLL) -L$(ZLIBLIB) -lz @@ -127,84 +81,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - $(RANLIB) $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL) - chmod 755 $(DL)/$(LIBSOMAJ) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - $(CC) $(CPPFLAGS) $(CFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - libpng.pc $(LIBNAME).*dylib pngtesti pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBNAME).*dylib pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.dec b/scripts/makefile.dec index 80a9cb3bb..b788b5aa3 100644 --- a/scripts/makefile.dec +++ b/scripts/makefile.dec @@ -1,4 +1,5 @@ # makefile for libpng on DEC Alpha Unix +# Copyright (C) 2020-2022 Cosmin Truta # Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # @@ -7,14 +8,12 @@ # and license in png.h # Library name: -PNGMAJ = 16 -LIBNAME = libpng16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=cc @@ -25,29 +24,6 @@ LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f -# where make install puts libpng.a and png.h -prefix=/usr/local -exec_prefix=$(prefix) -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include @@ -69,7 +45,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config +all: $(LIBSO) libpng.a pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -78,29 +54,11 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-std\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) $(LIBSOMAJ): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ - -soname $(LIBSOMAJ) + $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -soname $(LIBSOMAJ) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -108,86 +66,21 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -w1 -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -w1 $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -R$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.dj2 b/scripts/makefile.dj2 index 3d493e69e..ff0d33286 100644 --- a/scripts/makefile.dj2 +++ b/scripts/makefile.dj2 @@ -7,12 +7,6 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -# where make install will put libpng.a and png.h -#prefix=/usr/local -prefix=. -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - CC=gcc CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF CFLAGS=-O @@ -47,6 +41,11 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest + +install: + @echo "The $@ target is no longer supported by this makefile." + @false + clean: $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd index cdd39943a..e4e96a14b 100644 --- a/scripts/makefile.freebsd +++ b/scripts/makefile.freebsd @@ -7,28 +7,11 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -PREFIX?= /usr/local -SHLIB_VER?= 16 - LIB= png +SHLIB_VER= 16 SHLIB_MAJOR= ${SHLIB_VER} SHLIB_MINOR= 0 -NO_PROFILE= YES -NO_OBJ= YES - -# where make install puts libpng.a and png.h -DESTDIR= ${PREFIX} -LIBDIR= /lib -INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h -INCSDIR= /include/libpng -INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk -MAN= libpng.3 libpngpf.3 png.5 -MANDIR= /man/man -SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ - libpng/pngconf.h ${INCSDIR}/../pngconf.h \ - libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h -# where make install finds libz.a and zlib.h ZLIBLIB= /usr/lib ZLIBINC= /usr/include @@ -39,6 +22,9 @@ DPADD+= ${LIBM} ${LIBZ} CPPFLAGS+= -I. -I${ZLIBINC} CFLAGS+= -Wall -Wextra -Wundef +LDFLAGS+= -L. -L${ZLIBLIB} + +CLEANFILES+= pngtest pngtest.o pngout.png # Pre-built configuration # See scripts/pnglibconf.mak for more options @@ -49,18 +35,19 @@ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c .c.o: - $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< + ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -pngtest: pngtest.o libpng.a - ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \ - -lpng ${LDADD} +pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} + cp ${PNGLIBCONF_H_PREBUILT} $@ -CLEANFILES= pngtest pngtest.o pngout.png +pngtest: pngtest.o libpng.a + ${CC} ${LDFLAGS} -static -o pngtest pngtest.o -lpng ${LDADD} -test: pngtest +test: pngtest ./pngtest -pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) - cp $(PNGLIBCONF_H_PREBUILT) $@ +install: + @echo "The $@ target is no longer supported by this makefile." + @false .include diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64 index c05b14101..e9c0a6938 100644 --- a/scripts/makefile.hp64 +++ b/scripts/makefile.hp64 @@ -20,14 +20,12 @@ ZLIBINC=/opt/zlib/include # SHAREDLIB=libz.sl # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.sl # Utilities: CC=cc @@ -46,29 +44,6 @@ CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm -# where make install puts libpng.a, libpng16.sl, and png.h -prefix=/opt/libpng -exec_prefix=$(prefix) -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -87,7 +62,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -96,23 +71,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-O -Ae -Wl,+vnocompatwarnings +DD64 +Z\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -126,86 +84,21 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) $(CCFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc index 84bdb54b5..3686bd0ae 100644 --- a/scripts/makefile.hpgcc +++ b/scripts/makefile.hpgcc @@ -10,14 +10,12 @@ # and license in png.h # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.sl # Utilities: CC=gcc @@ -29,11 +27,6 @@ LN_SF=ln -sf CP=cp RM_F=/bin/rm -f -# where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h -# and pnglibconf.h -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located ZLIBLIB=/opt/zlib/lib ZLIBINC=/opt/zlib/include @@ -54,26 +47,6 @@ CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g #LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o @@ -88,27 +61,12 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -122,87 +80,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux index 58b0f9d9f..59041f02a 100644 --- a/scripts/makefile.hpux +++ b/scripts/makefile.hpux @@ -21,14 +21,12 @@ ZLIBINC=/opt/zlib/include # SHAREDLIB=libz.sl # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.sl # Utilities: CC=cc @@ -38,35 +36,12 @@ MKDIR_P=mkdir -p LN_SF=ln -sf RM_F=/bin/rm -f -# where make install puts libpng.a, libpng16.sl, and png.h -prefix=/opt/libpng -exec_prefix=$(prefix) -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - CPPFLAGS=-I$(ZLIBINC) CFLAGS=-O -Ae +DA1.1 +DS2.0 # Caution: be sure you have built zlib with the same CFLAGS. CCFLAGS=-O -Ae +DA1.1 +DS2.0 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -85,7 +60,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -94,23 +69,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-O -Ae +DA1.1 +DS2.0\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -124,86 +82,21 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) $(CCFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.linux b/scripts/makefile.linux index 1d8c66301..3fece3d6c 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -9,15 +9,12 @@ # and license in png.h # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 -RELEASE = 38 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=gcc @@ -28,12 +25,6 @@ LN_SF=ln -sf CP=cp RM_F=rm -f -# where "make install" puts libpng16.a, libpng16.so*, -# libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h -# Prefix must be a full pathname. -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located. #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include @@ -52,26 +43,6 @@ CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -91,7 +62,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pngtest-static pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -100,23 +71,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -139,87 +93,22 @@ test: pngtest pngtest-static @echo "" ./pngtest-static -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: $(RM_F) $(OBJS) $(OBJSDLL) libpng.a - $(RM_F) pngtest*.o pngtest pngtesti pngtest-static pngout.png - $(RM_F) $(LIBSO) $(LIBSOMAJ)* - $(RM_F) libpng.pc pnglibconf.h libpng-config + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h + $(RM_F) pngtest*.o pngtest pngtest-static pngout.png # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.mips b/scripts/makefile.mips index c96eb61cb..ca50f6077 100644 --- a/scripts/makefile.mips +++ b/scripts/makefile.mips @@ -7,32 +7,16 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - CC=cc CPPFLAGS=-I../zlib -DSYSV -Dmips CFLAGS=-O -systype sysv -w #CFLAGS=-O LDFLAGS=-L. -L../zlib/ -lpng -lz -lm +AR_RC=ar rc #RANLIB=ranlib RANLIB=echo -CP=cp - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -47,10 +31,10 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ all: libpng.a pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) - $(CP) $(PNGLIBCONF_H_PREBUILT) $@ + cp $(PNGLIBCONF_H_PREBUILT) $@ libpng.a: $(OBJS) - ar rc $@ $(OBJS) + $(AR_RC) $@ $(OBJS) $(RANLIB) $@ pngtest: pngtest.o libpng.a @@ -59,22 +43,9 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest -install: libpng.a - -@mkdir $(DESTDIR)$(INCPATH) - -@mkdir $(DESTDIR)$(INCPATH)/libpng - -@mkdir $(DESTDIR)$(LIBPATH) - -@rm -f $(DESTDIR)$(INCPATH)/png.h - -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h - -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a +install: + @echo "The $@ target is no longer supported by this makefile." + @false clean: rm -f *.o libpng.a pngtest pngout.png pnglibconf.h diff --git a/scripts/makefile.msys b/scripts/makefile.msys index d5fadc16b..e2878233c 100644 --- a/scripts/makefile.msys +++ b/scripts/makefile.msys @@ -12,20 +12,14 @@ # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h -# # # # # # # # # # # # # # # # # -prefix=/usr/local -exec_prefix=$(prefix) # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 -RELEASE = 38 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).dll LIBSOMAJ=$(LIBNAME).dll.$(PNGMAJ) -LIBSOREL=$(PNGMAJ).$(RELEASE) -OLDSO=libpng.dll # Where the zlib library and include files are located. #ZLIBLIB=../zlib @@ -51,26 +45,6 @@ LIBS = -lz -lm # File extensions EXEEXT=.exe -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -104,69 +78,17 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSO) $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false test: pngtest$(EXEEXT) ./pngtest$(EXEEXT) @@ -176,9 +98,8 @@ pngtest$(EXEEXT): pngtest.o libpng.a clean: $(RM_F) $(OBJS) libpng.a + $(RM_F) $(LIBSO) $(LIBSOMAJ) pnglibconf.h $(RM_F) pngtest*.o pngtest$(EXEEXT) pngout.png - $(RM_F) $(LIBSO) $(LIBSOMAJ) - $(RM_F) libpng.pc pnglibconf.h libpng-config png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd index 48cac07d5..d3419f29b 100644 --- a/scripts/makefile.netbsd +++ b/scripts/makefile.netbsd @@ -1,29 +1,25 @@ -# makefile for libpng for NetBSD for the standard -# make obj && make depend && make && make test -# make includes && make install -# Copyright (C) 2002 Patrick R.L. Welche +# makefile for libpng on NetBSD +# Copyright (C) 2020-2022 Cosmin Truta # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson +# Copyright (C) 2002 Patrick R.L. Welche # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h -LOCALBASE?=/usr/local -LIBDIR= ${LOCALBASE}/lib -MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include - SHLIB_MAJOR= 16 -SHLIB_MINOR= 1.6.38 +SHLIB_MINOR= 0 LIB= png SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \ pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c INCS= png.h pngconf.h pnglibconf.h -MAN= libpng.3 libpngpf.3 png.5 -CPPFLAGS+=-I${.CURDIR} +CPPFLAGS+= -I${.CURDIR} +CFLAGS+= -Wall -Wextra -Wundef + +CLEANFILES+= pngtest.o pngtest pnglibconf.h # Pre-built configuration # See scripts/pnglibconf.mak for more options @@ -35,12 +31,10 @@ PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt # MKLINT= no # .endif -CLEANFILES+=pngtest.o pngtest pnglibconf.h - .c.o: ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} +pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} cp ${PNGLIBCONF_H_PREBUILT} $@ pngtest.o: pngtest.c @@ -50,6 +44,10 @@ pngtest: pngtest.o libpng.a ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm test: pngtest - cd ${.CURDIR} && ${.OBJDIR}/pngtest + ./pngtest + +install: + @echo "The $@ target is no longer supported by this makefile." + @false .include diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd index 97d11b867..6bfeab779 100644 --- a/scripts/makefile.openbsd +++ b/scripts/makefile.openbsd @@ -7,28 +7,19 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -PREFIX?= /usr/local -LIBDIR= ${PREFIX}/lib -MANDIR= ${PREFIX}/man/cat - SHLIB_MAJOR= 16 -SHLIB_MINOR= 1.6.38 +SHLIB_MINOR= 0 LIB= png SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \ pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c HDRS= png.h pngconf.h pnglibconf.h -MAN= libpng.3 libpngpf.3 png.5 -DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO \ - libpng-manual.txt - -CFLAGS+= -Wall -Wextra -Wundef -CPPFLAGS+= -I${.CURDIR} -NOPROFILE= Yes +CPPFLAGS+= -I${.CURDIR} +CFLAGS+= -Wall -Wextra -Wundef -CLEANFILES+= pngtest.o pngtest pnglibconf.h +CLEANFILES+= pngtest.o pngtest pnglibconf.h # Pre-built configuration # See scripts/pnglibconf.mak for more options @@ -37,7 +28,7 @@ PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt .c.o: ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} +pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} cp ${PNGLIBCONF_H_PREBUILT} $@ pngtest.o: pngtest.c @@ -47,41 +38,10 @@ pngtest: pngtest.o ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm test: pngtest - cd ${.OBJDIR} && env \ - LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest - -beforeinstall: - if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \ - fi - if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ - fi - if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \ - fi - if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \ - fi - if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ - fi - if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ - fi + env LD_LIBRARY_PATH="${.OBJDIR}" ./pngtest -afterinstall: - @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a - @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a - @rm -f ${DESTDIR}${PREFIX}/include/png.h - @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h - @rm -f ${DESTDIR}${PREFIX}/include/pnglibconf.h - @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png +install: + @echo "The $@ target is no longer supported by this makefile." + @false .include diff --git a/scripts/makefile.sco b/scripts/makefile.sco index 67cc8e74c..002cd3f9b 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -11,14 +11,12 @@ # and license in png.h # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=cc @@ -29,10 +27,6 @@ LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f -# where make install puts libpng.a, $(OLDSO)*, and png.h -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include @@ -43,26 +37,6 @@ CPPFLAGS=-I$(ZLIBINC) CFLAGS= -dy -belf -O3 LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -81,7 +55,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -90,23 +64,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-belf\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -120,87 +77,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - -@$(RM_F) $(DI)/png.h - -@$(RM_F) $(DI)/pngconf.h - -@$(RM_F) $(DI)/pnglibconf.h - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - $(CC) $(CPPFLAGS) $(CFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - pnglibconf.h libpng.pc + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pngtest-static pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc index 37f7d2d2a..e017916ef 100644 --- a/scripts/makefile.sggcc +++ b/scripts/makefile.sggcc @@ -9,13 +9,11 @@ # Library name: LIBNAME=libpng16 -PNGMAJ = 16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=gcc @@ -26,12 +24,6 @@ LN_SF=ln -sf CP=cp RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng16.so, and libpng16/png.h -# Prefix must be a full pathname. - -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib32 #ZLIBINC=/usr/local/include @@ -52,27 +44,6 @@ LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 # See "man dso" for info about shared objects -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -#LIBPATH=$(exec_prefix)/lib32 -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -84,7 +55,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -all: libpng.a pngtest shared libpng.pc libpng-config +all: libpng.a pngtest shared pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -95,26 +66,6 @@ libpng.a: $(OBJS) shared: $(LIBSOMAJ) -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"$(ABI)\"; \ - echo cppflags=\"\"; \ - echo ldopts=\"$(ABI)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -130,87 +81,21 @@ test: pngtest echo Testing local static library. ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) \ - -rpath $(ZLIBLIB):$(DL) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \ - so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* pnglibconf.h + $(RM_F) libpng.a pngtest pngout.png + $(RM_F) so_locations $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi index 1ead8d88d..c7f8720e5 100644 --- a/scripts/makefile.sgi +++ b/scripts/makefile.sgi @@ -9,13 +9,11 @@ # Library name: LIBNAME=libpng16 -PNGMAJ = 16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=cc @@ -26,12 +24,6 @@ LN_SF=ln -sf CP=cp RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng16.so, and libpng16/png.h -# Prefix must be a full pathname. - -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib32 #ZLIBINC=/usr/local/include @@ -55,27 +47,6 @@ LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 # See "man dso" for info about shared objects -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -#LIBPATH=$(exec_prefix)/lib32 -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -87,7 +58,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -all: libpng.a pngtest shared libpng.pc libpng-config +all: libpng.a pngtest shared pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -96,25 +67,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"$(ABI)\"; \ - echo ldopts=\"$(ABI)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -130,88 +82,21 @@ test: pngtest echo Testing local static library. ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(DL) -L$(ZLIBLIB) \ - -rpath $(ZLIBLIB):$(DL) \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ - $(LIBSO) $(LIBSOMAJ)* \ - so_locations pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* so_locations pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.so9 b/scripts/makefile.so9 index 865c0606a..2fd8e7017 100644 --- a/scripts/makefile.so9 +++ b/scripts/makefile.so9 @@ -11,14 +11,12 @@ # and license in png.h # Library name: -PNGMAJ = 16 -LIBNAME = libpng16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: # gcc 2.95 doesn't work. @@ -30,10 +28,6 @@ LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f -# Where make install puts libpng.a, $(OLDSO)*, and png.h -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located # Changing these to ../zlib poses a security risk. If you want # to have zlib in an adjacent directory, specify the full path instead of "..". @@ -49,26 +43,6 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O3 LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -87,7 +61,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -96,23 +70,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -138,86 +95,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index 180bdd0a0..4aa672deb 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -10,14 +10,12 @@ # and license in png.h # Library name: -LIBNAME = libpng16 -PNGMAJ = 16 +LIBNAME=libpng16 +PNGMAJ=16 # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOREL=$(LIBSOMAJ).$(RELEASE) -OLDSO=libpng.so # Utilities: CC=gcc @@ -28,10 +26,6 @@ LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f -# Where make install puts libpng.a, libpng16.so*, and png.h -prefix=/usr/local -exec_prefix=$(prefix) - # Where the zlib library and include files are located # Changing these to ../zlib poses a security risk. If you want # to have zlib in an adjacent directory, specify the full path instead of "..". @@ -48,26 +42,6 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g -INCPATH=$(prefix)/include -LIBPATH=$(exec_prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(exec_prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - # Pre-built configuration # See scripts/pnglibconf.mak for more options PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt @@ -86,7 +60,7 @@ OBJSDLL = $(OBJS:.o=.pic.o) .c.pic.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c -all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config +all: libpng.a $(LIBSO) pngtest pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $(PNGLIBCONF_H_PREBUILT) $@ @@ -95,24 +69,6 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -libpng.pc: - cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ - -e s!@exec_prefix@!$(exec_prefix)! \ - -e s!@libdir@!$(LIBPATH)! \ - -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng16 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) @@ -138,86 +94,21 @@ pngtest: pngtest.o $(LIBSO) test: pngtest ./pngtest -install-headers: png.h pngconf.h pnglibconf.h - -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi - cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h - -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h - -@$(RM_F) $(DI)/libpng - (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@$(RM_F) $(DL)/libpng.a - (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBSOMAJ) libpng.pc - -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOREL) - -@$(RM_F) $(DL)/$(OLDSO) - cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) - chmod 755 $(DL)/$(LIBSOREL) - (cd $(DL); \ - $(LN_SF) $(LIBSOREL) $(LIBSO); \ - $(LN_SF) $(LIBSO) $(OLDSO)) - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc - -@$(RM_F) $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi - -@$(RM_F) $(DM)/man3/libpng.3 - -@$(RM_F) $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi - -@$(RM_F) $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi - -@$(RM_F) $(DB)/libpng-config - -@$(RM_F) $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. Use test-dd to test it -# before then. - -test-dd: - echo - echo Testing installed dynamic shared library in $(DL). - $(CC) -I$(DI) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) - ./pngtestd pngtest.png - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CPPFLAGS) \ - `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ - -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png +install: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-static: + @echo "The $@ target is no longer supported by this makefile." + @false + +install-shared: + @echo "The $@ target is no longer supported by this makefile." + @false clean: - $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBSO) $(LIBSOMAJ)* \ - libpng.pc pnglibconf.h + $(RM_F) *.o libpng.a pngtest pngout.png + $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.std b/scripts/makefile.std index ed1105f9a..6ce0a498a 100644 --- a/scripts/makefile.std +++ b/scripts/makefile.std @@ -7,21 +7,6 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include @@ -34,8 +19,6 @@ LD = $(CC) AR_RC = ar rc RANLIB = ranlib MKDIR_P = mkdir -LN_SF = ln -sf -CP = cp MV_F = mv -f RM_F = rm -f AWK = awk @@ -92,22 +75,9 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest -install: libpng.a pnglibconf.h - -@$(MKDIR_P) $(DESTDIR)$(INCPATH) - -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng - -@$(MKDIR_P) $(DESTDIR)$(LIBPATH) - -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h - -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h - -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a +install: + @echo "The $@ target is no longer supported by this makefile." + @false clean: $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h diff --git a/scripts/makefile.sunos b/scripts/makefile.sunos index 13450ec97..675e8760f 100644 --- a/scripts/makefile.sunos +++ b/scripts/makefile.sunos @@ -7,21 +7,6 @@ # For conditions of distribution and use, see the disclaimer # and license in png.h -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include @@ -32,7 +17,6 @@ CC=gcc AR_RC=ar rc RANLIB=ranlib MKDIR_P=mkdir -p -LN_SF=ln -f -s CP=cp RM_F=/bin/rm -f @@ -66,22 +50,9 @@ pngtest: pngtest.o libpng.a test: pngtest ./pngtest -install: libpng.a - -@$(MKDIR_P) $(DESTDIR)$(INCPATH) - -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng - -@$(MKDIR_P) $(DESTDIR)$(LIBPATH) - -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h - -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h - -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h - (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a +install: + @echo "The $@ target is no longer supported by this makefile." + @false clean: $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h -- cgit v1.2.1