-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
35 lines (27 loc) · 1.38 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
ifeq ($(uname_S),Darwin)
TOOLCMD = gcc c_src/tool.c c_src/mdb.c c_src/midl.c c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -o adbtool
else
TOOLCMD = gcc c_src/tool.c c_src/mdb.c c_src/midl.c c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -lpthread -ldl -o adbtool
endif
ifeq ($(uname_S),Darwin)
NOERLCMD = gcc c_src/noerl.c c_src/mdb.c c_src/midl.c c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -g -o noerl
else
NOERLCMD = gcc c_src/noerl.c c_src/mdb.c c_src/midl.c c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -g -lpthread -ldl -o noerl
endif
all:
../../rebar compile
$(TOOLCMD)
clean:
../../rebar clean
eunit:
../../rebar eunit
tool:
$(TOOLCMD)
ne:
$(NOERLCMD)
lldb:
-rm *.db wal.*
gcc c_src/test.c -g -DSQLITE_DEBUG -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -o t && lldb t
valgrind:
-rm *.db wal.*
gcc c_src/test.c -g -DSQLITE_DEBUG -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -o t && valgrind --tool=memcheck --track-origins=yes --leak-check=full ./t