6 INCLUDE_DIRS := ../include $(wildcard ../deps/*/include)
7 EBIN_DIRS := $(wildcard ../deps/*/ebin)
8 ERLC_FLAGS := -W $(INCLUDE_DIRS:../%=-I ../%) $(EBIN_DIRS:%=-pa %)
11 ERLC_FLAGS += +debug_info
26 ERL_TEMPLATE := $(wildcard *.et)
27 ERL_SOURCES := $(wildcard *.erl)
28 ERL_HEADERS := $(wildcard *.hrl) $(wildcard ../include/*.hrl)
29 ERL_OBJECTS := $(ERL_SOURCES:%.erl=$(EBIN_DIR)/%.beam)
30 ERL_TEMPLATES := $(ERL_TEMPLATE:%.et=$(EBIN_DIR)/%.beam)
31 ERL_OBJECTS_LOCAL := $(ERL_SOURCES:%.erl=./%.$(EMULATOR))
32 APP_FILES := $(wildcard *.app)
33 EBIN_FILES = $(ERL_OBJECTS) $(APP_FILES:%.app=../ebin/%.app) $(ERL_TEMPLATES)
34 MODULES = $(ERL_SOURCES:%.erl=%)
39 $(EBIN_DIR)/%.$(EMULATOR): %.erl
40 $(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $<
42 $(EBIN_DIR)/%.$(EMULATOR): %.et
43 $(ERL) -noshell -pa ../../elib/erltl/ebin/ -eval "erltl:compile(atom_to_list('$<'), [{outdir, \"../ebin\"}, report_errors, report_warnings, nowarn_unused_vars])." -s init stop
45 ./%.$(EMULATOR): %.erl
46 $(ERLC) $(ERLC_FLAGS) -o . $<
48 $(DOC_DIR)/%.html: %.erl
49 $(ERL) -noshell -run edoc file $< -run init stop