forked from efficient/cuckoofilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (34 loc) · 1.12 KB
/
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
44
45
46
47
48
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)
CFLAGS += -I/usr/local/opt/openssl/include -I ../libcuckoo/install/include
CFLAGS += -I./benchmarks
LDFLAGS+= -Wall -lpthread -lssl -lcrypto -L/usr/local/opt/openssl/lib
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 $@
benchmark: example/benchmark.o $(LIBOBJECTS)
$(CC) example/benchmark.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