1# 2# (C) Copyright 2006 3# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4# 5# SPDX-License-Identifier: GPL-2.0+ 6# 7 8include $(TOPDIR)/config.mk 9 10ifneq ($(OBJTREE),$(SRCTREE)) 11$(shell mkdir -p $(obj)board/freescale/common) 12endif 13 14LIB = $(obj)libfreescale.o 15 16MINIMAL= 17 18ifdef CONFIG_SPL_BUILD 19ifdef CONFIG_SPL_INIT_MINIMAL 20MINIMAL=y 21endif 22endif 23 24ifndef MINIMAL 25COBJS-$(CONFIG_FSL_CADMUS) += cadmus.o 26COBJS-$(CONFIG_FSL_VIA) += cds_via.o 27COBJS-$(CONFIG_FMAN_ENET) += fman.o 28COBJS-$(CONFIG_FSL_PIXIS) += pixis.o 29ifndef CONFIG_SPL_BUILD 30COBJS-$(CONFIG_FSL_NGPIXIS) += ngpixis.o 31endif 32COBJS-$(CONFIG_FSL_QIXIS) += qixis.o 33COBJS-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o 34ifndef CONFIG_SPL_BUILD 35COBJS-$(CONFIG_ID_EEPROM) += sys_eeprom.o 36endif 37COBJS-$(CONFIG_FSL_SGMII_RISER) += sgmii_riser.o 38ifndef CONFIG_RAMBOOT_PBL 39COBJS-$(CONFIG_FSL_FIXED_MMC_LOCATION) += sdhc_boot.o 40endif 41 42COBJS-$(CONFIG_MPC8541CDS) += cds_pci_ft.o 43COBJS-$(CONFIG_MPC8548CDS) += cds_pci_ft.o 44COBJS-$(CONFIG_MPC8555CDS) += cds_pci_ft.o 45 46COBJS-$(CONFIG_MPC8536DS) += ics307_clk.o 47COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o 48ifndef CONFIG_SPL_BUILD 49COBJS-$(CONFIG_P1022DS) += ics307_clk.o 50endif 51COBJS-$(CONFIG_P2020DS) += ics307_clk.o 52COBJS-$(CONFIG_P3041DS) += ics307_clk.o 53COBJS-$(CONFIG_P4080DS) += ics307_clk.o 54COBJS-$(CONFIG_P5020DS) += ics307_clk.o 55COBJS-$(CONFIG_P5040DS) += ics307_clk.o 56COBJS-$(CONFIG_VSC_CROSSBAR) += vsc3316_3308.o 57 58# deal with common files for P-series corenet based devices 59SUBLIB-$(CONFIG_P2041RDB) += p_corenet/libp_corenet.o 60SUBLIB-$(CONFIG_P3041DS) += p_corenet/libp_corenet.o 61SUBLIB-$(CONFIG_P4080DS) += p_corenet/libp_corenet.o 62SUBLIB-$(CONFIG_P5020DS) += p_corenet/libp_corenet.o 63SUBLIB-$(CONFIG_P5040DS) += p_corenet/libp_corenet.o 64endif 65 66SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) 67OBJS := $(addprefix $(obj),$(COBJS-y)) 68SOBJS := $(addprefix $(obj),$(SOBJS)) 69SUBLIB := $(addprefix $(obj),$(SUBLIB-y)) 70 71$(LIB): $(obj).depend $(OBJS) $(SUBLIB) 72 $(call cmd_link_o_target, $(OBJS) $(SUBLIB)) 73 74$(SUBLIB): $(obj).depend 75 $(MAKE) -C $(dir $(subst $(obj),,$@)) 76 77######################################################################### 78 79# defines $(obj).depend target 80include $(SRCTREE)/rules.mk 81 82sinclude $(obj).depend 83 84######################################################################### 85