Wolfgang Denk | 6470255 | 2006-10-24 14:27:35 +0200 | [diff] [blame] | 1 | # |
| 2 | # (C) Copyright 2000-2006 |
| 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
| 5 | # Copyright (C) 2005-2006 Atmel Corporation. |
| 6 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | # SPDX-License-Identifier: GPL-2.0+ |
Wolfgang Denk | 6470255 | 2006-10-24 14:27:35 +0200 | [diff] [blame] | 8 | # |
| 9 | |
| 10 | include $(TOPDIR)/config.mk |
| 11 | |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 12 | LIB := $(obj)lib$(CPU).o |
Wolfgang Denk | 6470255 | 2006-10-24 14:27:35 +0200 | [diff] [blame] | 13 | |
Haavard Skinnemoen | 250ff09 | 2008-04-30 16:15:57 +0200 | [diff] [blame] | 14 | START-y += start.o |
| 15 | |
Haavard Skinnemoen | 250ff09 | 2008-04-30 16:15:57 +0200 | [diff] [blame] | 16 | COBJS-y += cpu.o |
Jean-Christophe PLAGNIOL-VILLARD | 04f3869 | 2009-06-06 10:30:58 +0000 | [diff] [blame] | 17 | COBJS-$(CONFIG_SYS_HSDRAMC) += hsdramc.o |
Haavard Skinnemoen | 250ff09 | 2008-04-30 16:15:57 +0200 | [diff] [blame] | 18 | COBJS-y += exception.o |
| 19 | COBJS-y += cache.o |
| 20 | COBJS-y += interrupts.o |
Haavard Skinnemoen | 610b362 | 2008-08-29 21:09:49 +0200 | [diff] [blame] | 21 | COBJS-$(CONFIG_PORTMUX_PIO) += portmux-pio.o |
Haavard Skinnemoen | fd077f2 | 2008-09-01 14:00:07 +0200 | [diff] [blame] | 22 | COBJS-$(CONFIG_PORTMUX_GPIO) += portmux-gpio.o |
Haavard Skinnemoen | 250ff09 | 2008-04-30 16:15:57 +0200 | [diff] [blame] | 23 | |
| 24 | SRCS := $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) |
| 25 | OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) |
| 26 | START := $(addprefix $(obj),$(START-y)) |
Wolfgang Denk | 6470255 | 2006-10-24 14:27:35 +0200 | [diff] [blame] | 27 | |
| 28 | all: $(obj).depend $(START) $(LIB) |
| 29 | |
| 30 | $(LIB): $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 31 | $(call cmd_link_o_target, $^) |
Wolfgang Denk | 6470255 | 2006-10-24 14:27:35 +0200 | [diff] [blame] | 32 | |
| 33 | ######################################################################### |
| 34 | |
| 35 | # defines $(obj).depend target |
| 36 | include $(SRCTREE)/rules.mk |
| 37 | |
| 38 | sinclude $(obj).depend |
| 39 | |
| 40 | ######################################################################### |