-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (21 loc) · 774 Bytes
/
Makefile
File metadata and controls
26 lines (21 loc) · 774 Bytes
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
CFLAGS += -Wall -Werror -Wno-unused -std=gnu99
.phony: all
all: test_lsmdb test_leveldb test_mdb
test_lsmdb: test_lsmdb.c test.h lsmdb.c lsmdb.h
make -C ./deps/liblmdb
$(CC) $(CFLAGS) test_lsmdb.c lsmdb.c ./deps/liblmdb/liblmdb.a -lpthread -lm -o $@
test_leveldb: test_leveldb.c test.h
make -C ./deps/snappy
make -C ./deps/leveldb
$(CC) $(CFLAGS) -I./deps/leveldb/include test_leveldb.c ./deps/leveldb/libleveldb.a ./deps/snappy/.libs/libsnappy.a -lstdc++ -lpthread -o $@
test_mdb: test_mdb.c test.h
make -C ./deps/liblmdb
$(CC) $(CFLAGS) test_mdb.c ./deps/liblmdb/liblmdb.a -lpthread -lm -o $@
.phony: clean
clean:
- make clean -C ./deps/liblmdb
- rm test_lsmdb
- make clean -C ./deps/snappy
- make clean -C ./deps/leveldb
- rm test_leveldb
- rm test_mdb