diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -5,6 +5,13 @@ CFLAGS += -std=c99 -Wall -I. PREFIX ?= /usr/local MANPREFIX ?= $(PREFIX)/share/man MAN_FILES = $(wildcard man/*.md) +LIB ?= libmurmurhash.so +INCLUDE ?= murmurhash.h + +all: $(LIB) $(BIN) + +$(LIB): + $(CC) -shared $(SRC) $(CFLAGS) -o $(LIB) $(BIN): $(CC) main.c $(SRC) $(CFLAGS) -o $(BIN) @@ -12,13 +19,19 @@ $(BIN): clean: rm -f test rm -f $(BIN) + rm -f $(LIB) + +example: + $(CC) murmurhash_example.c -lmurmurhash -o murmurhash_example test: $(CC) test.c $(SRC) $(CFLAGS) -o test ./test -install: $(BIN) +install: $(BIN) $(LIB) install $(BIN) $(PREFIX)/bin + install $(LIB) $(PREFIX)/lib + install $(INCLUDE) $(PREFIX)/include install man/*.1 $(MANPREFIX)/man1 docs: $(MAN_FILES) |