blob: 7b84f02a0a29b55cec30c955a71aa83ac92e8921 [file] [log] [blame]
Simon Glass4b0730d2011-09-26 14:10:39 +00001# Copyright (c) 2011 The Chromium OS Authors.
Wolfgang Denk1a459662013-07-08 09:37:19 +02002# SPDX-License-Identifier: GPL-2.0+
Simon Glass4b0730d2011-09-26 14:10:39 +00003
Masahiro Yamada90f984e2014-07-30 14:08:23 +09004PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
Simon Glassa733b062013-04-26 02:53:43 +00005PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM -DCONFIG_SYS_GENERIC_BOARD
Matthias Weisserd99a6872011-11-29 12:16:40 +01006PLATFORM_LIBS += -lrt
Simon Glassa733b062013-04-26 02:53:43 +00007
Simon Glasse50ab222015-02-10 18:52:35 -07008# Define this to avoid linking with SDL, which requires SDL libraries
9# This can solve 'sdl-config: Command not found' errors
10ifneq ($(NO_SDL),)
11PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL
12else
Simon Glassbbc09bf2014-02-27 13:26:17 -070013ifdef CONFIG_SANDBOX_SDL
14PLATFORM_LIBS += $(shell sdl-config --libs)
15PLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
16endif
Simon Glasse50ab222015-02-10 18:52:35 -070017endif
Simon Glassbbc09bf2014-02-27 13:26:17 -070018
Simon Glassa733b062013-04-26 02:53:43 +000019# Support generic board on sandbox
20__HAVE_ARCH_GENERIC_BOARD := y
Masahiro Yamadaad0fed42014-02-24 11:12:18 +090021
22cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \
23 -Wl,--start-group $(u-boot-main) -Wl,--end-group \
24 $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
Simon Glass714a5622014-02-26 15:59:14 -070025
26CONFIG_ARCH_DEVICE_TREE := sandbox