|
@@ -1,31 +1,35 @@
|
|
|
-EFLAGS=-pa ebin -pa ../erlang-fmt/ebin -pa ../eunit/ebin -I../ -Iinclude
|
|
|
+SOURCE_FILES := $(wildcard src/*.erl)
|
|
|
|
|
|
-ERL := erl $(EFLAGS)
|
|
|
+ERLC := erlc -W +debug_info -o ebin
|
|
|
|
|
|
-ERL_SOURCES := $(wildcard src/*.erl)
|
|
|
+ERL := erl -pa ebin -pa ../erlang-fmt/ebin -s crypto
|
|
|
|
|
|
-ERL_OBJECTS := $(ERL_SOURCES:src/%.erl=ebin/%.beam)
|
|
|
|
|
|
+all: beam_files
|
|
|
|
|
|
-all: objects
|
|
|
-
|
|
|
-objects: $(ERL_OBJECTS)
|
|
|
+beam_files: $(SOURCE_FILES:src/%.erl=ebin/%.beam)
|
|
|
|
|
|
ebin/%.beam: src/%.erl
|
|
|
@test -d ebin || mkdir ebin
|
|
|
- erlc $(EFLAGS) -W +debug_info -o ebin $<
|
|
|
+ $(ERLC) $<
|
|
|
+
|
|
|
+ebin/oauth_unit.beam:
|
|
|
+ $(ERLC) -pa ../eunit/ebin -I../ -Iinclude test/oauth_unit.erl
|
|
|
+
|
|
|
+ebin/oauth_termie.beam:
|
|
|
+ $(ERLC) test/oauth_termie.erl
|
|
|
|
|
|
clean:
|
|
|
rm -rf ebin/*.beam erl_crash.dump
|
|
|
|
|
|
-test: objects
|
|
|
- $(ERL) -noshell -s crypto -s oauth_unit test -s init stop
|
|
|
+test: beam_files ebin/oauth_unit.beam
|
|
|
+ @$(ERL) -noshell -s oauth_unit test -s init stop
|
|
|
|
|
|
-termie: objects
|
|
|
- $(ERL) -noshell -s crypto -s inets -s oauth_termie test -s init stop
|
|
|
+termie: beam_files ebin/oauth_termie.beam
|
|
|
+ @$(ERL) -noshell -s inets -s oauth_termie test -s init stop
|
|
|
|
|
|
-shell: objects
|
|
|
- @$(ERL) -s crypto -s inets
|
|
|
+shell: beam_files
|
|
|
+ @$(ERL) -s inets
|
|
|
|
|
|
dialyzer:
|
|
|
- dialyzer $(EFLAGS) --src -c src/
|
|
|
+ dialyzer --no_check_plt --src -c src/
|