File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
MOS ?= mos
4
4
LOCAL ?= 0
5
+ CLEAN ?= 0
6
+ VERBOSE ?= 0
5
7
MOS_BUILD_FLAGS ?=
6
8
BUILD_DIR ?= ./build_$*
7
9
10
+ MAKEFLAGS += --warn-undefined-variables
11
+
12
+ MOS_BUILD_FLAGS_FINAL = $(MOS_BUILD_FLAGS )
8
13
ifeq "$(LOCAL ) " "1"
9
- MOS_BUILD_FLAGS += --local
14
+ MOS_BUILD_FLAGS_FINAL += --local
15
+ endif
16
+ ifeq "$(CLEAN ) " "1"
17
+ MOS_BUILD_FLAGS_FINAL += --clean
18
+ endif
19
+ ifeq "$(VERBOSE ) " "1"
20
+ MOS_BUILD_FLAGS_FINAL += --verbose
10
21
endif
11
22
12
23
build : Shelly1 Shelly1PM Shelly2 Shelly25 ShellyPlugS
@@ -30,12 +41,15 @@ Shelly2: build-Shelly2
30
41
Shelly25 : build-Shelly25
31
42
@true
32
43
33
- fs :
44
+ fs/index.html.gz : fs_src/index.html
34
45
gzip -9 -c fs_src/index.html > fs/index.html.gz
46
+
47
+ fs/style.css.gz : fs_src/style.css
35
48
gzip -9 -c fs_src/style.css > fs/style.css.gz
36
49
37
- build-% : fs
38
- $(MOS ) build --platform=esp8266 --build-var=MODEL=$* $(MOS_BUILD_FLAGS ) --build-dir=$(BUILD_DIR ) --binary-libs-dir=./binlibs
50
+ build-% : fs/index.html.gz fs/style.css.gz
51
+ $(MOS ) build --platform=esp8266 --build-var=MODEL=$* \
52
+ --build-dir=$(BUILD_DIR ) --binary-libs-dir=./binlibs $(MOS_BUILD_FLAGS_FINAL )
39
53
cp $(BUILD_DIR ) /fw.zip shelly-homekit-$* .zip
40
54
41
55
upload-% :
You can’t perform that action at this time.
0 commit comments