-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
104 lines (77 loc) · 1.78 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
PKG_CONFIG_PATH := $(if $(QT_CONFIG_PATH),$(QT_CONFIG_PATH), $(PKG_CONFIG_PATH))
all: pobfe
.PHONY: update
update: git_pull backup_data pobfe
.PHONY: rebuild_all
rebuild_all: clean_build clean_lcurl pobfe
.PHONY: rebuild_fe
rebuild_fe: clean_build pobfe
.PHONY: backup_data
backup_data:
cp -r pobfe/Builds .
#### Copy all the bits required for the FE to pobfe
#### This will always execute due to clean_fe dependency
pobfe: clean_fe lcurl.so build
mkdir pobfe; \
cp -r ./Builds pobfe;\
cp build/pobfrontend pobfe; \
cp pob/manifest.xml pobfe; \
cp -R pob/runtime pobfe; \
cp -R pob/runtime/lua/*.lua pobfe; \
cp -R pob/runtime/lua/sha1 pobfe/sha1; \
cp -R pob/runtime/lua/sha1/init.lua pobfe/sha1.lua; \
cp -R pob/src/* pobfe; \
cp lcurl.so pobfe
#### Actual Build stuff
build:
meson -Dbuildtype=release pobfrontend build; \
pushd build; \
ninja; \
popd
lcurl.so:
pushd lua-curl; \
LUA_IMPL=luajit make; \
mv lcurl.so ../lcurl.so; \
popd
#### Git things
.PHONY: git_init
git_init:
git submodule update --init --recursive
.PHONY: git_reset
git_reset: git_init
git submodule foreach git reset --hard
git submodule foreach git checkout master
git submodule foreach git clean -fd
.PHONY: git_pull
git_pull: git_reset
git submodule foreach git pull
#### Tools required for things to work
.PHONY: tools
tools: qt lua zlib meson
.PHONY: qt
qt:
brew install qt5
.PHONY: lua
lua:
brew install luajit
.PHONY: zlib
zlib:
brew install zlib
.PHONY: meson
meson:
brew install meson
#### Clean-up Tasks
.PHONY: clean_build
clean_build: clean_fe
rm -rf build
.PHONY: clean_lcurl
clean_lcurl:
rm -rf lcurl.so
.PHONY: clean_fe
clean_fe:
rm -rf pobfe
.PHONY: clean_all
clean_all: clean_fe clean_lcurl clean_build
#### Go nuclear
.PHONY: nuke
nuke: clean_all git_reset