xref: /rk3399_rockchip-uboot/arch/sandbox/config.mk (revision ebe621d5fb2f5c15aff50e0610372f2751fd152f)
14b0730d2SSimon Glass# Copyright (c) 2011 The Chromium OS Authors.
21a459660SWolfgang Denk# SPDX-License-Identifier:	GPL-2.0+
34b0730d2SSimon Glass
490f984e3SMasahiro YamadaPLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
50a9e7ee5SMasahiro YamadaPLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
6d99a6874SMatthias WeisserPLATFORM_LIBS += -lrt
7a733b06bSSimon Glass
8e50ab229SSimon Glass# Define this to avoid linking with SDL, which requires SDL libraries
9e50ab229SSimon Glass# This can solve 'sdl-config: Command not found' errors
10e50ab229SSimon Glassifneq ($(NO_SDL),)
11e50ab229SSimon GlassPLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL
12e50ab229SSimon Glasselse
13bbc09bf2SSimon Glassifdef CONFIG_SANDBOX_SDL
14bbc09bf2SSimon GlassPLATFORM_LIBS += $(shell sdl-config --libs)
15bbc09bf2SSimon GlassPLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
16bbc09bf2SSimon Glassendif
17e50ab229SSimon Glassendif
18bbc09bf2SSimon Glass
19699946aeSTom Rinicmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds \
20ad0fed46SMasahiro Yamada	-Wl,--start-group $(u-boot-main) -Wl,--end-group \
21ad0fed46SMasahiro Yamada	$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
22714a5621SSimon Glass
23*4cfc4167SSimon Glasscmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \
24*4cfc4167SSimon Glass	-Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \
25*4cfc4167SSimon Glass	$(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \
26*4cfc4167SSimon Glass	$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections)
27*4cfc4167SSimon Glass
28714a5621SSimon GlassCONFIG_ARCH_DEVICE_TREE := sandbox
29