1*4882a593Smuzhiyun# Copyright (c) 2011 The Chromium OS Authors. 2*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0+ 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunPLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE 5*4882a593SmuzhiyunPLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM 6*4882a593SmuzhiyunPLATFORM_LIBS += -lrt 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun# Define this to avoid linking with SDL, which requires SDL libraries 9*4882a593Smuzhiyun# This can solve 'sdl-config: Command not found' errors 10*4882a593Smuzhiyunifneq ($(NO_SDL),) 11*4882a593SmuzhiyunPLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL 12*4882a593Smuzhiyunelse 13*4882a593Smuzhiyunifdef CONFIG_SANDBOX_SDL 14*4882a593SmuzhiyunPLATFORM_LIBS += $(shell sdl-config --libs) 15*4882a593SmuzhiyunPLATFORM_CPPFLAGS += $(shell sdl-config --cflags) 16*4882a593Smuzhiyunendif 17*4882a593Smuzhiyunendif 18*4882a593Smuzhiyun 19*4882a593Smuzhiyuncmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds \ 20*4882a593Smuzhiyun -Wl,--start-group $(u-boot-main) -Wl,--end-group \ 21*4882a593Smuzhiyun $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map 22*4882a593Smuzhiyun 23*4882a593Smuzhiyuncmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \ 24*4882a593Smuzhiyun -Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \ 25*4882a593Smuzhiyun $(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \ 26*4882a593Smuzhiyun $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections) 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunCONFIG_ARCH_DEVICE_TREE := sandbox 29