-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (38 loc) · 1.03 KB
/
Makefile
File metadata and controls
48 lines (38 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#EXT_MOD = ../amqp_client
EXT_MOD_INCLUDES = $(EXT_MOD:%=%/include)
INCLUDE_DIR = include
INCLUDE_DIR += $(EXT_MOD_INCLUDES)
INCLUDES = $(INCLUDE_DIR:%=-I%)
SRC_DIR = src
TEST_DIR = test
EBIN_DIR := ebin
HTML_DOC_DIR = doc/html
ERLC_OPTS = +debug_info -DTEST
ERLC := erlc $(ERLC_OPTS)
VSN=1.1
APP_NAME=eworkman
LICENSE=MIT
all: $(EBIN_DIR)
$(ERLC) -W $(INCLUDES) -o $(EBIN_DIR) $(SRC_DIR)/*.erl
cp $(SRC_DIR)/eworkman.app.src $(EBIN_DIR)/eworkman.app
tests: $(EBIN_DIR)
@$(ERLC) -W $(INCLUDES) -o $(EBIN_DIR) $(TEST_DIR)/*.erl
clean:
@rm -rvf $(EBIN_DIR)/* $(HTML_DOC_DIR)
tags: ctags etags
ctags:
cd $(SRC_DIR) ; ctags -R . ../include
etags:
cd $(SRC_DIR) ; etags -R . ../include
$(EBIN_DIR) :
( test -d $(EBIN_DIR) || mkdir -p $(EBIN_DIR) )
dia:
dialyzer \
$(INCLUDES) \
--src \
-r $(SRC_DIR)
doc:
erl -noshell -run edoc_run application "'$(APP_NAME)'" \
'"."' \
'[{dir,"$(HTML_DOC_DIR)"},{new, true},{hidden, true},{private, true},{def,[{vsn,"$(VSN)"}, {license, "(License: $(LICENSE))"}]}]'
.PHONY: clean ctags dia doc