-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
57 lines (46 loc) · 1.8 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
.POSIX:
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
node_modules_dir := ./node_modules
dist_dir := ./dist
jsfo_dist := ${dist_dir}/jsfo.js
src_dir := ./src
src_files := \
${src_dir}/core/assets.js \
${src_dir}/core/browser.js \
${src_dir}/core/debug.js \
${src_dir}/core/GameState.js \
${src_dir}/core/geometry.js \
${src_dir}/core/global.js \
${src_dir}/core/interface.js \
${src_dir}/core/map_objects.js \
${src_dir}/core/new_game.js \
${src_dir}/gamestate/MainState.js \
${src_dir}/core/rendering.js \
${src_dir}/core/vm.js \
${src_dir}/gamestate/CharacterScreenState.js \
${src_dir}/gamestate/ContextMenuState.js \
${src_dir}/gamestate/IngameMenuState.js \
${src_dir}/gamestate/InventoryState.js \
${src_dir}/gamestate/LoadState.js \
${src_dir}/gamestate/MainLoadState.js \
${src_dir}/gamestate/MainMenuState.js \
${src_dir}/gamestate/MapscreenState.js \
${src_dir}/gamestate/PipboyState.js \
${src_dir}/gamestate/SkilldexState.js \
${src_dir}/core/main.js
babel := ${node_modules_dir}/.bin/babel
babel_flags := --configFile ${src_dir}/babel.config.js
.PHONY: clean server
all: ${jsfo_dist}
${jsfo_dist}: ${node_modules_dir} ${src_files}
${babel} ${src_files} ${babel_flags} --out-file ${jsfo_dist}
clean:
rm -f ${jsfo_dist}
watch:
while inotifywait -e close_write ${src_dir}/*; do make; done
server: ${jsfo_dist}
python -m SimpleHTTPServer
${node_modules_dir}:
npm install