From 92b9d7d8ca9c7c4e6b59c9130b74c6d6091a848e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 20 Dec 2008 11:04:12 +0100 Subject: [PATCH] Add an install target to Makefiles. --HG-- extra : convert_revision : 4c2e5e60d95fc414980e148e407a97fa4eca9bfd --- Makefile | 10 ++++++++++ utils/Makefile | 12 ++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d3544bf6dc0..3a5dd034fb6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,15 @@ +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin + all: cd utils && make +install: + install -D xbps-src.sh $(BINDIR)/xbps-src + cd utils && make install + +uninstall: + -rm -f $(BINDIR)/xbps-* + clean: cd utils && make clean diff --git a/utils/Makefile b/utils/Makefile index 6bb74e2fd7d..571b5400774 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -1,8 +1,9 @@ PREFIX ?= /usr/local -CFLAGS += -Wall -Werror -O3 -I$(PREFIX)/include -CFLAGS += -funroll-all-loops -ftree-loop-linear -LDFLAGS += -lprop -BINS ?= xbps-bin xbps-cmpver xbps-digest xbps-pkgdb +BINDIR ?= $(PREFIX)/bin +CFLAGS += -Wall -Werror -O3 -I$(PREFIX)/include +CFLAGS += -funroll-all-loops -ftree-loop-linear +LDFLAGS += -lprop +BINS ?= xbps-bin xbps-cmpver xbps-digest xbps-pkgdb all: xbps_digest xbps_pkgdb xbps_bin xbps-cmpver strip_bins clean_objs @@ -41,3 +42,6 @@ clean_objs: clean: clean_objs -rm -f xbps-digest xbps-pkgdb xbps-cmpver + +install: all + install -D $(BINS) $(BINDIR)