summaryrefslogtreecommitdiff
path: root/scripts/makefile.knr
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2002-04-27 10:11:25 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:06:58 -0500
commit03008a08d10521b9917901f0031f9687729b6295 (patch)
treed7443a87297fc84de941e486efab5467c7003aad /scripts/makefile.knr
parent4fb046a52dc7245ba3cfac01867fe74c66f09dca (diff)
downloadlibpng-03008a08d10521b9917901f0031f9687729b6295.tar.gz
Imported from libpng-1.2.3rc1.tarv1.2.3rc1
Diffstat (limited to 'scripts/makefile.knr')
-rw-r--r--scripts/makefile.knr36
1 files changed, 25 insertions, 11 deletions
diff --git a/scripts/makefile.knr b/scripts/makefile.knr
index 4d7707b71..1e59fda9f 100644
--- a/scripts/makefile.knr
+++ b/scripts/makefile.knr
@@ -1,4 +1,5 @@
# makefile for libpng
+# Copyright (C) 2002 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
@@ -9,6 +10,18 @@
# where make install puts libpng.a and png.h
prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, that location must already exist before
+# you execute make install.
+DESTDIR=
CC=cc
CFLAGS=-I../zlib -O
@@ -46,17 +59,18 @@ test: pngtest
./pngtest
install: libpng.a
- -@mkdir $(prefix)/include
- -@mkdir $(prefix)/include/libpng
- -@mkdir $(prefix)/lib
- -@rm -f $(prefix)/include/png.h
- -@rm -f $(prefix)/include/pngconf.h
- cp png.h $(prefix)/include/libpng
- cp pngconf.h $(prefix)/include/libpng
- chmod 644 $(prefix)/include/libpng/png.h
- chmod 644 $(prefix)/include/libpng/pngconf.h
- cp libpng.a $(prefix)/lib
- chmod 644 $(prefix)/lib/libpng.a
+ -@mkdir $(DESTDIR)$(INCPATH)
+ -@mkdir $(DESTDIR)$(INCPATH)/libpng
+ -@mkdir $(DESTDIR)$(LIBPATH)
+ -@rm -f $(DESTDIR)$(INCPATH)/png.h
+ -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
+ cp png.h $(DESTDIR)$(INCPATH)/libpng
+ cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
+ (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
+ cp libpng.a $(DESTDIR)$(LIBPATH)
+ chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
clean:
rm -f *.o libpng.a pngtest pngout.png ansi2knr