blob: 6d62abb0352492b7b2f19fcab60a43d001ad5d62 [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
Masahiro Yamada57a11eb2015-03-19 19:42:52 +09005PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
Matthias Weisser0d3dd142011-11-29 12:16:40 +01006PLATFORM_LIBS += -lrt
Simon Glass62cf9122013-04-26 02:53:43 +00007
Simon Glassd8e22922015-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 Glass0d10f292014-02-27 13:26:17 -070013ifdef CONFIG_SANDBOX_SDL
14PLATFORM_LIBS += $(shell sdl-config --libs)
15PLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
16endif
Simon Glassd8e22922015-02-10 18:52:35 -070017endif
Simon Glass0d10f292014-02-27 13:26:17 -070018
Tom Rinia1965e92016-03-05 14:07:44 -050019cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds \
Masahiro Yamada9f9a4e92014-02-24 11:12:18 +090020 -Wl,--start-group $(u-boot-main) -Wl,--end-group \
21 $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
Simon Glass66c164b2014-02-26 15:59:14 -070022
Simon Glass1a3ba622016-07-04 11:57:46 -060023cmd_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 Glass66c164b2014-02-26 15:59:14 -070028CONFIG_ARCH_DEVICE_TREE := sandbox