Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 1 | # |
Kim Phillips | 5d0c3b5 | 2010-05-28 08:00:14 +0000 | [diff] [blame] | 2 | # Copyright 2009-2010 Freescale Semiconductor, Inc. |
Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 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 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 11 | LIB = $(obj)lib8xxx.o |
Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 12 | |
Scott Wood | 4b91972 | 2012-09-20 16:35:21 -0500 | [diff] [blame] | 13 | MINIMAL= |
| 14 | |
| 15 | ifdef CONFIG_SPL_BUILD |
| 16 | ifdef CONFIG_SPL_INIT_MINIMAL |
| 17 | MINIMAL=y |
| 18 | endif |
| 19 | endif |
| 20 | |
| 21 | ifdef MINIMAL |
| 22 | |
| 23 | COBJS-$(CONFIG_FSL_LAW) += law.o |
| 24 | |
| 25 | else |
| 26 | |
Kim Phillips | 5d0c3b5 | 2010-05-28 08:00:14 +0000 | [diff] [blame] | 27 | ifneq ($(CPU),mpc83xx) |
Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 28 | COBJS-y += cpu.o |
Kim Phillips | 5d0c3b5 | 2010-05-28 08:00:14 +0000 | [diff] [blame] | 29 | endif |
| 30 | |
| 31 | COBJS-$(CONFIG_OF_LIBFDT) += fdt.o |
Dipen Dudhat | d789b5f | 2011-01-20 16:29:35 +0530 | [diff] [blame] | 32 | COBJS-$(CONFIG_FSL_IFC) += fsl_ifc.o |
Becky Bruce | f51cdaf | 2010-06-17 11:37:20 -0500 | [diff] [blame] | 33 | COBJS-$(CONFIG_FSL_LBC) += fsl_lbc.o |
Kumar Gala | a09b9b6 | 2010-12-30 12:09:53 -0600 | [diff] [blame] | 34 | COBJS-$(CONFIG_SYS_SRIO) += srio.o |
Scott Wood | 8bc50f0 | 2012-08-17 16:17:50 -0500 | [diff] [blame] | 35 | COBJS-$(CONFIG_FSL_LAW) += law.o |
Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 36 | |
Scott Wood | 4b91972 | 2012-09-20 16:35:21 -0500 | [diff] [blame] | 37 | endif |
| 38 | |
Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 39 | SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) |
| 40 | OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) |
| 41 | |
| 42 | all: $(obj).depend $(LIB) |
| 43 | |
| 44 | $(LIB): $(OBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 45 | $(call cmd_link_o_target, $(OBJS)) |
Poonam Aggrwal | 18bacc2 | 2009-07-31 12:07:45 +0530 | [diff] [blame] | 46 | |
| 47 | include $(SRCTREE)/rules.mk |
| 48 | |
| 49 | sinclude $(obj).depend |