osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/37340?usp=email )
Change subject: Makefile: new file ......................................................................
Makefile: new file
Add a Makefile similar to the ones in osmo-epdg and osmo-s1gw.
Change-Id: Ida7ce261bfaac845ecdbec43e0bdd7d1669e5486 --- A Makefile 1 file changed, 41 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_dia2gsup refs/changes/40/37340/1
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0e62d2d --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +CONFIG ?= examples/sys.config + +all: build + +build: + rebar3 compile + rebar3 escriptize + +run: build + ERL_FLAGS='-config $(CONFIG)' _build/default/bin/osmo-dia2gsup + +shell: build + rebar3 shell --config $(CONFIG) + +check: + rebar3 eunit + +analyze: $(GEN_FILES) + rebar3 dialyzer + +clean: +# Avoid running rebar3 clean if _build doesn't exist, since it would try +# to fetch deps from the Internet and that may not be avaialble when in +# OBS build. +ifneq ("$(wildcard _build/.*)", "") + rebar3 clean + rm -rf _build/ +else + rm -f src/diameter_*.erl +endif