summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoseph Werle <joseph.werle@gmail.com>2014-05-05 11:30:00 -0400
committerJoseph Werle <joseph.werle@gmail.com>2014-05-05 11:31:45 -0400
commitcbfbbbb6b0b7a5441aa0414a73f4a2cda00bd957 (patch)
treed76b573b8005aad83df719b9f3afbf683036ef6a /Makefile
parent2d25dad1f814ddbdb1c02a4d648970cb36d8f71e (diff)
Add exec and man
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5a87aa9..64a54f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,29 @@
+BIN ?= murmur
SRC = murmurhash.c
CFLAGS += -std=c99 -Wall -I.
+PREFIX ?= /usr/local
+MANPREFIX ?= $(PREFIX)/share/man
+MAN_FILES = $(wildcard man/*.md)
+
+$(BIN):
+ $(CC) main.c $(SRC) $(CFLAGS) -o $(BIN)
clean:
rm -f test
+ rm -f $(BIN)
test:
$(CC) test.c $(SRC) $(CFLAGS) -o test
./test
-.PHONY: test
+install: $(BIN)
+ install $(BIN) $(PREFIX)/bin
+ install man/*.1 $(MANPREFIX)/man1
+
+docs: $(MAN_FILES)
+
+$(MAN_FILES):
+ curl -# -F page=@$(@) -o $(@:%.md=%) http://mantastic.herokuapp.com
+
+.PHONY: test $(MAN_FILES)