Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # See LICENSE for licensing information.
  2. PROJECT = cowboy
  3. PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
  4. PROJECT_VERSION = 2.5.0
  5. PROJECT_REGISTERED = cowboy_clock
  6. # Options.
  7. PLT_APPS = public_key ssl
  8. CT_OPTS += -ct_hooks cowboy_ct_hook [] # -boot start_sasl
  9. # Dependencies.
  10. LOCAL_DEPS = crypto
  11. DEPS = cowlib ranch
  12. dep_cowlib = git https://github.com/ninenines/cowlib 2.5.1
  13. dep_ranch = git https://github.com/ninenines/ranch 1.6.1
  14. DOC_DEPS = asciideck
  15. TEST_DEPS = $(if $(CI_ERLANG_MK),ci.erlang.mk) ct_helper gun proper
  16. dep_ct_helper = git https://github.com/extend/ct_helper master
  17. dep_gun = git https://github.com/ninenines/gun master
  18. # CI configuration.
  19. dep_ci.erlang.mk = git https://github.com/ninenines/ci.erlang.mk master
  20. DEP_EARLY_PLUGINS = ci.erlang.mk
  21. AUTO_CI_OTP ?= OTP-19+
  22. AUTO_CI_HIPE ?= OTP-LATEST
  23. # AUTO_CI_ERLLVM ?= OTP-LATEST
  24. AUTO_CI_WINDOWS ?= OTP-19+
  25. # Standard targets.
  26. include erlang.mk
  27. # Compile options.
  28. ERLC_OPTS += +warn_missing_spec +warn_untyped_record
  29. TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}'
  30. # Generate rebar.config on build.
  31. app:: rebar.config
  32. # Dialyze the tests.
  33. # DIALYZER_OPTS += --src -r test
  34. # h2spec setup.
  35. GOPATH := $(ERLANG_MK_TMP)/gopath
  36. export GOPATH
  37. H2SPEC := $(GOPATH)/src/github.com/summerwind/h2spec/h2spec
  38. export H2SPEC
  39. # @todo It would be better to allow these dependencies to be specified
  40. # on a per-target basis instead of for all targets.
  41. test-build:: $(H2SPEC)
  42. $(H2SPEC):
  43. $(gen_verbose) mkdir -p $(GOPATH)/src/github.com/summerwind
  44. $(verbose) git clone --depth 1 https://github.com/summerwind/h2spec $(dir $(H2SPEC))
  45. $(verbose) $(MAKE) -C $(GOPATH)/src/github.com/summerwind/h2spec build MAKEFLAGS=
  46. # Use erl_make_certs from the tested release during CI
  47. # and ensure that ct_helper is always recompiled.
  48. ci-setup:: clean deps test-deps
  49. $(gen_verbose) cp ~/.kerl/builds/$(CI_OTP_RELEASE)/otp_src_git/lib/ssl/test/erl_make_certs.erl deps/ct_helper/src/ || true
  50. $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/ct_helper clean app