summaryrefslogtreecommitdiff
path: root/Makefile
blob: 64a54f12a55049887dc3d78bf2585da27a95dfb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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

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)