-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
48 lines (35 loc) · 1.22 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
38
39
40
41
42
43
44
45
46
47
GRN=\e[32m
RED=\e[31m
RST=\e[0m
build:
GOBIN=${PWD}/bin/ go install ./cmd/...
@${MAKE} success
help:
@echo 'debian: install libgl1-mesa-dev and xorg-dev packages'
dev: clean generate embed-assets build
generate:
# stringer -output librpg/common/strings.go -type EntityType,EntityState,ItemType,ObjectType,animState,ActionType,StatusEffect,DObjectType librpg/common
stringer -output librpg/strings.go -type ActionType,EntityState,EntityType,ItemType,animState,StatusEffect ./librpg/
stringer -output librpg/common/strings.go -type ObjectType ./librpg/common
embed-assets:
@test -x ${shell which go-bindata} && \
rm assets/assets.go || true
@test -x ${shell which go-bindata} && \
go-bindata -o assets/assets.go -pkg assets -prefix assets/ ./assets/...
success:
@printf '\n\n'
@printf '${GRN}you have a new game${RST}'
@printf '\n\n'
fail:
@printf 'build failed. please install dependencies and try again.\nlibgl1-mesa-dev and xorg-dev'
clean:
rm -rf ./bin
key:
test -f rpg.key || ssh-keygen -f rpg.key
pdf:
test -f p.debug && \
go tool pprof -pdf p.debug > p.pdf && echo p.pdf created
install:
install mapmaker /usr/local/bin/ae-mapmaker
install aerpg /usr/local/bin/aerpg
install mapgen /usr/local/bin/ae-mapgen