diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | commandline/Makefile | 12 |
2 files changed, 10 insertions, 4 deletions
@@ -1,2 +1,2 @@ -/commandline/i2c +/commandline/vusb-i2c /commandline/i2c.o 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 |