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)