Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 1 | # Copyright (c) 2011 The Chromium OS Authors. |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 3 | |
Masahiro Yamada | 90f984e | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 4 | PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE |
Simon Glass | a733b06 | 2013-04-26 02:53:43 +0000 | [diff] [blame] | 5 | PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM -DCONFIG_SYS_GENERIC_BOARD |
Matthias Weisser | d99a687 | 2011-11-29 12:16:40 +0100 | [diff] [blame] | 6 | PLATFORM_LIBS += -lrt |
Simon Glass | a733b06 | 2013-04-26 02:53:43 +0000 | [diff] [blame] | 7 | |
Simon Glass | bbc09bf | 2014-02-27 13:26:17 -0700 | [diff] [blame] | 8 | ifdef CONFIG_SANDBOX_SDL |
| 9 | PLATFORM_LIBS += $(shell sdl-config --libs) |
| 10 | PLATFORM_CPPFLAGS += $(shell sdl-config --cflags) |
| 11 | endif |
| 12 | |
Simon Glass | a733b06 | 2013-04-26 02:53:43 +0000 | [diff] [blame] | 13 | # Support generic board on sandbox |
| 14 | __HAVE_ARCH_GENERIC_BOARD := y |
Masahiro Yamada | ad0fed4 | 2014-02-24 11:12:18 +0900 | [diff] [blame] | 15 | |
| 16 | cmd_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 Glass | 714a562 | 2014-02-26 15:59:14 -0700 | [diff] [blame] | 19 | |
| 20 | CONFIG_ARCH_DEVICE_TREE := sandbox |
Simon Glass | ad0e463 | 2014-03-22 17:12:58 -0600 | [diff] [blame] | 21 | |
| 22 | # Define this to avoid linking with SDL, which requires SDL libraries |
| 23 | # This can solve 'sdl-config: Command not found' errors |
| 24 | ifneq ($(NO_SDL),) |
| 25 | PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL |
| 26 | endif |