-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 905 Bytes
/
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
# use `make VESC_TOOL=path/to/your/vesc_tool` to specify custom vesc_tool path
VESC_TOOL ?= vesc_tool
# use `make MINIFY_QML=0` to skip qml minification and pack the qml verbatim
MINIFY_QML ?= 1
all: stig.vescpkg
stig.vescpkg: src package.lisp README-gen.md ui.qml
$(VESC_TOOL) --buildPkg "stig.vescpkg:package.lisp:ui.qml:0:README-gen.md:Stig"
src:
$(MAKE) -C $@
VERSION=`cat version`
ifeq ($(strip $(MINIFY_QML)),1)
MINIFY_CMD="./rjsmin.py"
else
MINIFY_CMD="cat"
endif
README-gen.md: README.md version
cp $< $@
echo "" >> $@
echo "## Build Info" >> $@
echo "- Version: ${VERSION}" >> $@
echo "- Build Date: `date --rfc-3339=seconds`" >> $@
echo "- Git Commit: #`git rev-parse --short HEAD`" >> $@
ui.qml: ui.qml.in version
cat $< | sed "s/{{VERSION}}/${VERSION}/g" | ${MINIFY_CMD} > $@
clean:
rm -f stig.vescpkg README-gen.md ui.qml
$(MAKE) -C src clean
.PHONY: all clean src