Makefile 409 B

123456789101112131415161718192021
  1. .PHONY: all compile clean build
  2. all: clean compile build
  3. clean:
  4. rm -rf ebin
  5. erlc_verbose_0 = @echo " ERLC " $(filter %.erl ,$(?F));
  6. erlc_verbose = $(erlc_verbose_$(V))
  7. define compile_erl
  8. $(erlc_verbose) erlc -v -o ebin/ $(1)
  9. endef
  10. compile: $(shell find src -type f -name \*.erl)
  11. @mkdir -p ebin/
  12. $(if $(strip $(filter %.erl ,$?)), \
  13. $(call compile_erl,$(filter %.erl %.core,$?)))
  14. build:
  15. @./build