forked from danw/drink
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (25 loc) · 1.02 KB
/
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
ERL = erl -boot drink -config drink -sname drink +K true
all: app release
app: compile
true
check: compile
dialyzer -c ebin
drink.config:
touch drink.config
compile: priv/epam priv/ewebauth
erl -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.' -noshell
release: compile drink.rel
erl -eval 'case systools:make_script("drink", [no_module_tests, local, {path, ["ebin", "/usr/local/lib/yaws/ebin"]}]) of ok -> halt(0); error -> halt(1) end.' -noshell
clean:
rm -f ebin/*.beam priv/epam priv/ewebauth drink.boot drink.script erl_crash.dump
run: release drink.config
mkdir -p log web_log
${ERL}
priv/epam: src/pam/epam.c
gcc -o priv/epam -lpam src/pam/epam.c -lerl_interface -lei -lpthread
priv/ewebauth: src/webauth/ewebauth.c
gcc -o priv/ewebauth src/webauth/ewebauth.c -lerl_interface -lei -lpthread -lwebauth -I/usr/local/include
logs:
erl -boot start_sasl -sasl sasl_error_logger false -noshell -eval 'rb:start([{report_dir, "/root/drink/log"}]), rb:show(), init:stop().'
shell:
erl -sname drink_shell