diff --git a/Makefile b/Makefile index 0d770e1..202cb1c 100644 --- a/Makefile +++ b/Makefile @@ -7,3 +7,14 @@ all: macvdmtool macvdmtool: $(OBJS) cc -o $@ $(OBJS) $(LDFLAGS) + +ifeq ($(PREFIX),) + PREFIX := /usr/local +endif + +INSTALL := /usr/bin/install + +.PHONY: install +install: macvdmtool + @sudo $(INSTALL) -d "$(PREFIX)/bin/" + @sudo $(INSTALL) -m 755 -o root -g wheel "$(<)" "$(PREFIX)/bin/"