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 48COBJS-$(CONFIG_P1022DS) += ics307_clk.o 49COBJS-$(CONFIG_P2020DS) += ics307_clk.o 50COBJS-$(CONFIG_P3041DS) += ics307_clk.o 51COBJS-$(CONFIG_P4080DS) += ics307_clk.o 52COBJS-$(CONFIG_P5020DS) += ics307_clk.o 53COBJS-$(CONFIG_P5040DS) += ics307_clk.o 54COBJS-$(CONFIG_VSC_CROSSBAR) += vsc3316_3308.o 55COBJS-$(CONFIG_IDT8T49N222A) += idt8t49n222a_serdes_clk.o 56 57# deal with common files for P-series corenet based devices 58SUBLIB-$(CONFIG_P2041RDB) += p_corenet/libp_corenet.o 59SUBLIB-$(CONFIG_P3041DS) += p_corenet/libp_corenet.o 60SUBLIB-$(CONFIG_P4080DS) += p_corenet/libp_corenet.o 61SUBLIB-$(CONFIG_P5020DS) += p_corenet/libp_corenet.o 62SUBLIB-$(CONFIG_P5040DS) += p_corenet/libp_corenet.o 63endif 64 65SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) 66OBJS := $(addprefix $(obj),$(COBJS-y)) 67SOBJS := $(addprefix $(obj),$(SOBJS)) 68SUBLIB := $(addprefix $(obj),$(SUBLIB-y)) 69 70$(LIB): $(obj).depend $(OBJS) $(SUBLIB) 71 $(call cmd_link_o_target, $(OBJS) $(SUBLIB)) 72 73$(SUBLIB): $(obj).depend 74 $(MAKE) -C $(dir $(subst $(obj),,$@)) 75 76######################################################################### 77 78# defines $(obj).depend target 79include $(SRCTREE)/rules.mk 80 81sinclude $(obj).depend 82 83######################################################################### 84