wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2000-2006 |
wdenk | bd1575f | 2003-10-14 19:43:55 +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 | bd1575f | 2003-10-14 19:43:55 +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 | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 11 | |
| 12 | START = start.o |
Jean-Christophe PLAGNIOL-VILLARD | 8c9fc00 | 2009-05-15 23:47:02 +0200 | [diff] [blame] | 13 | |
Jean-Christophe PLAGNIOL-VILLARD | b0c0907 | 2009-01-31 08:53:44 +0100 | [diff] [blame] | 14 | COBJS-y += cpu.o |
Jean-Christophe PLAGNIOL-VILLARD | 8c9fc00 | 2009-05-15 23:47:02 +0200 | [diff] [blame] | 15 | COBJS-$(CONFIG_USE_IRQ) += interrupts.o |
Jean-Christophe PLAGNIOL-VILLARD | b0c0907 | 2009-01-31 08:53:44 +0100 | [diff] [blame] | 16 | COBJS-y += timer.o |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 17 | |
Jean-Christophe PLAGNIOL-VILLARD | b0c0907 | 2009-01-31 08:53:44 +0100 | [diff] [blame] | 18 | SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) |
| 19 | OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 20 | START := $(addprefix $(obj),$(START)) |
| 21 | |
| 22 | all: $(obj).depend $(START) $(LIB) |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 23 | |
| 24 | $(LIB): $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 25 | $(call cmd_link_o_target, $(OBJS)) |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 26 | |
| 27 | ######################################################################### |
| 28 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 29 | # defines $(obj).depend target |
| 30 | include $(SRCTREE)/rules.mk |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 31 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 32 | sinclude $(obj).depend |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 33 | |
| 34 | ######################################################################### |