summaryrefslogtreecommitdiff
path: root/Makefile
blob: ef97278c2d4534ec14828ba9e4c81af816182286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

EUNITPATH=/home/ssmith/software/eunit-1.1

ERLC=erlc
ERLFLAGS=-I$(EUNITPATH)/inc 

SRC=bencode.erl
TESTSRC=tests.erl
BEAM=$(SRC:.erl=.beam)
TESTBEAM=$(TESTSRC:.erl=.beam)
ALLBEAM=$(BEAM) $(TESTBEAM)

all: $(BEAM)

%.beam : %.erl
	$(ERLC) $(ERLFLAGS) $<

test: $(ALLBEAM)
	erl -noshell -pa $(EUNITPATH)/ebin -s tests -s init stop

clean:
	rm -f $(ALLBEAM) *~