blob: 038ad78accc558bed83bf206699a9ae8cdfb4d60 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Simon Glass3d750d72011-09-26 14:10:39 +00002#
3# Copyright (c) 2011 The Chromium OS Authors.
4#
5# (C) Copyright 2000-2003
6# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Simon Glass3d750d72011-09-26 14:10:39 +00007
Jerome Forissier690b7e62025-04-18 16:09:32 +02008obj-y := cache.o cpu.o state.o initjmp.o
Simon Glass66cf8f72018-11-23 21:29:30 -07009extra-y := start.o os.o
Heinrich Schuchardt881b90f2022-01-28 10:08:32 +010010extra-$(CONFIG_SANDBOX_SDL) += sdl.o
Simon Glass85ed77d2024-09-29 19:49:46 -060011obj-$(CONFIG_XPL_BUILD) += spl.o
Joe Hershberger586cbd12015-03-22 17:09:21 -050012obj-$(CONFIG_ETH_SANDBOX_RAW) += eth-raw-os.o
Simon Glass3d750d72011-09-26 14:10:39 +000013
Andreas Bießmann2f935ce2011-12-02 11:53:13 +010014# os.c is build in the system environment, so needs standard includes
Masahiro Yamada0d68fb12014-02-04 17:24:28 +090015# CFLAGS_REMOVE_os.o cannot be used to drop header include path
16quiet_cmd_cc_os.o = CC $(quiet_modtag) $@
17cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \
18 $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
19
20$(obj)/os.o: $(src)/os.c FORCE
21 $(call if_changed_dep,cc_os.o)
Joe Hershberger586cbd12015-03-22 17:09:21 -050022
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
25quiet_cmd_cc_eth-raw-os.o = CC $(quiet_modtag) $@
26cmd_cc_eth-raw-os.o = $(CC) $(filter-out -nostdinc, \
27 $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
28
29$(obj)/eth-raw-os.o: $(src)/eth-raw-os.c FORCE
30 $(call if_changed_dep,cc_eth-raw-os.o)
Heinrich Schuchardt881b90f2022-01-28 10:08:32 +010031
Jerome Forissier690b7e62025-04-18 16:09:32 +020032# initjmp.c is build in the system environment, so needs standard includes
33# CFLAGS_REMOVE_initjmp.o cannot be used to drop header include path
34quiet_cmd_cc_initjmp.o = CC $(quiet_modtag) $@
35cmd_cc_initjmp.o = $(CC) $(filter-out -nostdinc, \
36 $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
37
38$(obj)/initjmp.o: $(src)/initjmp.c FORCE
39 $(call if_changed_dep,cc_initjmp.o)
40
Heinrich Schuchardt881b90f2022-01-28 10:08:32 +010041# sdl.c fails to build with -fshort-wchar using musl
42cmd_cc_sdl.o = $(CC) $(filter-out -nostdinc -fshort-wchar, \
43 $(patsubst -I%,-idirafter%,$(c_flags))) -fno-lto -c -o $@ $<
44
45$(obj)/sdl.o: $(src)/sdl.c FORCE
46 $(call if_changed_dep,cc_sdl.o)