aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f909779..dad5d2e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
CFLAGS = -Wall -Wextra -Werror -ggdb3 -O3
LDFLAGS = -lasound -lm -lrt
+PREFIX=/usr/local
BINS = metronome tuner
@@ -10,5 +11,11 @@ metronome: metronome.o common.o
tuner: LDFLAGS += -lfftw3
tuner: tuner.o common.o
+install: all
+ install -vDt $(DESTDIR)$(PREFIX)/bin $(BINS)
+
+uninstall:
+ rm -vf $(addprefix $(DESTDIR)$(PREFIX)/bin/, $(BINS))
+
clean:
rm -f *.o $(BINS)