wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2003-2006 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/config.mk |
| 9 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 10 | LIB = $(obj)lib$(CPU).o |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 11 | |
Wolfgang Denk | 085ecde | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 12 | SSTART = start.o |
| 13 | CSTART = traps.o |
| 14 | SOBJS += io.o |
| 15 | SOBJS += firmware_sc_task_bestcomm.impl.o |
| 16 | COBJS-y += i2c.o |
| 17 | COBJS-y += cpu.o |
| 18 | COBJS-y += cpu_init.o |
| 19 | COBJS-y += ide.o |
| 20 | COBJS-y += interrupts.o |
| 21 | COBJS-y += loadtask.o |
| 22 | COBJS-y += pci_mpc5200.o |
| 23 | COBJS-y += serial.o |
| 24 | COBJS-y += speed.o |
| 25 | COBJS-$(CONFIG_CMD_USB) += usb_ohci.o |
| 26 | COBJS-$(CONFIG_CMD_USB) += usb.o |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 27 | |
Stefan Roese | 083f2e0 | 2012-08-16 17:53:18 +0200 | [diff] [blame] | 28 | ifdef CONFIG_SPL_BUILD |
| 29 | COBJS-y += spl_boot.o |
| 30 | endif |
| 31 | |
Wolfgang Denk | 085ecde | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 32 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c) |
| 33 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) |
| 34 | START := $(addprefix $(obj),$(SSTART) $(CSTART)) |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 35 | |
| 36 | all: $(obj).depend $(START) $(LIB) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 37 | |
| 38 | $(LIB): $(OBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 39 | $(call cmd_link_o_target, $(OBJS)) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 40 | |
| 41 | ######################################################################### |
| 42 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 43 | # defines $(obj).depend target |
| 44 | include $(SRCTREE)/rules.mk |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 45 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 46 | sinclude $(obj).depend |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 47 | |
| 48 | ######################################################################### |