blob: d1b4c4b470461b3ebb400b9d7abccb81e5881e9a [file] [log] [blame]
Kumar Gala124b0822008-08-26 15:01:29 -05001#
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
9include $(TOPDIR)/config.mk
10
Sebastien Carliera8d426f2010-11-05 15:48:07 +010011LIB = $(obj)libddr.o
Kumar Gala124b0822008-08-26 15:01:29 -050012
13COBJS-$(CONFIG_FSL_DDR1) += main.o util.o ctrl_regs.o options.o \
14 lc_common_dimm_params.o
Kumar Gala124b0822008-08-26 15:01:29 -050015
16COBJS-$(CONFIG_FSL_DDR2) += main.o util.o ctrl_regs.o options.o \
17 lc_common_dimm_params.o
Kumar Gala124b0822008-08-26 15:01:29 -050018
Dave Liu4be87b22009-03-14 12:48:30 +080019COBJS-$(CONFIG_FSL_DDR3) += main.o util.o ctrl_regs.o options.o \
20 lc_common_dimm_params.o
York Sune73cc042011-06-07 09:42:16 +080021ifdef CONFIG_DDR_SPD
22SPD := y
23endif
24ifdef CONFIG_SPD_EEPROM
25SPD := y
26endif
27ifdef SPD
28COBJS-$(CONFIG_FSL_DDR1) += ddr1_dimm_params.o
29COBJS-$(CONFIG_FSL_DDR2) += ddr2_dimm_params.o
Dave Liu4be87b22009-03-14 12:48:30 +080030COBJS-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o
York Sune73cc042011-06-07 09:42:16 +080031endif
32
Dave Liu4be87b22009-03-14 12:48:30 +080033
Kumar Gala124b0822008-08-26 15:01:29 -050034SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
35OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
36
37all: $(obj).depend $(LIB)
38
39$(LIB): $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010040 $(call cmd_link_o_target, $(OBJS))
Kumar Gala124b0822008-08-26 15:01:29 -050041
42include $(SRCTREE)/rules.mk
43
44sinclude $(obj).depend