summaryrefslogtreecommitdiff
path: root/Makefile
blob: 74fa5e79e64c7fd828bf7bd443f1581904f02d9d (plain)
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
.PHONY:	all deps compile setup clean doc setup_backend setup_device


NAME=rvi
export KVDB_BACKENDS=ets

SETUP_GEN=$(shell ./find_setup_gen.sh)


all: deps compile

deps:
	./rebar get-deps

compile:
	./rebar  compile

recomp:
	./rebar  compile skip_deps=true

setup_device:
	ERL_LIBS=$(PWD)/deps:$(ERL_LIBS):$(PWD) \
	$(SETUP_GEN) $(NAME) priv/setup_device.config setup_device

setup_backend:
	ERL_LIBS=$(PWD)/deps:$(ERL_LIBS):$(PWD) \
	$(SETUP_GEN) $(NAME) priv/setup_backend.config setup_backend

target_backend:
	ERL_LIBS=$(PWD)/deps:$(ERL_LIBS) \
	$(SETUP_GEN) $(NAME) priv/setup_backend.config setup -pz $(PWD)/ebin \
	-target rel_backend -vsn 0.1

target_device:
	ERL_LIBS=$(PWD)/deps:$(ERL_LIBS) \
	$(SETUP_GEN) $(NAME) priv/setup_device.config setup -pz $(PWD)/ebin \
	-target rel_device -vsn 0.1

#
# Start the backend server
#
run_backend: setup_backend
	erl -boot setup_backend/start -config setup_backend/sys 


#
# Start the backend device.
#
run_device: setup_device
	erl -boot setup_device/start -config setup_device/sys 


doc:
        ./REBAR_DOC=1 ./rebar skip_deps=true get-deps doc

clean:
	./rebar clean