From cfbed9bdf200652db330ccefdc3ba0e4b4d20d25 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 21 May 2002 18:06:08 -0500 Subject: Imported from libpng-1.2.3.tar --- scripts/makefile.linux | 99 +++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 49 deletions(-) (limited to 'scripts/makefile.linux') diff --git a/scripts/makefile.linux b/scripts/makefile.linux index 8ab6e7784..e8637accf 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -5,7 +5,7 @@ LIBNAME = libpng12 PNGMAJ = 0 -PNGMIN = 1.2.3rc6 +PNGMIN = 1.2.3 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -54,6 +54,11 @@ BINPATH=$(prefix)/bin # you execute make install. DESTDIR= +DB=$(DESTDIR)/$(BINPATH) +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) +DM=$(DESTDIR)/$(MANPATH) + OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o @@ -112,67 +117,63 @@ test: pngtest pngtest-static ./pngtest-static install-headers: png.h pngconf.h - -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi - -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \ - mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi - cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME) - chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \ - $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h - -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng - (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) install-static: install-headers libpng.a - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a - (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc - -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \ - $(DESTDIR)$(LIBPATH)/$(LIBNAME).so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3 - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.* - cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH) - chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER) - (cd $(DESTDIR)$(LIBPATH); \ + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \ + $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.* + cp $(LIBNAME).so.$(PNGVER) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + (cd $(DL); \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \ ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \ - $(DESTDIR)$(LIBPATH)/pkgconfig; fi - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc - cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc - (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \ + $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi - -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man3; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3 - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3 - cp libpng.3 $(DESTDIR)$(MANPATH)/man3 - cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3 - -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \ - mkdir $(DESTDIR)$(MANPATH)/man5; fi - -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5 - cp png.5 $(DESTDIR)$(MANPATH)/man5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 install-config: libpng-config - -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \ - mkdir $(DESTDIR)$(BINPATH); fi - -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config - -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config - (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config) + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) install: install-static install-shared install-man install-config -- cgit v1.2.1