Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2011 The Chromium OS Authors. |
| 3 | # |
| 4 | # (C) Copyright 2000-2003 |
| 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 6 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | # SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 8 | # |
| 9 | |
| 10 | include $(TOPDIR)/config.mk |
| 11 | |
| 12 | LIB = $(obj)lib$(CPU).o |
| 13 | |
Simon Glass | 6fb6207 | 2012-02-15 15:51:15 -0800 | [diff] [blame] | 14 | COBJS := cpu.o os.o start.o state.o |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 15 | |
| 16 | SRCS := $(COBJS:.o=.c) |
| 17 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 18 | |
| 19 | all: $(obj).depend $(LIB) |
| 20 | |
| 21 | $(LIB): $(OBJS) |
| 22 | $(call cmd_link_o_target, $(OBJS)) |
| 23 | |
Andreas Bießmann | f8d2c65 | 2011-12-02 11:53:13 +0100 | [diff] [blame] | 24 | # os.c is build in the system environment, so needs standard includes |
| 25 | $(obj)os.o: ALL_CFLAGS := $(filter-out -nostdinc,$(ALL_CFLAGS)) |
| 26 | $(obj).depend.os: CPPFLAGS := $(filter-out -nostdinc,$(CPPFLAGS)) |
| 27 | |
Simon Glass | 4b0730d | 2011-09-26 14:10:39 +0000 | [diff] [blame] | 28 | ######################################################################### |
| 29 | |
| 30 | # defines $(obj).depend target |
| 31 | include $(SRCTREE)/rules.mk |
| 32 | |
| 33 | sinclude $(obj).depend |
| 34 | |
| 35 | ######################################################################### |