-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 780 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 780 Bytes
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
all: build
.PHONY : clean
build: dest minify
@cp index.html ./build/
@cp -R assets ./build/
@mv ./build.js ./build/
minify: concat
ifeq ($(shell which uglifyjs),)
@mv ./temp.js ./build.js
else
@cat ./temp.js | uglifyjs --compress --mangle > ./build.js
@rm ./temp.js
endif
# These files need to be combined a specific order due to lexical scoping. For
# simplicity I am avoiding using modules or task runners.
concat:
@cat './js/connectionhandler.js' './js/mersennetwister.js' './js/fixed.js' './js/constants.js' './js/collision.js' './js/block.js' './js/projectile.js' './js/pickup.js' './js/enemy.js' './js/player.js' './js/spawner.js' './js/gamestate.js' './js/map.js' './js/world.js' './js/gamescene.js' > ./temp.js
dest:
@mkdir -p ./build
clean:
@rm -rf ./build