PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/Makefile

http://github.com/beamjs/erlv8
Makefile | 66 lines | 47 code | 19 blank | 0 comment | 4 complexity | c1a89a21d68f956bc6ae3bf2a145e0ba MD5 | raw file
 1X64=$(shell file -L `which epmd` | grep x86_64 | wc -l | xargs echo)
 2X64L=$(shell file -L `which epmd` | grep x86-64 | wc -l | xargs echo)
 3OSX=$(shell uname | grep Darwin | wc -l | xargs echo)
 4LINUX=$(shell uname | grep Linux | wc -l | xargs echo)
 5
 6V8ENV=GYPFLAGS="-f make"
 7ifeq ($(X64),1)
 8V8FLAGS=arch=x64
 9else
10V8FLAGS=
11endif
12
13ifeq ($(X64L),1)
14V8FLAGS=arch=x64
15V8ENV=CCFLAGS=-fPIC
16endif
17
18ifeq ($(LINUX),1)
19ZMQ_FLAGS=--with-pic
20else
21ZMQ_FLAGS=
22endif
23
24
25all: compile
26
27sh:
28	@erl -pa ebin/ deps/*/ebin/ -s reloader -eval "d:err()"
29
30
31deps/v8/.git/config:
32	@git submodule init
33	@git submodule update
34
35deps/zeromq2/.git/HEAD:
36	@git submodule init
37	@git submodule update
38
39deps/v8/libv8.a: deps/v8/.git/config
40	cd deps/v8 && $(V8ENV) scons $(V8FLAGS)
41
42deps/zeromq2/src/.libs/libzmq.a: deps/zeromq2/.git/HEAD
43	@cd deps/zeromq2 && ./autogen.sh && ./configure $(ZMQ_FLAGS) && make
44
45dependencies: deps/v8/libv8.a deps/zeromq2/src/.libs/libzmq.a
46	@./rebar get-deps
47
48test: compile
49	@./rebar eunit skip_deps=true
50
51dbg-test: compile
52	@USE_GDB=true ./rebar eunit skip_deps=true
53
54compile: dependencies fast
55
56fast:
57	@EXTRA_CFLAGS= ./rebar compile
58
59debug: dependencies
60	@EXTRA_CFLAGS="-g3 -O0 -DERLV8_DEBUG" ./rebar compile
61
62clean:
63	-rm c_src/*.o
64
65analyze:
66	clang --analyze -Xanalyzer "-Ideps/v8/include/" -Xanalyzer "-I/usr/local//Cellar/erlang/R15B/lib/erlang/usr/include"  -Xanalyzer "-Ideps/zeromq2/include/"  c_src/*.cc