Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # See LICENSE for licensing information.
  2. PROJECT = cowboy
  3. REBAR = rebar
  4. all: app
  5. # Application.
  6. deps/ranch:
  7. @$(REBAR) get-deps
  8. app: deps/ranch
  9. @$(REBAR) compile
  10. clean:
  11. @$(REBAR) clean
  12. rm -f test/*.beam
  13. rm -f erl_crash.dump
  14. docs: clean-docs
  15. @$(REBAR) doc skip_deps=true
  16. clean-docs:
  17. rm -f doc/*.css
  18. rm -f doc/*.html
  19. rm -f doc/*.png
  20. rm -f doc/edoc-info
  21. # Tests.
  22. deps/proper:
  23. @$(REBAR) -C rebar.tests.config get-deps
  24. cd deps/proper && $(REBAR) compile
  25. tests: clean deps/proper app eunit ct
  26. eunit:
  27. @$(REBAR) -C rebar.tests.config eunit skip_deps=true
  28. CT_RUN = ct_run \
  29. -pa ebin deps/*/ebin \
  30. -dir test \
  31. -logdir logs \
  32. -cover test/cover.spec
  33. ct:
  34. @mkdir -p logs/
  35. @$(CT_RUN) -suite http_SUITE ws_SUITE
  36. autobahn:
  37. @mkdir -p logs/
  38. @$(CT_RUN) -suite autobahn_SUITE
  39. # Dialyzer.
  40. DIALYZER = dialyzer
  41. build-plt:
  42. @$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
  43. --apps kernel stdlib sasl inets crypto public_key ssl deps/*
  44. dialyze:
  45. @$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
  46. -Werror_handling -Wrace_conditions -Wunmatched_returns # -Wunderspecs