wdenk | 3cae4c9 | 2002-07-07 16:05:51 +0000 | [diff] [blame] | 1 | # |
Marian Balakowicz | f932863 | 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 | 1a45966 | 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 | 6d8962e | 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 | 9b94ac6 | 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 | 78d2a64 | 2009-10-04 20:04:21 +0200 | [diff] [blame] | 20 | |
Wolfgang Denk | a7186b8 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 21 | ifndef CONFIG_NAND_SPL |
| 22 | ifndef CONFIG_NAND_U_BOOT |
Stefan Roese | 9b94ac6 | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 23 | COBJS += 44x_spd_ddr.o |
Adam Graham | f6b6c45 | 2008-09-03 12:26:59 -0700 | [diff] [blame] | 24 | endif |
Wolfgang Denk | a7186b8 | 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 | 9b94ac6 | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 28 | COBJS += 4xx_pci.o |
| 29 | COBJS += 4xx_pcie.o |
Stefan Roese | 9b94ac6 | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 30 | COBJS += bedbug_405.o |
Wolfgang Denk | a7186b8 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 31 | COBJS-$(CONFIG_CMD_CHIP_CONFIG) += cmd_chip_config.o |
Stefan Roese | 9b94ac6 | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 32 | COBJS += cpu.o |
| 33 | COBJS += cpu_init.o |
Larry Johnson | 8eb52d5 | 2007-12-22 15:16:11 -0500 | [diff] [blame] | 34 | COBJS += denali_data_eye.o |
| 35 | COBJS += denali_spd_ddr2.o |
Grant Erickson | c821b5f | 2008-05-22 14:44:14 -0700 | [diff] [blame] | 36 | COBJS += ecc.o |
Wolfgang Denk | a7186b8 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 37 | COBJS-$(CONFIG_CMD_ECCTEST) += cmd_ecctest.o |
Stefan Roese | 9b94ac6 | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 38 | COBJS += fdt.o |
Stefan Roese | 9b94ac6 | 2007-10-31 17:55:58 +0100 | [diff] [blame] | 39 | COBJS += interrupts.o |
Wolfgang Denk | a7186b8 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 40 | COBJS-$(CONFIG_CMD_REGINFO) += reginfo.o |
Stefan Roese | 9b94ac6 | 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 | a7186b8 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 47 | COBJS-$(CONFIG_XILINX_440) += xilinx_irq.o |
Ricardo Ribalda Delgado | d865fd0 | 2008-07-17 11:44:12 +0200 | [diff] [blame] | 48 | ifndef CONFIG_XILINX_440 |
Ricardo Ribalda Delgado | d865fd0 | 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 | d865fd0 | 2008-07-17 11:44:12 +0200 | [diff] [blame] | 53 | endif |
wdenk | ba56f62 | 2004-02-06 23:19:44 +0000 | [diff] [blame] | 54 | |
Stefan Roese | 98f99e9 | 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 | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 59 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) |
Wolfgang Denk | a7186b8 | 2010-11-21 00:03:32 +0100 | [diff] [blame] | 60 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS-y)) |
Marian Balakowicz | f932863 | 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 | f932863 | 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 | 6d8962e | 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 | f932863 | 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 | f932863 | 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 | ######################################################################### |