Makefile 986 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .PHONY: rel deps test plugins
  2. APP = emqttd
  3. BASE_DIR = $(shell pwd)
  4. REBAR = $(BASE_DIR)/rebar
  5. DIST = $(BASE_DIR)/rel/$(APP)
  6. all: deps compile
  7. compile: deps
  8. @$(REBAR) compile
  9. deps:
  10. @$(REBAR) get-deps
  11. update-deps:
  12. @$(REBAR) update-deps
  13. xref:
  14. @$(REBAR) xref skip_deps=true
  15. clean:
  16. @$(REBAR) clean
  17. test:
  18. @$(REBAR) skip_deps=true eunit
  19. edoc:
  20. @$(REBAR) doc
  21. rel: compile
  22. @cd rel && ../rebar generate -f
  23. plugins:
  24. @for plugin in ./plugins/* ; do \
  25. cp -R $${plugin} $(DIST)/plugins/ && rm -rf $(DIST)/$${plugin}/src/ ; \
  26. done
  27. dist: rel plugins
  28. PLT = $(BASE_DIR)/.emqttd_dialyzer.plt
  29. APPS = erts kernel stdlib sasl crypto ssl os_mon syntax_tools \
  30. public_key mnesia inets compiler
  31. check_plt: compile
  32. dialyzer --check_plt --plt $(PLT) --apps $(APPS) \
  33. deps/*/ebin apps/*/ebin
  34. build_plt: compile
  35. dialyzer --build_plt --output_plt $(PLT) --apps $(APPS) \
  36. deps/*/ebin apps/*/ebin
  37. dialyzer: compile
  38. dialyzer -Wno_return --plt $(PLT) deps/*/ebin apps/*/ebin