forked from tarantool/tarantool-lua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (45 loc) · 1.25 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
49
50
51
52
53
54
55
56
57
58
59
60
# 5.2, jit
LUAV?=5.2
LUA_CFLAGS = `pkg-config lua$(LUAV) --cflags`
LUA_LDFLAGS = `pkg-config lua$(LUAV) --libs` -g -shared
CFLAGS = -O2 -Wall -shared -fPIC -fexceptions $(LUA_CFLAGS) -I.
LDFLAGS = -shared -g $(LUA_LDFLAGS)
CC = gcc
OUTPUT = tnt.so
OBJS = src/tnt.o \
src/tnt_helper.o \
src/tnt_requestbuilder.o \
src/tnt_responseparser.o
all: $(OBJS)
$(CC) -o $(OUTPUT) $(LDFLAGS) ${OBJS}
cp -f tnt.so test/
cp -f src/tarantool.lua test/
cp -f src/tnt_schema.lua test/
cp -f src/tnt_helpers.lua test/
libs: yaml luasocket telescope pack
luasocket:
make -C 3rdparty/luasocket all LUAV=$(LUAV)
cp -f 3rdparty/luasocket/socket.lua test/socket.lua
cp -f 3rdparty/luasocket/socket.so.3.0-rc1 test/socket.so
yaml:
make -C 3rdparty/yaml all LUAV=$(LUAV)
cp -f 3rdparty/yaml/yaml.so test/yaml.so
telescope:
cp -f 3rdparty/telescope/* test/
pack:
make -C 3rdparty/pack all LUAV=$(LUAV)
cp -f 3rdparty/pack/tnt_pack.so test/tnt_pack.so
clean-all:
make -C 3rdparty/luasocket clean
make -C 3rdparty/yaml clean
make -C 3rdparty/pack clean
make clean
clean:
rm -f test/*.so
rm -f *.so
rm -f $(OBJS)
docs:
make -C docs html
test:
LUAV=$(LUAV) make -C test test
.PHONY: all libs luasocket yaml telescope pack clean-all clean docs test test_new