summaryrefslogtreecommitdiff
path: root/arch/sandbox/config.mk
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-18 11:59:47 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:58 -0600
commite8a7b3051b50e0ea1422b5bc5983539ee17a6b55 (patch)
treef7c0fc4759c7fc4d7ab35eebb7dd2c9f2445808d /arch/sandbox/config.mk
parent912dcb1b178e165a54d7c0a8d9e36afc9d46d3af (diff)
sandbox: Allo sdl-config to be overridden
When cross-compiling, sometimes sdl-config must come from a different path from the default. Add a way to override it, by adding SDL_CONFIG to the environment before building U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/config.mk')
-rw-r--r--arch/sandbox/config.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 31a12db103..05fbbd7bcc 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -5,14 +5,15 @@ PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
PLATFORM_CPPFLAGS += -fPIC
PLATFORM_LIBS += -lrt
+SDL_CONFIG ?= sdl-config
# Define this to avoid linking with SDL, which requires SDL libraries
# This can solve 'sdl-config: Command not found' errors
ifneq ($(NO_SDL),)
PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL
else
-PLATFORM_LIBS += $(shell sdl-config --libs)
-PLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
+PLATFORM_LIBS += $(shell $(SDL_CONFIG) --libs)
+PLATFORM_CPPFLAGS += $(shell $(SDL_CONFIG) --cflags)
endif
cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \