blob: d38b4aa701fb9efc4f03fa7709f883d1c2c4d43b [file] [log] [blame]
wdenk3cae4c92002-07-07 16:05:51 +00001#
Marian Balakowiczf9328632006-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 Denk1a459662013-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 Carlier6d8962e2010-11-05 15:48:07 +010010LIB = $(obj)lib$(CPU).o
wdenk3cae4c92002-07-07 16:05:51 +000011
Stefan Roese9b94ac62007-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 Giger78d2a642009-10-04 20:04:21 +020020
Wolfgang Denka7186b82010-11-21 00:03:32 +010021ifndef CONFIG_NAND_SPL
22ifndef CONFIG_NAND_U_BOOT
Stefan Roese9b94ac62007-10-31 17:55:58 +010023COBJS += 44x_spd_ddr.o
Adam Grahamf6b6c452008-09-03 12:26:59 -070024endif
Wolfgang Denka7186b82010-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 Roese9b94ac62007-10-31 17:55:58 +010028COBJS += 4xx_pci.o
29COBJS += 4xx_pcie.o
Stefan Roese9b94ac62007-10-31 17:55:58 +010030COBJS += bedbug_405.o
Wolfgang Denka7186b82010-11-21 00:03:32 +010031COBJS-$(CONFIG_CMD_CHIP_CONFIG) += cmd_chip_config.o
Stefan Roese9b94ac62007-10-31 17:55:58 +010032COBJS += cpu.o
33COBJS += cpu_init.o
Larry Johnson8eb52d52007-12-22 15:16:11 -050034COBJS += denali_data_eye.o
35COBJS += denali_spd_ddr2.o
Grant Ericksonc821b5f2008-05-22 14:44:14 -070036COBJS += ecc.o
Wolfgang Denka7186b82010-11-21 00:03:32 +010037COBJS-$(CONFIG_CMD_ECCTEST) += cmd_ecctest.o
Stefan Roese9b94ac62007-10-31 17:55:58 +010038COBJS += fdt.o
Stefan Roese9b94ac62007-10-31 17:55:58 +010039COBJS += interrupts.o
Wolfgang Denka7186b82010-11-21 00:03:32 +010040COBJS-$(CONFIG_CMD_REGINFO) += reginfo.o
Stefan Roese9b94ac62007-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 Denka7186b82010-11-21 00:03:32 +010047COBJS-$(CONFIG_XILINX_440) += xilinx_irq.o
Ricardo Ribalda Delgadod865fd02008-07-17 11:44:12 +020048ifndef CONFIG_XILINX_440
Ricardo Ribalda Delgadod865fd02008-07-17 11:44:12 +020049COBJS += 4xx_uart.o
50COBJS += gpio.o
51COBJS += miiphy.o
52COBJS += uic.o
Ricardo Ribalda Delgadod865fd02008-07-17 11:44:12 +020053endif
wdenkba56f622004-02-06 23:19:44 +000054
Stefan Roese98f99e92013-04-02 10:37:04 +020055ifdef CONFIG_SPL_BUILD
56COBJS-y += spl_boot.o
57endif
58
Marian Balakowiczf9328632006-09-01 19:49:50 +020059SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
Wolfgang Denka7186b82010-11-21 00:03:32 +010060OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS-y))
Marian Balakowiczf9328632006-09-01 19:49:50 +020061START := $(addprefix $(obj),$(START))
wdenk3cae4c92002-07-07 16:05:51 +000062
Marian Balakowiczf9328632006-09-01 19:49:50 +020063all: $(obj).depend $(START) $(LIB)
wdenk3cae4c92002-07-07 16:05:51 +000064
65$(LIB): $(OBJS)
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010066 $(call cmd_link_o_target, $(OBJS))
wdenk3cae4c92002-07-07 16:05:51 +000067
68#########################################################################
69
Marian Balakowiczf9328632006-09-01 19:49:50 +020070# defines $(obj).depend target
71include $(SRCTREE)/rules.mk
wdenk3cae4c92002-07-07 16:05:51 +000072
Marian Balakowiczf9328632006-09-01 19:49:50 +020073sinclude $(obj).depend
wdenk3cae4c92002-07-07 16:05:51 +000074
75#########################################################################