blob: e38a44bd11011b68e6a7ba4bb64ab3cbabc811bd [file] [log] [blame]
Simon Glass3d750d72011-09-26 14:10:39 +00001# Copyright (c) 2011 The Chromium OS Authors.
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02002# SPDX-License-Identifier: GPL-2.0+
Simon Glass3d750d72011-09-26 14:10:39 +00003
Masahiro Yamada4869aee2014-07-30 14:08:23 +09004PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
Simon Glass62cf9122013-04-26 02:53:43 +00005PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM -DCONFIG_SYS_GENERIC_BOARD
Matthias Weisser0d3dd142011-11-29 12:16:40 +01006PLATFORM_LIBS += -lrt
Simon Glass62cf9122013-04-26 02:53:43 +00007
Simon Glass0d10f292014-02-27 13:26:17 -07008ifdef CONFIG_SANDBOX_SDL
9PLATFORM_LIBS += $(shell sdl-config --libs)
10PLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
11endif
12
Simon Glass62cf9122013-04-26 02:53:43 +000013# Support generic board on sandbox
14__HAVE_ARCH_GENERIC_BOARD := y
Masahiro Yamada9f9a4e92014-02-24 11:12:18 +090015
16cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \
17 -Wl,--start-group $(u-boot-main) -Wl,--end-group \
18 $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
Simon Glass66c164b2014-02-26 15:59:14 -070019
20CONFIG_ARCH_DEVICE_TREE := sandbox
Simon Glassdcc0bf42014-03-22 17:12:58 -060021
22# Define this to avoid linking with SDL, which requires SDL libraries
23# This can solve 'sdl-config: Command not found' errors
24ifneq ($(NO_SDL),)
25PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL
26endif