Simon Glass | 3d750d7 | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 1 | # Copyright (c) 2011 The Chromium OS Authors. |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 3d750d7 | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 3 | |
Masahiro Yamada | 4869aee | 2014-07-30 14:08:23 +0900 | [diff] [blame] | 4 | PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE |
Masahiro Yamada | 57a11eb | 2015-03-19 19:42:52 +0900 | [diff] [blame] | 5 | PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM |
Matthias Weisser | 0d3dd14 | 2011-11-29 12:16:40 +0100 | [diff] [blame] | 6 | PLATFORM_LIBS += -lrt |
Simon Glass | 62cf912 | 2013-04-26 02:53:43 +0000 | [diff] [blame] | 7 | |
Simon Glass | d8e2292 | 2015-02-10 18:52:35 -0700 | [diff] [blame] | 8 | # Define this to avoid linking with SDL, which requires SDL libraries |
| 9 | # This can solve 'sdl-config: Command not found' errors |
| 10 | ifneq ($(NO_SDL),) |
| 11 | PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL |
| 12 | else |
Simon Glass | 0d10f29 | 2014-02-27 13:26:17 -0700 | [diff] [blame] | 13 | ifdef CONFIG_SANDBOX_SDL |
| 14 | PLATFORM_LIBS += $(shell sdl-config --libs) |
| 15 | PLATFORM_CPPFLAGS += $(shell sdl-config --cflags) |
| 16 | endif |
Simon Glass | d8e2292 | 2015-02-10 18:52:35 -0700 | [diff] [blame] | 17 | endif |
Simon Glass | 0d10f29 | 2014-02-27 13:26:17 -0700 | [diff] [blame] | 18 | |
Tom Rini | a1965e9 | 2016-03-05 14:07:44 -0500 | [diff] [blame] | 19 | cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds \ |
Masahiro Yamada | 9f9a4e9 | 2014-02-24 11:12:18 +0900 | [diff] [blame] | 20 | -Wl,--start-group $(u-boot-main) -Wl,--end-group \ |
| 21 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map |
Simon Glass | 66c164b | 2014-02-26 15:59:14 -0700 | [diff] [blame] | 22 | |
Simon Glass | 1a3ba62 | 2016-07-04 11:57:46 -0600 | [diff] [blame] | 23 | cmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \ |
| 24 | -Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \ |
| 25 | $(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \ |
| 26 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections) |
| 27 | |
Simon Glass | 66c164b | 2014-02-26 15:59:14 -0700 | [diff] [blame] | 28 | CONFIG_ARCH_DEVICE_TREE := sandbox |