Browse files

added `make install`

  • Loading branch information...
1 parent c115509 commit 498113d2b1c5b2a40af3283823d611d59d32bd76 @tj committed May 8, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 Makefile
View
10 Makefile
@@ -1,6 +1,8 @@
CC ?= gcc
+PREFIX = /usr/local
+
SRC = src/parser.c \
src/compile.c \
src/tree.c
@@ -19,7 +21,13 @@ src/parser.c: src/parser.leg
%.o: %.c
$(CC) $< $(CFLAGS) -o $@
+install: bin/cdescent
+ cp -f $< $(PREFIX)/$<
+
+uninstall:
+ rm -f $(PREFIX)/bin/cdescent
+
clean:
rm -fr bin src/*.o
-.PHONY: clean
+.PHONY: clean install uninstall

0 comments on commit 498113d

Please sign in to comment.