wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2000-2006 |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/config.mk |
| 9 | |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 10 | LIB = $(obj)lib$(CPU).o |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 11 | |
| 12 | START = start.o |
Ilya Yanok | c850069 | 2011-11-28 06:37:32 +0000 | [diff] [blame] | 13 | COBJS = cpu.o cache.o |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 14 | |
Marek Vasut | 654ac4c | 2011-10-24 00:14:23 +0000 | [diff] [blame] | 15 | ifdef CONFIG_SPL_BUILD |
| 16 | ifdef CONFIG_SPL_NO_CPU_SUPPORT_CODE |
| 17 | START := |
| 18 | endif |
| 19 | endif |
| 20 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 21 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) |
| 22 | OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) |
| 23 | START := $(addprefix $(obj),$(START)) |
| 24 | |
| 25 | all: $(obj).depend $(START) $(LIB) |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 26 | |
| 27 | $(LIB): $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 28 | $(call cmd_link_o_target, $(OBJS)) |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 29 | |
| 30 | ######################################################################### |
| 31 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 32 | # defines $(obj).depend target |
| 33 | include $(SRCTREE)/rules.mk |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 34 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 35 | sinclude $(obj).depend |
wdenk | 7eaacc5 | 2003-08-29 22:00:43 +0000 | [diff] [blame] | 36 | |
| 37 | ######################################################################### |