forked from depp/city_knot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (52 loc) · 1.35 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
export PATH := $(PATH):$(HOME)/.pub-cache/bin:.
PUB=/usr/lib/dart/bin/pub
VERSION := $(shell grep version pubspec.yaml | cut -f 2 -d\ )
#@ Available Targets:
#@
#@ help - Show this messsage
#@
help:
@egrep "^#@" ${MAKEFILE_LIST} | cut -c 3-
#@ get - Download package dependencies and install tools
#@ (needs to be run at lease once after `git clone`
#@
get:
$(PUB) get
${PUB} global activate webdev
#@ upgrade - Upgrade dependencies
#@
upgrade:
$(PUB) upgrade
#@ serve - Launch web server (also does just-in-time-transpiling)
#@ Uses the development compiler.
#@ go to localhost:8080/delta.html
#@
serve:
webdev serve --verbose web/
#@ build_release - builds a release version using dart2js
#@ Output can be found in build/
#@
build_release:
webdev build --verbose --release --output web:build
#@ serve_release - launch web server for what is generated by
#@ `build_release`
#@
serve_release:
python3 -m http.server 8080
ZIP_DIR = City_Life
ZIP_BALL = city_life.zip
#@ zipball - create zip archive for demo submisssion
#@
zipball:
rm -rf ${ZIP_DIR}
mkdir ${ZIP_DIR}
cp build/delta.html ${ZIP_DIR}/index.html
cp build/delta.dart.js ${ZIP_DIR}/delta.dart.js
cp web/music.opus ${ZIP_DIR}/music.opus
rm -f ${ZIP_BALL}
zip ${ZIP_BALL} ${ZIP_DIR} -r -D
#@ clean
#@
clean:
rm -rf ${ZIP_DIR}
rm -rf build/