blob: d38b4aa701fb9efc4f03fa7709f883d1c2c4d43b [file] [log] [blame]
wdenk3cae4c92002-07-07 16:05:51 +00001#
Marian Balakowiczd62379d2006-09-01 19:49:50 +02002# (C) Copyright 2000-2006
wdenk3cae4c92002-07-07 16:05:51 +00003# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk3cae4c92002-07-07 16:05:51 +00006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carliera8d426f2010-11-05 15:48:07 +010010LIB = $(obj)lib$(CPU).o
wdenk3cae4c92002-07-07 16:05:51 +000011
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010012START := resetvec.o
13START += start.o
14
15SOBJS := cache.o
16SOBJS += dcr.o
17SOBJS += kgdb.o
18
19COBJS := 40x_spd_sdram.o
Niklaus Gigerd4c61542009-10-04 20:04:21 +020020
Wolfgang Denk306d8012010-11-21 00:03:32 +010021ifndef CONFIG_NAND_SPL
22ifndef CONFIG_NAND_U_BOOT
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010023COBJS += 44x_spd_ddr.o
Adam Graham97a55812008-09-03 12:26:59 -070024endif
Wolfgang Denk306d8012010-11-21 00:03:32 +010025endif
26COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
27COBJS-$(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) += 4xx_ibm_ddr2_autocalib.o
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010028COBJS += 4xx_pci.o
29COBJS += 4xx_pcie.o
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010030COBJS += bedbug_405.o
Wolfgang Denk306d8012010-11-21 00:03:32 +010031COBJS-$(CONFIG_CMD_CHIP_CONFIG) += cmd_chip_config.o
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010032COBJS += cpu.o
33COBJS += cpu_init.o
Larry Johnson631bf112007-12-22 15:16:11 -050034COBJS += denali_data_eye.o
35COBJS += denali_spd_ddr2.o
Grant Ericksonb6933412008-05-22 14:44:14 -070036COBJS += ecc.o
Wolfgang Denk306d8012010-11-21 00:03:32 +010037COBJS-$(CONFIG_CMD_ECCTEST) += cmd_ecctest.o
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010038COBJS += fdt.o
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010039COBJS += interrupts.o
Wolfgang Denk306d8012010-11-21 00:03:32 +010040COBJS-$(CONFIG_CMD_REGINFO) += reginfo.o
Stefan Roeseeff3a0a2007-10-31 17:55:58 +010041COBJS += sdram.o
42COBJS += speed.o
43COBJS += tlb.o
44COBJS += traps.o
45COBJS += usb.o
46COBJS += usb_ohci.o
Wolfgang Denk306d8012010-11-21 00:03:32 +010047COBJS-$(CONFIG_XILINX_440) += xilinx_irq.o
Ricardo Ribalda Delgado95c50202008-07-17 11:44:12 +020048ifndef CONFIG_XILINX_440
Ricardo Ribalda Delgado95c50202008-07-17 11:44:12 +020049COBJS += 4xx_uart.o
50COBJS += gpio.o
51COBJS += miiphy.o
52COBJS += uic.o
Ricardo Ribalda Delgado95c50202008-07-17 11:44:12 +020053endif
wdenk544e9732004-02-06 23:19:44 +000054
Stefan Roese07038ad2013-04-02 10:37:04 +020055ifdef CONFIG_SPL_BUILD
56COBJS-y += spl_boot.o
57endif
58
Marian Balakowiczd62379d2006-09-01 19:49:50 +020059SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
Wolfgang Denk306d8012010-11-21 00:03:32 +010060OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS-y))
Marian Balakowiczd62379d2006-09-01 19:49:50 +020061START := $(addprefix $(obj),$(START))
wdenk3cae4c92002-07-07 16:05:51 +000062
Marian Balakowiczd62379d2006-09-01 19:49:50 +020063all: $(obj).depend $(START) $(LIB)
wdenk3cae4c92002-07-07 16:05:51 +000064
65$(LIB): $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010066 $(call cmd_link_o_target, $(OBJS))
wdenk3cae4c92002-07-07 16:05:51 +000067
68#########################################################################
69
Marian Balakowiczd62379d2006-09-01 19:49:50 +020070# defines $(obj).depend target
71include $(SRCTREE)/rules.mk
wdenk3cae4c92002-07-07 16:05:51 +000072
Marian Balakowiczd62379d2006-09-01 19:49:50 +020073sinclude $(obj).depend
wdenk3cae4c92002-07-07 16:05:51 +000074
75#########################################################################