From 5c96ff2741fb36c5b9e793a55bd8a8a0bef76021 Mon Sep 17 00:00:00 2001 From: Thordur Bjornsson Date: Mon, 5 Nov 2012 15:41:52 +0100 Subject: Better install target. --- Makefile | 5 +++-- README.md | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 25d8394..ffed7e8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC ?= clang -INSTALLPATH ?= /usr/bin +PREFIX ?= /usr CFLAGS += -Wall -Werror LDFLAGS += -lm @@ -31,7 +31,8 @@ depend: @echo "Dependencies are automatically generated." install: - install -m 0755 $(OBJ)/$(BIN) $(INSTALLPATH) + install -d $(PREFIX)/bin + install -m 0755 $(OBJ)/$(BIN) $(PREFIX)/bin/$(BIN) clean: -rm -rf $(BIN) obj *.core diff --git a/README.md b/README.md index 28a9325..0543157 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ There should be no dependencies besides the standard libraries and a functional $ cd ministat/ $ make - # INSTALLPATH=/usr/bin make install + $ make PREFIX=/usr install + install -m 0755 ministat /usr/bin/ministat ## Usage The FreeBSD man page is very relevant, pursue it [here](http://www.freebsd.org/cgi/man.cgi?ministat). -- cgit 1.4.1