Use pkg-config to configure SDL
Define MICROPY_SDL if sdl2 is installed. Remove internal SDL driver, use LVGL SDL driver instead.
This commit is contained in:
parent
db979250af
commit
5e65bc2e03
@ -1 +1 @@
|
|||||||
Subproject commit 6e437878fbfebfd15406a8cf8b5a8967af0833cd
|
Subproject commit 60b51a8ebaf4b89321041aebdd9434567b404758
|
||||||
@ -99,7 +99,7 @@ else
|
|||||||
# Use gcc syntax for map file
|
# Use gcc syntax for map file
|
||||||
LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections
|
LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections
|
||||||
endif
|
endif
|
||||||
LDFLAGS += $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA) -lSDL2
|
LDFLAGS += $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
|
||||||
|
|
||||||
# Flags to link with pthread library
|
# Flags to link with pthread library
|
||||||
LIBPTHREAD = -lpthread
|
LIBPTHREAD = -lpthread
|
||||||
@ -219,6 +219,13 @@ endif
|
|||||||
|
|
||||||
# Additional optional libraries
|
# Additional optional libraries
|
||||||
|
|
||||||
|
SDL_CFLAGS_MOD := $(shell pkg-config --silence-errors --cflags sdl2)
|
||||||
|
SDL_LDFLAGS_MOD := $(shell pkg-config --silence-errors --libs sdl2)
|
||||||
|
ifneq ($(SDL_LDFLAGS_MOD),)
|
||||||
|
CFLAGS_MOD += $(SDL_CFLAGS_MOD) -DMICROPY_SDL=1
|
||||||
|
LDFLAGS_MOD += $(SDL_LDFLAGS_MOD)
|
||||||
|
endif
|
||||||
|
|
||||||
RLOTTIE_CFLAGS_MOD := $(shell pkg-config --silence-errors --cflags rlottie)
|
RLOTTIE_CFLAGS_MOD := $(shell pkg-config --silence-errors --cflags rlottie)
|
||||||
RLOTTIE_LDFLAGS_MOD := $(shell pkg-config --silence-errors --libs rlottie)
|
RLOTTIE_LDFLAGS_MOD := $(shell pkg-config --silence-errors --libs rlottie)
|
||||||
ifneq ($(RLOTTIE_LDFLAGS_MOD),)
|
ifneq ($(RLOTTIE_LDFLAGS_MOD),)
|
||||||
@ -262,9 +269,6 @@ SRC_C += \
|
|||||||
$(wildcard $(VARIANT_DIR)/*.c)
|
$(wildcard $(VARIANT_DIR)/*.c)
|
||||||
|
|
||||||
LIB_SRC_C += $(addprefix lib/,\
|
LIB_SRC_C += $(addprefix lib/,\
|
||||||
lv_bindings/driver/SDL/sdl_common.c \
|
|
||||||
lv_bindings/driver/SDL/sdl.c \
|
|
||||||
lv_bindings/driver/SDL/modSDL.c \
|
|
||||||
$(LIB_SRC_C_EXTRA) \
|
$(LIB_SRC_C_EXTRA) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user