Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Assorted Makefile tweaks.
  • Loading branch information
Tim Fletcher committed Oct 23, 2008
1 parent 8201f7b commit bdc005fee1ff5a7fee53890c3a8685f233a5d845
Showing 1 changed file with 23 additions and 13 deletions.
@@ -1,21 +1,31 @@
SHELL=/bin/sh
EFLAGS=-pa ebin -pa ../erlang-fmt/ebin -pa ../eunit/ebin -I../ -Iinclude

EFLAGS=-pa ebin -pa ../erlang-fmt/ebin -pa ../eunit/ebin
ERL := erl $(EFLAGS)

all: compile
ERL_SOURCES := $(wildcard src/*.erl)

compile: clean
test -d ebin || mkdir ebin
erl $(EFLAGS) -make
ERL_OBJECTS := $(ERL_SOURCES:src/%.erl=ebin/%.beam)


all: objects

objects: $(ERL_OBJECTS)

ebin/%.beam: src/%.erl
@test -d ebin || mkdir ebin
erlc $(EFLAGS) -W +debug_info -o ebin $<

clean:
rm -rf ebin erl_crash.dump
rm -rf ebin/*.beam erl_crash.dump

test: objects
$(ERL) -noshell -s crypto -s oauth_unit test -s init stop

test: compile
erl $(EFLAGS) -noshell -s crypto -s oauth_unit test -s init stop
termie: objects
$(ERL) -noshell -s crypto -s inets -s oauth_termie test -s init stop

termie: compile
erl $(EFLAGS) -noshell -s crypto -s inets -s oauth_termie test -s init stop
shell: objects
@$(ERL) -s crypto -s inets

i: compile
erl $(EFLAGS) -s crypto -s inets
dialyzer:
dialyzer $(EFLAGS) --src -c src/

0 comments on commit bdc005f

Please sign in to comment.