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