xref: /openbmc/u-boot/board/freescale/common/Makefile (revision 1a459660)
17608d75fSKim Phillips#
27608d75fSKim Phillips# (C) Copyright 2006
37608d75fSKim Phillips# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
47608d75fSKim Phillips#
5*1a459660SWolfgang Denk# SPDX-License-Identifier:	GPL-2.0+
67608d75fSKim Phillips#
77608d75fSKim Phillips
87608d75fSKim Phillipsinclude $(TOPDIR)/config.mk
97608d75fSKim Phillips
107608d75fSKim Phillipsifneq ($(OBJTREE),$(SRCTREE))
11566d49a3SWolfgang Denk$(shell mkdir -p $(obj)board/freescale/common)
127608d75fSKim Phillipsendif
137608d75fSKim Phillips
14566d49a3SWolfgang DenkLIB	= $(obj)libfreescale.o
157608d75fSKim Phillips
163a88179dSPrabhakar KushwahaMINIMAL=
173a88179dSPrabhakar Kushwaha
183a88179dSPrabhakar Kushwahaifdef CONFIG_SPL_BUILD
193a88179dSPrabhakar Kushwahaifdef CONFIG_SPL_INIT_MINIMAL
203a88179dSPrabhakar KushwahaMINIMAL=y
213a88179dSPrabhakar Kushwahaendif
223a88179dSPrabhakar Kushwahaendif
233a88179dSPrabhakar Kushwaha
243a88179dSPrabhakar Kushwahaifndef MINIMAL
256ece2550SKumar GalaCOBJS-$(CONFIG_FSL_CADMUS)	+= cadmus.o
266ece2550SKumar GalaCOBJS-$(CONFIG_FSL_VIA)		+= cds_via.o
272915609aSAndy FlemingCOBJS-$(CONFIG_FMAN_ENET)	+= fman.o
286ece2550SKumar GalaCOBJS-$(CONFIG_FSL_PIXIS)	+= pixis.o
29f45210d6SMatthew McClintockifndef CONFIG_SPL_BUILD
306ece2550SKumar GalaCOBJS-$(CONFIG_FSL_NGPIXIS)	+= ngpixis.o
31f45210d6SMatthew McClintockendif
32ae6b03feSShengzhou LiuCOBJS-$(CONFIG_FSL_QIXIS)	+= qixis.o
336ece2550SKumar GalaCOBJS-$(CONFIG_PQ_MDS_PIB)	+= pq-mds-pib.o
34f45210d6SMatthew McClintockifndef CONFIG_SPL_BUILD
356ece2550SKumar GalaCOBJS-$(CONFIG_ID_EEPROM)	+= sys_eeprom.o
36f45210d6SMatthew McClintockendif
376ece2550SKumar GalaCOBJS-$(CONFIG_FSL_SGMII_RISER)	+= sgmii_riser.o
38be827c7aSShaohui Xieifndef CONFIG_RAMBOOT_PBL
394394d0c2SFabio EstevamCOBJS-$(CONFIG_FSL_FIXED_MMC_LOCATION)	+= sdhc_boot.o
40be827c7aSShaohui Xieendif
4125eedb2cSJon Loeliger
426ece2550SKumar GalaCOBJS-$(CONFIG_MPC8541CDS)	+= cds_pci_ft.o
436ece2550SKumar GalaCOBJS-$(CONFIG_MPC8548CDS)	+= cds_pci_ft.o
446ece2550SKumar GalaCOBJS-$(CONFIG_MPC8555CDS)	+= cds_pci_ft.o
4525eedb2cSJon Loeliger
46c7e1a43dSKumar GalaCOBJS-$(CONFIG_MPC8536DS)	+= ics307_clk.o
47509c4c4cSKumar GalaCOBJS-$(CONFIG_MPC8572DS)	+= ics307_clk.o
48f45210d6SMatthew McClintockifndef CONFIG_SPL_BUILD
49c59e1b4dSTimur TabiCOBJS-$(CONFIG_P1022DS)		+= ics307_clk.o
50f45210d6SMatthew McClintockendif
51ebf9d526SKumar GalaCOBJS-$(CONFIG_P2020DS)		+= ics307_clk.o
52e02aea61SKumar GalaCOBJS-$(CONFIG_P3041DS)		+= ics307_clk.o
53d1712369SKumar GalaCOBJS-$(CONFIG_P4080DS)		+= ics307_clk.o
54e02aea61SKumar GalaCOBJS-$(CONFIG_P5020DS)		+= ics307_clk.o
55d31e53b4STimur TabiCOBJS-$(CONFIG_P5040DS)		+= ics307_clk.o
56aa42cb71SShaveta LeekhaCOBJS-$(CONFIG_VSC_CROSSBAR)    += vsc3316_3308.o
577608d75fSKim Phillips
58360275b3SKumar Gala# deal with common files for P-series corenet based devices
59f8bc7bb5SKumar GalaSUBLIB-$(CONFIG_P2041RDB)	+= p_corenet/libp_corenet.o
60360275b3SKumar GalaSUBLIB-$(CONFIG_P3041DS)	+= p_corenet/libp_corenet.o
61360275b3SKumar GalaSUBLIB-$(CONFIG_P4080DS)	+= p_corenet/libp_corenet.o
62360275b3SKumar GalaSUBLIB-$(CONFIG_P5020DS)	+= p_corenet/libp_corenet.o
63d31e53b4STimur TabiSUBLIB-$(CONFIG_P5040DS)	+= p_corenet/libp_corenet.o
643a88179dSPrabhakar Kushwahaendif
65360275b3SKumar Gala
66ad8f8687SJon LoeligerSRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
67ad8f8687SJon LoeligerOBJS	:= $(addprefix $(obj),$(COBJS-y))
687608d75fSKim PhillipsSOBJS	:= $(addprefix $(obj),$(SOBJS))
69360275b3SKumar GalaSUBLIB	:= $(addprefix $(obj),$(SUBLIB-y))
707608d75fSKim Phillips
71360275b3SKumar Gala$(LIB):	$(obj).depend $(OBJS) $(SUBLIB)
72360275b3SKumar Gala	$(call cmd_link_o_target, $(OBJS) $(SUBLIB))
73360275b3SKumar Gala
74360275b3SKumar Gala$(SUBLIB): $(obj).depend
75360275b3SKumar Gala	$(MAKE) -C $(dir $(subst $(obj),,$@))
767608d75fSKim Phillips
777608d75fSKim Phillips#########################################################################
787608d75fSKim Phillips
797608d75fSKim Phillips# defines $(obj).depend target
807608d75fSKim Phillipsinclude $(SRCTREE)/rules.mk
817608d75fSKim Phillips
827608d75fSKim Phillipssinclude $(obj).depend
837608d75fSKim Phillips
847608d75fSKim Phillips#########################################################################
85