diff options
Diffstat (limited to 'commandline/Makefile')
-rw-r--r-- | commandline/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/commandline/Makefile b/commandline/Makefile index 5d7bd3a..64b27c5 100644 --- a/commandline/Makefile +++ b/commandline/Makefile @@ -27,7 +27,10 @@ CC = gcc CFLAGS = $(USBFLAGS) -O -Wall LIBS = $(USBLIBS) -PROGRAM = i2c$(EXE_SUFFIX) +PREFIX ?= /usr/local +bin_dir = ${DESTDIR}${PREFIX}/bin + +PROGRAM = vusb-i2c$(EXE_SUFFIX) all: $(PROGRAM) @@ -45,6 +48,9 @@ clean: rm -f *.o $(PROGRAM) install: $(PROGRAM) - install -m 0755 i2c /usr/local/bin/i2c + install -m 0755 $(PROGRAM) $(bin_dir)/$(PROGRAM) + +uninstall: + rm -f $(bin_dir)/$(PROGRAM) -.PHONY: all strip clean install +.PHONY: all strip clean install uninstall |