forked from efficient/cuckoofilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (30 loc) · 908 Bytes
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CC = g++
AR = ar
PREFIX=/usr/local
# Uncomment one of the following to switch between debug and opt mode
#OPT = -O3 -DNDEBUG
OPT = -g -ggdb
CFLAGS += --std=c++11 -fno-strict-aliasing -Wall -c -I. -I./include -I/usr/include/ -I./src/ $(OPT)
LDFLAGS+= -Wall -lpthread -lssl -lcrypto
LIBOBJECTS = \
./src/hashutil.o \
HEADERS = $(wildcard src/*.h)
ALIB = libcuckoofilter.a
TEST = test
all: $(TEST)
clean:
rm -f $(TEST) */*.o
test: example/test.o $(LIBOBJECTS)
$(CC) example/test.o $(LIBOBJECTS) $(LDFLAGS) -o $@
%.o: %.cc ${HEADERS} Makefile
$(CC) $(CFLAGS) $< -o $@
$(ALIB): $(LIBOBJECTS)
$(AR) rcs $@ $(LIBOBJECTS)
.PHONY: install
install: $(ALIB)
install -D -m 0755 $(HEADERS) -t $(DESTDIR)$(PREFIX)/include/cuckoofilter
install -D -m 0755 $< -t $(DESTDIR)$(PREFIX)/lib
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/lib/$(ALIB)
rm -rf $(DESTDIR)$(PREFIX)/include/cuckoofilter