-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
40 lines (26 loc) · 815 Bytes
/
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
LUVIT=deps/luvit/build/luvit
ifeq ($(shell uname -sm | sed -e s,x86_64,i386,),Darwin i386)
#osx
export CC=gcc #-arch i386
CFLAGS=$(shell $(LUVIT) --cflags) -g -O3 -I./deps/luvit/deps/luajit/src
LIBS=$(shell $(LUVIT) --libs)
LDFLAGS=
else
# linux
CFLAGS=$(shell $(LUVIT) --cflags) -g -O3 -I./deps/luvit/deps/luajit/src
LIBS=$(shell $(LUVIT) --libs) -lm -ldl
LDFLAGS=
endif
all: test
test: setup $(LUVIT)
$(LUVIT) test.lua
setup:
mysql -u root -e "create database if not exists test"
mysql -u root -e "use test; grant all on *.* to passtestuser@localhost; flush privileges"
mysql -u root -e "set password for passtestuser@localhost = password('hoge')"
$(LUVIT) :
git submodule init
git submodule update
cd deps/luvit; ./configure; make
run:
luvit test.lua 2>&1 | ruby -pe 'gsub(/\t\//,"/")'