Merge branch 'master' of git://git.denx.de/u-boot-blackfin
[platform/kernel/u-boot.git] / cpu / ppc4xx / Makefile
index 7d6990f..88d53fb 100644 (file)
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 
 include $(TOPDIR)/config.mk
 
-LIB    = lib$(CPU).a
+LIB    = $(obj)lib$(CPU).a
 
-START  = start.o resetvec.o kgdb.o
-AOBJS  = dcr.o
-COBJS  = 405gp_pci.o 4xx_enet.o \
-         bedbug_405.o commproc.o \
-         cpu.o cpu_init.o i2c.o interrupts.o \
-         miiphy.o sdram.o serial.o \
-         spd_sdram.o speed.o traps.o usb_ohci.o usbdev.o \
-         440spe_pcie.o
+START  := resetvec.o
+START  += start.o
 
-OBJS   = $(AOBJS) $(COBJS)
+SOBJS  := cache.o
+SOBJS  += dcr.o
+SOBJS  += kgdb.o
 
-all:   .depend $(START) $(LIB)
+COBJS  := 40x_spd_sdram.o
+
+COBJS  += 44x_spd_ddr.o
+COBJS  += 44x_spd_ddr2.o
+ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION
+COBJS  += 4xx_ibm_ddr2_autocalib.o
+endif
+COBJS  += 4xx_pci.o
+COBJS  += 4xx_pcie.o
+COBJS  += bedbug_405.o
+ifdef CONFIG_CMD_CHIP_CONFIG
+COBJS  += cmd_chip_config.o
+endif
+COBJS  += commproc.o
+COBJS  += cpu.o
+COBJS  += cpu_init.o
+COBJS  += denali_data_eye.o
+COBJS  += denali_spd_ddr2.o
+COBJS  += ecc.o
+COBJS  += fdt.o
+COBJS  += interrupts.o
+COBJS  += iop480_uart.o
+ifdef CONFIG_CMD_REGINFO
+COBJS  += reginfo.o
+endif
+COBJS  += sdram.o
+COBJS  += speed.o
+COBJS  += tlb.o
+COBJS  += traps.o
+COBJS  += usb.o
+COBJS  += usb_ohci.o
+COBJS  += usbdev.o
+ifndef CONFIG_XILINX_440
+COBJS  += 4xx_uart.o
+COBJS  += gpio.o
+COBJS  += miiphy.o
+COBJS  += uic.o
+else
+COBJS  += xilinx_irq.o
+endif
+
+SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+START  := $(addprefix $(obj),$(START))
+
+all:   $(obj).depend $(START) $(LIB)
 
 $(LIB):        $(OBJS)
-       $(AR) crv $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
 
 #########################################################################
 
-.depend:       Makefile $(START:.o=.S) $(AOBJS:.o=.S) $(COBJS:.o=.c)
-               $(CC) -M $(CFLAGS) $(START:.o=.S) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
 
-sinclude .depend
+sinclude $(obj).depend
 
 #########################################################################