Skip to content

Commit c14cbd9

Browse files
committed
working on macOS build
1 parent 6c64076 commit c14cbd9

File tree

3 files changed

+8
-20
lines changed

3 files changed

+8
-20
lines changed

builder/macOS.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,14 @@ def build_commands(_, extra_args, script_dir, lv_cflags, board):
5858
unix_cmd.append(f'VARIANT={board}')
5959

6060
if lv_cflags:
61-
lv_cflags += ' -Wno-missing-field-initializers -Wno-unused-function'
62-
else:
63-
lv_cflags = '-Wno-missing-field-initializers -Wno-unused-function'
61+
unix_cmd.append(f'LV_CFLAGS="{lv_cflags}"')
6462

6563
unix_cmd.extend([
66-
f'LV_CFLAGS="{lv_cflags}"',
67-
f'LV_PORT=unix',
64+
'LV_PORT=unix',
6865
f'USER_C_MODULES="{script_dir}/ext_mod"',
69-
f'CFLAGS=-Wno-unused-function'
66+
'CFLAGS_EXTRA=-Wno-unused-function'
7067
])
68+
7169
unix_cmd.extend(extra_args)
7270

7371
clean_cmd.extend(unix_cmd[:])

ext_mod/lcd_bus/micropython.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ ifneq (,$(findstring -Wno-missing-field-initializers, $(CFLAGS_USERMOD)))
1313
CFLAGS_USERMOD += -Wno-missing-field-initializers
1414
endif
1515

16-
ifneq (,$(findstring -Wno-unused-function, $(CFLAGS_USERMOD)))
17-
CFLAGS_USERMOD += -Wno-unused-function
18-
endif
19-
2016
SRC_USERMOD_C += $(MOD_DIR)/modlcd_bus.c
2117
SRC_USERMOD_C += $(MOD_DIR)/lcd_types.c
2218
SRC_USERMOD_C += $(MOD_DIR)/common_src/i2c_bus.c

ext_mod/lvgl/micropython.mk

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ CFLAGS_USERMOD += -I$(LVGL_BINDING_DIR)
1414
CFLAGS_USERMOD += -I$(LVGL_DIR)
1515
CFLAGS_USERMOD += -I$(LVGL_BINDING_DIR)/include
1616

17-
ifneq (,$(findstring -Wno-missing-field-initializers, $(CFLAGS_USERMOD)))
18-
CFLAGS_USERMOD += -Wno-missing-field-initializers
19-
endif
20-
21-
ifneq (,$(findstring -Wno-unused-function, $(CFLAGS_USERMOD)))
22-
CFLAGS_USERMOD += -Wno-unused-function
17+
ifdef $(LV_CFLAGS)
18+
CFLAGS_USERMOD += $(LV_CFLAGS)
2319
endif
2420

25-
ifneq (,$(findstring "", $(LV_CFLAGS)))
26-
else
27-
CFLAGS_USERMOD += $(LV_CFLAGS)
21+
ifneq (,$(findstring -Wno-missing-field-initializers, $(CFLAGS_USERMOD)))
22+
CFLAGS_USERMOD += -Wno-missing-field-initializers
2823
endif
2924

3025
ALL_LVGL_SRC = $(shell find $(LVGL_DIR) -type f -name '*.h') $(LVGL_BINDING_DIR)/lib/lv_conf.h
@@ -33,7 +28,6 @@ LVGL_MPY = $(BUILD)/lv_mpy.c
3328
LVGL_MPY_METADATA = $(BUILD)/lv_mpy.json
3429

3530

36-
3731
SRC_USERMOD_LIB_C += $(shell find $(LVGL_DIR)/src -type f -name "*.c")
3832
SRC_USERMOD_LIB_C += $(LVGL_ADDON_DIR)/src/color_addons.c
3933
SRC_USERMOD_C += $(LVGL_MPY)

0 commit comments

Comments
 (0)