-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (41 loc) · 1004 Bytes
/
Makefile
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
49
# File : Makefile
# Author : Tommy Mattsson, [email protected]
# Sources: http://stackoverflow.com/questions/1667597/erlang-emakefile-explain
# http://willcodeforfoo.com/2009/07/10/erlang-makefile/
# http://www.wlug.org.nz/MakefileHowto
MODULE = main
FUNC = start
ARG1 = "default"
ARG2 = regular
# Builds the application
all: ebin compile
start: all start_app
ebin:
@mkdir ebin
compile:
@erl -make
# Starts the application
# start_app:
# Starts an erlang node with a shell, prepends ebin to the code path (see
# "man erl" documentation for details) ans starts module main and function
# start
# erl -pa ebin -s $(MODULE) $(FUNC) $(ARG1) $(ARG2)
clean:
rm -rf *.beam
rm -rf *.dump
rm -rf doc/*.beam
rm -rf doc/*.dump
rm -rf ebin/
rm -rf include/*.beam
rm -rf include/*.dump
rm -rf scripts/*.beam
rm -rf scripts/*.dump
rm -rf src/*.beam
rm -rf src/*.dump
clean_all: clean
rm -rf *~
rm -rf doc/*~
rm -rf include/*~
rm -rf scripts/*~
rm -rf src/*~
.PHONY: all clean