wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 2 | # (C) Copyright 2000-2006 |
wdenk | 3cae4c9 | 2002-07-07 16:05:51 +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 | 3cae4c9 | 2002-07-07 16:05:51 +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 | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 11 | |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 12 | START := resetvec.o |
| 13 | START += start.o |
| 14 | |
| 15 | SOBJS := cache.o |
| 16 | SOBJS += dcr.o |
| 17 | SOBJS += kgdb.o |
| 18 | |
| 19 | COBJS := 40x_spd_sdram.o |
Niklaus Giger | d4c6154 | 2009-10-04 20:04:21 +0200 | [diff] [blame] | 20 | |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 21 | ifndef CONFIG_NAND_SPL |
| 22 | ifndef CONFIG_NAND_U_BOOT |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 23 | COBJS += 44x_spd_ddr.o |
Adam Graham | 97a5581 | 2008-09-03 12:26:59 -0700 | [diff] [blame] | 24 | endif |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 25 | endif |
| 26 | COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o |
| 27 | COBJS-$(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) += 4xx_ibm_ddr2_autocalib.o |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 28 | COBJS += 4xx_pci.o |
| 29 | COBJS += 4xx_pcie.o |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 30 | COBJS += bedbug_405.o |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 31 | COBJS-$(CONFIG_CMD_CHIP_CONFIG) += cmd_chip_config.o |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 32 | COBJS += cpu.o |
| 33 | COBJS += cpu_init.o |
Larry Johnson | 631bf11 | 2007-12-22 15:16:11 -0500 | [diff] [blame] | 34 | COBJS += denali_data_eye.o |
| 35 | COBJS += denali_spd_ddr2.o |
Grant Erickson | b693341 | 2008-05-22 14:44:14 -0700 | [diff] [blame] | 36 | COBJS += ecc.o |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 37 | COBJS-$(CONFIG_CMD_ECCTEST) += cmd_ecctest.o |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 38 | COBJS += fdt.o |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 39 | COBJS += interrupts.o |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 40 | COBJS-$(CONFIG_CMD_REGINFO) += reginfo.o |
Stefan Roese | eff3a0a | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 41 | COBJS += sdram.o |
| 42 | COBJS += speed.o |
| 43 | COBJS += tlb.o |
| 44 | COBJS += traps.o |
| 45 | COBJS += usb.o |
| 46 | COBJS += usb_ohci.o |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 47 | COBJS-$(CONFIG_XILINX_440) += xilinx_irq.o |
Ricardo Ribalda Delgado | 95c5020 | 2008-07-17 11:44:12 +0200 | [diff] [blame] | 48 | ifndef CONFIG_XILINX_440 |
Ricardo Ribalda Delgado | 95c5020 | 2008-07-17 11:44:12 +0200 | [diff] [blame] | 49 | COBJS += 4xx_uart.o |
| 50 | COBJS += gpio.o |
| 51 | COBJS += miiphy.o |
| 52 | COBJS += uic.o |
Ricardo Ribalda Delgado | 95c5020 | 2008-07-17 11:44:12 +0200 | [diff] [blame] | 53 | endif |
wdenk | 544e973 | 2004-02-06 23:19:44 +0000 | [diff] [blame] | 54 | |
Stefan Roese | 07038ad | 2013-04-02 10:37:04 +0200 | [diff] [blame] | 55 | ifdef CONFIG_SPL_BUILD |
| 56 | COBJS-y += spl_boot.o |
| 57 | endif |
| 58 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 59 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) |
Wolfgang Denk | 306d801 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 60 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS-y)) |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 61 | START := $(addprefix $(obj),$(START)) |
wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 62 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 63 | all: $(obj).depend $(START) $(LIB) |
wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 64 | |
| 65 | $(LIB): $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 66 | $(call cmd_link_o_target, $(OBJS)) |
wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 67 | |
| 68 | ######################################################################### |
| 69 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 70 | # defines $(obj).depend target |
| 71 | include $(SRCTREE)/rules.mk |
wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 72 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 73 | sinclude $(obj).depend |
wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 74 | |
| 75 | ######################################################################### |