forked from discord/airhornbot
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
32 lines (23 loc) · 643 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
BOT_DIR=cmd/airhornbot
WEB_DIR=cmd/airhornweb
BOT_BINARY=${GOPATH}/bin/airhornbot
WEB_BINARY=${GOPATH}/bin/airhornweb
JS_FILES = $(shell find static/src/ -type f -name '*.js')
default: all
.PHONY: all
all: bot web npm gulp
bot: cmd/airhornbot/bot.go
cd ${BOT_DIR} && go get && \
go build -o ${BOT_BINARY} bot.go
web: cmd/airhornweb/web.go static
cd ${WEB_DIR} && go get && \
go build -o ${WEB_BINARY} web.go
npm: static/package.json
cd static && npm install .
gulp: $(JS_FILES)
cd static && gulp dist
.PHONY: static
static: npm gulp
.PHONY: clean
clean:
rm -rf ${BOT_BINARY} ${WEB_BINARY} static/dist/ cmd/airhorn*/dump.rdb