d1b4c4b470461b3ebb400b9d7abccb81e5881e9a
[kernel/u-boot.git] / arch / powerpc / cpu / mpc8xxx / ddr / Makefile
1 #
2 # Copyright 2008 Freescale Semiconductor, Inc.
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # Version 2 as published by the Free Software Foundation.
7 #
8
9 include $(TOPDIR)/config.mk
10
11 LIB     = $(obj)libddr.o
12
13 COBJS-$(CONFIG_FSL_DDR1)        += main.o util.o ctrl_regs.o options.o \
14                                    lc_common_dimm_params.o
15
16 COBJS-$(CONFIG_FSL_DDR2)        += main.o util.o ctrl_regs.o options.o \
17                                    lc_common_dimm_params.o
18
19 COBJS-$(CONFIG_FSL_DDR3)        += main.o util.o ctrl_regs.o options.o \
20                                    lc_common_dimm_params.o
21 ifdef CONFIG_DDR_SPD
22 SPD := y
23 endif
24 ifdef CONFIG_SPD_EEPROM
25 SPD := y
26 endif
27 ifdef SPD
28 COBJS-$(CONFIG_FSL_DDR1)        += ddr1_dimm_params.o
29 COBJS-$(CONFIG_FSL_DDR2)        += ddr2_dimm_params.o
30 COBJS-$(CONFIG_FSL_DDR3)        += ddr3_dimm_params.o
31 endif
32
33
34 SRCS    := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
35 OBJS    := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
36
37 all:    $(obj).depend $(LIB)
38
39 $(LIB): $(OBJS)
40         $(call cmd_link_o_target, $(OBJS))
41
42 include $(SRCTREE)/rules.mk
43
44 sinclude $(obj).depend