forked from baishancloud/lua-consistent-hash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (24 loc) · 1.06 KB
/
Makefile
File metadata and controls
37 lines (24 loc) · 1.06 KB
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
OMIT_FRAME_PTR = -fomit-frame-pointer
LUAPKG = lua5.2
CFLAGS = `pkg-config $(LUAPKG) --cflags` -fPIC -O3 -Wall $(OMIT_FRAME_PTR)
# CFLAGS = `pkg-config $(LUAPKG) --cflags` -fPIC -O0 -g3 -Wall
LFLAGS = -shared
## If your system doesn't have pkg-config or if you do not want to get the
## install path from Lua, comment out the previous lines and uncomment and
## change the following ones according to your building environment.
#CFLAGS = -I/usr/local/include/ -fPIC -O3 -Wall $(OMIT_FRAME_PTR)
#LFLAGS = -shared
#INSTALL_PATH = /usr/local/lib/lua/5.2/
all: consistenthash.so
consistenthash.lo: consistenthash.c
$(CC) -o consistenthash.lo -c $(CFLAGS) consistenthash.c
consistenthash.so: consistenthash.lo
$(CC) -o consistenthash.so $(LFLAGS) $(LIBS) consistenthash.lo
# consistenthash.so: consistenthash.c
# $(CC) -o consistenthash.so consistenthash.c $(LFLAGS) $(LIBS)
standalone: consistenthash.c
$(CC) -o consistenthash consistenthash.c -llua $(LIBS)
clean:
$(RM) consistenthash.so consistenthash.lo
test: consistenthash.so test_tt.lua
lua test_tt.lua