2018-05-06 21:58:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2011-09-26 14:10:39 +00:00
|
|
|
# Copyright (c) 2011 The Chromium OS Authors.
|
|
|
|
|
2014-07-30 05:08:23 +00:00
|
|
|
PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
|
2015-03-19 10:42:52 +00:00
|
|
|
PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
|
2018-09-03 09:08:10 +00:00
|
|
|
PLATFORM_CPPFLAGS += -fPIC
|
2011-11-29 11:16:40 +00:00
|
|
|
PLATFORM_LIBS += -lrt
|
2013-04-26 02:53:43 +00:00
|
|
|
|
2015-02-11 01:52:35 +00:00
|
|
|
# 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
|
2014-02-27 20:26:17 +00:00
|
|
|
ifdef CONFIG_SANDBOX_SDL
|
|
|
|
PLATFORM_LIBS += $(shell sdl-config --libs)
|
|
|
|
PLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
|
|
|
|
endif
|
2015-02-11 01:52:35 +00:00
|
|
|
endif
|
2014-02-27 20:26:17 +00:00
|
|
|
|
2018-11-24 04:29:30 +00:00
|
|
|
cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \
|
2014-02-24 02:12:18 +00:00
|
|
|
-Wl,--start-group $(u-boot-main) -Wl,--end-group \
|
|
|
|
$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
|
2014-02-26 22:59:14 +00:00
|
|
|
|
2016-07-04 17:57:46 +00:00
|
|
|
cmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \
|
2018-11-24 04:29:30 +00:00
|
|
|
$(patsubst $(obj)/%,%,$(u-boot-spl-init)) \
|
2016-07-04 17:57:46 +00:00
|
|
|
-Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \
|
|
|
|
$(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \
|
|
|
|
$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections)
|
|
|
|
|
2014-02-26 22:59:14 +00:00
|
|
|
CONFIG_ARCH_DEVICE_TREE := sandbox
|