blob: 3dc8e055b68ba905bdddb0fecc08478a82ca6ff8 [file] [log] [blame]
Poonam Aggrwal18bacc22009-07-31 12:07:45 +05301#
Kim Phillips5d0c3b52010-05-28 08:00:14 +00002# Copyright 2009-2010 Freescale Semiconductor, Inc.
Poonam Aggrwal18bacc22009-07-31 12:07:45 +05303#
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 Carlier6d8962e2010-11-05 15:48:07 +010011LIB = $(obj)lib8xxx.o
Poonam Aggrwal18bacc22009-07-31 12:07:45 +053012
Scott Wood4b919722012-09-20 16:35:21 -050013MINIMAL=
14
15ifdef CONFIG_SPL_BUILD
16ifdef CONFIG_SPL_INIT_MINIMAL
17MINIMAL=y
18endif
19endif
20
21ifdef MINIMAL
22
23COBJS-$(CONFIG_FSL_LAW) += law.o
24
25else
26
Kim Phillips5d0c3b52010-05-28 08:00:14 +000027ifneq ($(CPU),mpc83xx)
Poonam Aggrwal18bacc22009-07-31 12:07:45 +053028COBJS-y += cpu.o
Kim Phillips5d0c3b52010-05-28 08:00:14 +000029endif
30
31COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
Dipen Dudhatd789b5f2011-01-20 16:29:35 +053032COBJS-$(CONFIG_FSL_IFC) += fsl_ifc.o
Becky Brucef51cdaf2010-06-17 11:37:20 -050033COBJS-$(CONFIG_FSL_LBC) += fsl_lbc.o
Kumar Galaa09b9b62010-12-30 12:09:53 -060034COBJS-$(CONFIG_SYS_SRIO) += srio.o
Scott Wood8bc50f02012-08-17 16:17:50 -050035COBJS-$(CONFIG_FSL_LAW) += law.o
Poonam Aggrwal18bacc22009-07-31 12:07:45 +053036
Scott Wood4b919722012-09-20 16:35:21 -050037endif
38
Poonam Aggrwal18bacc22009-07-31 12:07:45 +053039SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
40OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
41
42all: $(obj).depend $(LIB)
43
44$(LIB): $(OBJS)
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010045 $(call cmd_link_o_target, $(OBJS))
Poonam Aggrwal18bacc22009-07-31 12:07:45 +053046
47include $(SRCTREE)/rules.mk
48
49sinclude $(obj).depend