1 # SPDX-License-Identifier: GPL-2.0+
3 # Copyright (c) 2011 The Chromium OS Authors.
5 # (C) Copyright 2000-2003
6 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8 obj-y := cache.o cpu.o state.o
9 extra-y := start.o os.o
10 extra-$(CONFIG_SANDBOX_SDL) += sdl.o
11 obj-$(CONFIG_SPL_BUILD) += spl.o
12 obj-$(CONFIG_ETH_SANDBOX_RAW) += eth-raw-os.o
14 # os.c is build in the system environment, so needs standard includes
15 # CFLAGS_REMOVE_os.o cannot be used to drop header include path
16 quiet_cmd_cc_os.o = CC $(quiet_modtag) $@
17 cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \
18 $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
20 $(obj)/os.o: $(src)/os.c FORCE
21 $(call if_changed_dep,cc_os.o)
23 # eth-raw-os.c is built in the system env, so needs standard includes
24 # CFLAGS_REMOVE_eth-raw-os.o cannot be used to drop header include path
25 quiet_cmd_cc_eth-raw-os.o = CC $(quiet_modtag) $@
26 cmd_cc_eth-raw-os.o = $(CC) $(filter-out -nostdinc, \
27 $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
29 $(obj)/eth-raw-os.o: $(src)/eth-raw-os.c FORCE
30 $(call if_changed_dep,cc_eth-raw-os.o)
32 # sdl.c fails to build with -fshort-wchar using musl
33 cmd_cc_sdl.o = $(CC) $(filter-out -nostdinc -fshort-wchar, \
34 $(patsubst -I%,-idirafter%,$(c_flags))) -fno-lto -c -o $@ $<
36 $(obj)/sdl.o: $(src)/sdl.c FORCE
37 $(call if_changed_dep,cc_sdl.o)