Skip to content

Commit b765dee

Browse files
committed
working on macOS port
1 parent d29c7ea commit b765dee

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

builder/unix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def build_commands(_, extra_args, script_dir, lv_cflags, board):
8585
unix_cmd.extend(
8686
[
8787
f'LV_CFLAGS="{lv_cflags}"',
88-
f'LV_PORT=unix',
88+
f'LV_PORT={REAL_PORT}',
8989
f'USER_C_MODULES="{script_dir}/ext_mod"',
9090
(
9191
'"CFLAGS_EXTRA='

ext_mod/lcd_bus/micropython.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ ifneq (,$(findstring unix, $(LV_PORT)))
2727
CFLAGS_USERMOD += -I$(BUILD)/SDL/include-config-release/SDL2
2828
LDFLAGS_USERMOD += -L$(BUILD)/SDL
2929

30-
ifeq ($(UNAME_S),Darwin)
30+
LDFLAGS_USERMOD += -lSDL2
31+
32+
else
33+
ifneq (,$(findstring macOS, $(LV_PORT)))
34+
CFLAGS_USERMOD += -DMP_PORT_UNIX=1
35+
CFLAGS_USERMOD += -I$(BUILD)/SDL/include/SDL2
36+
CFLAGS_USERMOD += -I$(BUILD)/SDL/include-config-release/SDL2
37+
LDFLAGS_USERMOD += -L$(BUILD)/SDL
38+
3139
LDFLAGS_USERMOD += -lSDL2-2.0
32-
else
33-
LDFLAGS_USERMOD += -lSDL2
3440
endif
3541
endif

0 commit comments

Comments
 (0)