Skip to content

Commit 5c81ae4

Browse files
Disable webcam stuff on macOS
1 parent d5d443a commit 5c81ae4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

c_mpos/micropython.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ ifneq (,$(findstring -Wno-missing-field-initializers, $(CFLAGS_USERMOD)))
44
CFLAGS_USERMOD += -Wno-missing-field-initializers
55
endif
66

7-
SRC_USERMOD_C += $(MOD_DIR)/src/hello_world.c
7+
# Check which system this build is being performed on
8+
UNAME_S := $(shell uname -s)
9+
ifneq ($(UNAME_S),Darwin)
10+
# Non-macOS settings (e.g., Linux)
11+
LDFLAGS += -lv4l2
12+
SRC_USERMOD_C += $(MOD_DIR)/src/hello_world.c
13+
SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c
14+
endif
15+
816
SRC_USERMOD_C += $(MOD_DIR)/src/quirc_decode.c
9-
SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c
1017

1118
SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/identify.c
1219
SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/version_db.c
@@ -15,4 +22,3 @@ SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/quirc.c
1522

1623
CFLAGS+= -I/usr/include
1724

18-
LDFLAGS+= -lv4l2

0 commit comments

Comments
 (0)