Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add make install target

Also adds DEST and PREFIX variables used by make install, for example:
    make install DEST=`pwd`/debian/tmp PREFIX=/usr/bin
  • Loading branch information...
commit 60a751f3bbd5f57ceed873517844a8df85628843 1 parent fe2a9a9
@bartman bartman authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 Makefile
View
11 Makefile
@@ -43,6 +43,12 @@ WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
CFLAGS += $(WARNINGS)
LDFLAGS += -Wl,-warn-common,--as-needed
+DEST ?=
+PREFIX ?= /usr/local
+
+INSTALL = install
+INSTALL_BIN = ${INSTALL} -m 0755 -t ${DEST}${PREFIX}/bin
+INSTALL_MAN = ${INSTALL} -m 0644 -t ${DEST}${PREFIX}/share/man
ifeq ($(strip $(V)),)
E = @echo
@@ -111,3 +117,8 @@ release:
git archive --format=tar --prefix=bti-$(VERSION)/ HEAD | gzip -9v > bti-$(VERSION).tar.gz
.PHONY: release
+install: all
+ $(E) " INSTALL " ${DEST}${PREFIX}
+ ${Q} ${INSTALL_BIN} ${PROGRAM}
+ ${Q} ${INSTALL_MAN} ${MAN_PAGES}
+.PHONY: install
Please sign in to comment.
Something went wrong with that request. Please try again.