blob: 788598ec7838698e5f1ceb464c6fafbac67b8f67 [file] [log] [blame]
wdenkbd1575f2003-10-14 19:43:55 +00001#
Marian Balakowiczd62379d2006-09-01 19:49:50 +02002# (C) Copyright 2000-2006
wdenkbd1575f2003-10-14 19:43:55 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenkbd1575f2003-10-14 19:43:55 +00006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carliera8d426f2010-11-05 15:48:07 +010010LIB = $(obj)lib$(CPU).o
wdenkbd1575f2003-10-14 19:43:55 +000011
12START = start.o
Jean-Christophe PLAGNIOL-VILLARD8c9fc002009-05-15 23:47:02 +020013
Jean-Christophe PLAGNIOL-VILLARDb0c09072009-01-31 08:53:44 +010014COBJS-y += cpu.o
Jean-Christophe PLAGNIOL-VILLARD8c9fc002009-05-15 23:47:02 +020015COBJS-$(CONFIG_USE_IRQ) += interrupts.o
Jean-Christophe PLAGNIOL-VILLARDb0c09072009-01-31 08:53:44 +010016COBJS-y += timer.o
wdenkbd1575f2003-10-14 19:43:55 +000017
Jean-Christophe PLAGNIOL-VILLARDb0c09072009-01-31 08:53:44 +010018SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
19OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
Marian Balakowiczd62379d2006-09-01 19:49:50 +020020START := $(addprefix $(obj),$(START))
21
22all: $(obj).depend $(START) $(LIB)
wdenkbd1575f2003-10-14 19:43:55 +000023
24$(LIB): $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010025 $(call cmd_link_o_target, $(OBJS))
wdenkbd1575f2003-10-14 19:43:55 +000026
27#########################################################################
28
Marian Balakowiczd62379d2006-09-01 19:49:50 +020029# defines $(obj).depend target
30include $(SRCTREE)/rules.mk
wdenkbd1575f2003-10-14 19:43:55 +000031
Marian Balakowiczd62379d2006-09-01 19:49:50 +020032sinclude $(obj).depend
wdenkbd1575f2003-10-14 19:43:55 +000033
34#########################################################################