added makefile, fixed problems with tests

This commit is contained in:
Jeena Paradies 2011-02-22 03:11:35 +01:00
parent e4753b2c07
commit 6ee945379f
8 changed files with 58 additions and 36 deletions

28
Makefile Normal file
View file

@ -0,0 +1,28 @@
ERLC=erlc
ERLCFLAGS=-o
SRCDIR=src
TESTDIR=tests
BEAMDIR=./ebin
all: compile erlang_js
compile:
@ mkdir -p $(BEAMDIR) ;
@ $(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(SRCDIR)/*.erl ;
erlang_js:
$(MAKE) -C erlang_js/
test: compile erlang_js
@ mkdir -p $(BEAMDIR) ;
@ $(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(TESTDIR)/*.erl ;
@ cd $(BEAMDIR) ; erl -noinput -eval 'eunit:test({dir, "."}, [verbose]), init:stop()' ;
clean:
@ rm -rf $(BEAMDIR)/*.beam ;
@ rm -rf erl_crush.dump ;
@ echo "==> clean ggs" ;
@ $(MAKE) -C erlang_js/ clean
run:
@ erl -sname ggs -mnesia -boot start_sasl -pa erlang_js/ebin/ -pa ebin -pa src -s start_ggs