forked from discoproject/disco
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (51 loc) · 1.56 KB
/
Copy pathMakefile
File metadata and controls
68 lines (51 loc) · 1.56 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#OPT = -W +native +"{hipe, [o3]}"
OPT = -W
CC = erlc
PYTHON = python
ESRC = master/src
EBIN = master/ebin
BIN_DIR = /usr/bin/
INSTALL_DIR = /usr/lib/disco/
CONFIG_DIR = /etc/disco/
TARGETDIR = $(DESTDIR)/$(INSTALL_DIR)
TARGETBIN = $(DESTDIR)/$(BIN_DIR)
TARGETCFG = $(DESTDIR)/$(CONFIG_DIR)
SRC = $(wildcard $(ESRC)/*.erl)
TARGET = $(addsuffix .beam, $(basename \
$(addprefix $(EBIN)/, $(notdir $(SRC)))))
BOOT = master/disco.boot
APP = master/ebin/disco.app
build: master
master: $(TARGET) $(APP)
clean:
- rm $(TARGET) $(BOOT)
- rm -Rf master/disco.rel master/disco.script
- rm -Rf pydisco/build
- rm -Rf pydisco/disco.egg-info
- rm -Rf node/build
- rm -Rf node/disco_node.egg-info
install: install-master install-pydisco install-node
install-master: install-config master
install -d $(TARGETDIR)/ebin
install -d $(TARGETBIN)
cp $(BOOT) $(TARGETDIR)
cp $(APP) $(TARGETDIR)/ebin
cp master/make-lighttpd-proxyconf.py $(TARGETDIR)
cp -r master/www $(TARGETDIR)
cp conf/lighttpd-master.conf $(TARGETCFG)
cp master/disco-master $(TARGETBIN)
install-node: install-config master
install -d $(TARGETDIR)/ebin
cp $(TARGET) $(TARGETDIR)/ebin
(cd node; $(PYTHON) setup.py install --root=$(DESTDIR))
cp conf/lighttpd-node.conf $(TARGETCFG)
install-pydisco:
(cd pydisco; $(PYTHON) setup.py install --root=$(DESTDIR))
install-config:
install -d $(TARGETCFG)
cp conf/disco.conf.example $(TARGETCFG)/disco.conf
$(APP): $(BOOT)
$(BOOT):
(cd master; erl -pa ebin -noshell -run make_boot write_scripts)
$(EBIN)/%.beam: $(ESRC)/%.erl
$(CC) $(OPT) -o $(EBIN) $<