summaryrefslogtreecommitdiff
path: root/scripts/makefile.freebsd
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.freebsd
parent4fb046a52dc7245ba3cfac01867fe74c66f09dca (diff)
downloadlibpng-03008a08d10521b9917901f0031f9687729b6295.tar.gz
Imported from libpng-1.2.3rc1.tarv1.2.3rc1
Diffstat (limited to 'scripts/makefile.freebsd')
-rw-r--r--scripts/makefile.freebsd34
1 files changed, 24 insertions, 10 deletions
diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd
index 3423768b3..717e755d5 100644
--- a/scripts/makefile.freebsd
+++ b/scripts/makefile.freebsd
@@ -3,8 +3,23 @@
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
+.include <bsd.own.mk>
+
# where make install puts libpng.a and png.h
prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+MANPATH=$(prefix)/man
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, that location must already exist before
+# you execute make install.
+DESTDIR=
PNGMAJ= 5
.if (${OBJFORMAT} == "elf")
@@ -49,23 +64,22 @@ test: pngtest
./pngtest
install: libpng.a libpng.so.${PNGVER}
- -@mkdir $(prefix)/include/libpng
+ -@mkdir $(DESTDIR)$(INCPATH)/libpng
${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
- png.h pngconf.h $(prefix)/include/libpng
- ln -sf libpng/png.h $(prefix)/include/png.h
- ln -sf libpng/pngconf.h $(prefix)/include/pngconf.h
+ png.h pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ (cd $(DESTDIR)$(INCPATH); rm -f png.h pngconf.h; ln -sf libpng/*.h .)
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- libpng.a libpng.so.${PNGVER} $(prefix)/lib
- $(RANLIB) $(prefix)/lib/libpng.a
- ln -sf libpng.so.${PNGVER} $(prefix)/lib/libpng.so
+ libpng.a libpng.so.${PNGVER} $(DESTDIR)$(LIBPATH)
+ $(RANLIB) $(DESTDIR)$(LIBPATH)/libpng.a
+ ln -sf libpng.so.${PNGVER} $(DESTDIR)$(LIBPATH)/libpng.so
/sbin/ldconfig -R
${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
- libpng.3 libpngpf.3 $(prefix)/man/man3
+ libpng.3 libpngpf.3 $(DESTDIR)$(MANPATH)/man3
${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
- png.5 $(prefix)/man/man5
+ png.5 $(DESTDIR)$(MANPATH)/man5
clean:
- rm -f *.o libpng.a libpng.so libpng.so.${PNGVER} pngtest pngout.png
+ rm -f *.o *.so libpng.a libpng.so.${PNGVER} pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock: