From: Masahiro Yamada Date: Thu, 17 Oct 2013 08:34:54 +0000 (+0900) Subject: drivers: net: convert makefiles to Kbuild style X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=e32459e24aa9f7778b9394c94bd4af2b6524b3a0;p=u-boot.git drivers: net: convert makefiles to Kbuild style Signed-off-by: Masahiro Yamada --- diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 18fd54fc66..7f9ce90a6d 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -5,83 +5,61 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libnet.o - -COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o -COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o -COBJS-$(CONFIG_ARMADA100_FEC) += armada100_fec.o -COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o -COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o -COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o -COBJS-$(CONFIG_CALXEDA_XGMAC) += calxedaxgmac.o -COBJS-$(CONFIG_CS8900) += cs8900.o -COBJS-$(CONFIG_TULIP) += dc2114x.o -COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o -COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o -COBJS-$(CONFIG_DNET) += dnet.o -COBJS-$(CONFIG_E1000) += e1000.o -COBJS-$(CONFIG_E1000_SPI) += e1000_spi.o -COBJS-$(CONFIG_EEPRO100) += eepro100.o -COBJS-$(CONFIG_ENC28J60) += enc28j60.o -COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o -COBJS-$(CONFIG_ETHOC) += ethoc.o -COBJS-$(CONFIG_FEC_MXC) += fec_mxc.o -COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o -COBJS-$(CONFIG_FTGMAC100) += ftgmac100.o -COBJS-$(CONFIG_FTMAC110) += ftmac110.o -COBJS-$(CONFIG_FTMAC100) += ftmac100.o -COBJS-$(CONFIG_GRETH) += greth.o -COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o -COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o -COBJS-$(CONFIG_KS8851_MLL) += ks8851_mll.o -COBJS-$(CONFIG_LAN91C96) += lan91c96.o -COBJS-$(CONFIG_MACB) += macb.o -COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o -COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o -COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o -COBJS-$(CONFIG_MVGBE) += mvgbe.o -COBJS-$(CONFIG_NATSEMI) += natsemi.o -COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o -COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o -COBJS-$(CONFIG_NETCONSOLE) += netconsole.o -COBJS-$(CONFIG_NS8382X) += ns8382x.o -COBJS-$(CONFIG_PCNET) += pcnet.o -COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o -COBJS-$(CONFIG_RTL8139) += rtl8139.o -COBJS-$(CONFIG_RTL8169) += rtl8169.o -COBJS-$(CONFIG_SH_ETHER) += sh_eth.o -COBJS-$(CONFIG_SMC91111) += smc91111.o -COBJS-$(CONFIG_SMC911X) += smc911x.o -COBJS-$(CONFIG_SUNXI_WEMAC) += sunxi_wemac.o -COBJS-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o -COBJS-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o -COBJS-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o -COBJS-$(CONFIG_FMAN_ENET) += fsl_mdio.o -COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o -COBJS-$(CONFIG_ULI526X) += uli526x.o -COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o -COBJS-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o -COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o -COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o xilinx_ll_temac_mdio.o \ +obj-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o +obj-$(CONFIG_ALTERA_TSE) += altera_tse.o +obj-$(CONFIG_ARMADA100_FEC) += armada100_fec.o +obj-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o +obj-$(CONFIG_DRIVER_AX88180) += ax88180.o +obj-$(CONFIG_BFIN_MAC) += bfin_mac.o +obj-$(CONFIG_CALXEDA_XGMAC) += calxedaxgmac.o +obj-$(CONFIG_CS8900) += cs8900.o +obj-$(CONFIG_TULIP) += dc2114x.o +obj-$(CONFIG_DESIGNWARE_ETH) += designware.o +obj-$(CONFIG_DRIVER_DM9000) += dm9000x.o +obj-$(CONFIG_DNET) += dnet.o +obj-$(CONFIG_E1000) += e1000.o +obj-$(CONFIG_E1000_SPI) += e1000_spi.o +obj-$(CONFIG_EEPRO100) += eepro100.o +obj-$(CONFIG_ENC28J60) += enc28j60.o +obj-$(CONFIG_EP93XX) += ep93xx_eth.o +obj-$(CONFIG_ETHOC) += ethoc.o +obj-$(CONFIG_FEC_MXC) += fec_mxc.o +obj-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o +obj-$(CONFIG_FTGMAC100) += ftgmac100.o +obj-$(CONFIG_FTMAC110) += ftmac110.o +obj-$(CONFIG_FTMAC100) += ftmac100.o +obj-$(CONFIG_GRETH) += greth.o +obj-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o +obj-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o +obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o +obj-$(CONFIG_LAN91C96) += lan91c96.o +obj-$(CONFIG_MACB) += macb.o +obj-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o +obj-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o +obj-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o +obj-$(CONFIG_MVGBE) += mvgbe.o +obj-$(CONFIG_NATSEMI) += natsemi.o +obj-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o +obj-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o +obj-$(CONFIG_NETCONSOLE) += netconsole.o +obj-$(CONFIG_NS8382X) += ns8382x.o +obj-$(CONFIG_PCNET) += pcnet.o +obj-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o +obj-$(CONFIG_RTL8139) += rtl8139.o +obj-$(CONFIG_RTL8169) += rtl8169.o +obj-$(CONFIG_SH_ETHER) += sh_eth.o +obj-$(CONFIG_SMC91111) += smc91111.o +obj-$(CONFIG_SMC911X) += smc911x.o +obj-$(CONFIG_SUNXI_WEMAC) += sunxi_wemac.o +obj-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o +obj-$(CONFIG_TSEC_ENET) += tsec.o fsl_mdio.o +obj-$(CONFIG_DRIVER_TI_CPSW) += cpsw.o +obj-$(CONFIG_FMAN_ENET) += fsl_mdio.o +obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o +obj-$(CONFIG_ULI526X) += uli526x.o +obj-$(CONFIG_VSC7385_ENET) += vsc7385.o +obj-$(CONFIG_XILINX_AXIEMAC) += xilinx_axi_emac.o +obj-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +obj-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o xilinx_ll_temac_mdio.o \ xilinx_ll_temac_fifo.o xilinx_ll_temac_sdma.o -COBJS-$(CONFIG_ZYNQ_GEM) += zynq_gem.o - -COBJS := $(sort $(COBJS-y)) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_ZYNQ_GEM) += zynq_gem.o diff --git a/drivers/net/fm/Makefile b/drivers/net/fm/Makefile index dddde4f449..bec86c16c1 100644 --- a/drivers/net/fm/Makefile +++ b/drivers/net/fm/Makefile @@ -4,51 +4,30 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libfm.o - ifdef CONFIG_FMAN_ENET -COBJS-y += dtsec.o -COBJS-y += eth.o -COBJS-y += fm.o -COBJS-y += init.o -COBJS-y += tgec.o -COBJS-y += tgec_phy.o +obj-y += dtsec.o +obj-y += eth.o +obj-y += fm.o +obj-y += init.o +obj-y += tgec.o +obj-y += tgec_phy.o # Soc have FMAN v3 with mEMAC -COBJS-$(CONFIG_SYS_FMAN_V3) += memac_phy.o -COBJS-$(CONFIG_SYS_FMAN_V3) += memac.o +obj-$(CONFIG_SYS_FMAN_V3) += memac_phy.o +obj-$(CONFIG_SYS_FMAN_V3) += memac.o # SoC specific SERDES support -COBJS-$(CONFIG_P1017) += p1023.o -COBJS-$(CONFIG_P1023) += p1023.o +obj-$(CONFIG_P1017) += p1023.o +obj-$(CONFIG_P1023) += p1023.o # The P204x, P304x, and P5020 are the same -COBJS-$(CONFIG_PPC_P2041) += p5020.o -COBJS-$(CONFIG_PPC_P3041) += p5020.o -COBJS-$(CONFIG_PPC_P4080) += p4080.o -COBJS-$(CONFIG_PPC_P5020) += p5020.o -COBJS-$(CONFIG_PPC_P5040) += p5040.o -COBJS-$(CONFIG_PPC_T1040) += t1040.o -COBJS-$(CONFIG_PPC_T4240) += t4240.o -COBJS-$(CONFIG_PPC_T4160) += t4240.o -COBJS-$(CONFIG_PPC_B4420) += b4860.o -COBJS-$(CONFIG_PPC_B4860) += b4860.o +obj-$(CONFIG_PPC_P2041) += p5020.o +obj-$(CONFIG_PPC_P3041) += p5020.o +obj-$(CONFIG_PPC_P4080) += p4080.o +obj-$(CONFIG_PPC_P5020) += p5020.o +obj-$(CONFIG_PPC_P5040) += p5040.o +obj-$(CONFIG_PPC_T1040) += t1040.o +obj-$(CONFIG_PPC_T4240) += t4240.o +obj-$(CONFIG_PPC_T4160) += t4240.o +obj-$(CONFIG_PPC_B4420) += b4860.o +obj-$(CONFIG_PPC_B4860) += b4860.o endif - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/drivers/net/npe/Makefile b/drivers/net/npe/Makefile index a982678d89..7fa5ea635f 100644 --- a/drivers/net/npe/Makefile +++ b/drivers/net/npe/Makefile @@ -5,16 +5,12 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libnpe.o - LOCAL_CFLAGS += -I$(TOPDIR)/drivers/net/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux CFLAGS += $(LOCAL_CFLAGS) CPPFLAGS += $(LOCAL_CFLAGS) # needed for depend HOSTCFLAGS += $(LOCAL_CFLAGS) -COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \ +obj-$(CONFIG_IXP4XX_NPE) := npe.o \ miiphy.o \ IxOsalBufferMgt.o \ IxOsalIoMem.o \ @@ -63,21 +59,3 @@ COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \ IxNpeMhSend.o \ IxNpeMhSolicitedCbMgr.o \ IxNpeMhUnsolicitedCbMgr.o - -SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index fe762e9de3..dbf7bf7058 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile @@ -5,44 +5,22 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libphy.o - -COBJS-$(CONFIG_BITBANGMII) += miiphybb.o -COBJS-$(CONFIG_MV88E61XX_SWITCH) += mv88e61xx.o -COBJS-$(CONFIG_MV88E6352_SWITCH) += mv88e6352.o - -COBJS-$(CONFIG_PHYLIB) += phy.o -COBJS-$(CONFIG_PHYLIB_10G) += generic_10g.o -COBJS-$(CONFIG_PHY_ATHEROS) += atheros.o -COBJS-$(CONFIG_PHY_BROADCOM) += broadcom.o -COBJS-$(CONFIG_PHY_DAVICOM) += davicom.o -COBJS-$(CONFIG_PHY_ET1011C) += et1011c.o -COBJS-$(CONFIG_PHY_ICPLUS) += icplus.o -COBJS-$(CONFIG_PHY_LXT) += lxt.o -COBJS-$(CONFIG_PHY_MARVELL) += marvell.o -COBJS-$(CONFIG_PHY_MICREL) += micrel.o -COBJS-$(CONFIG_PHY_NATSEMI) += natsemi.o -COBJS-$(CONFIG_PHY_REALTEK) += realtek.o -COBJS-$(CONFIG_PHY_SMSC) += smsc.o -COBJS-$(CONFIG_PHY_TERANETICS) += teranetics.o -COBJS-$(CONFIG_PHY_VITESSE) += vitesse.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +obj-$(CONFIG_BITBANGMII) += miiphybb.o +obj-$(CONFIG_MV88E61XX_SWITCH) += mv88e61xx.o +obj-$(CONFIG_MV88E6352_SWITCH) += mv88e6352.o + +obj-$(CONFIG_PHYLIB) += phy.o +obj-$(CONFIG_PHYLIB_10G) += generic_10g.o +obj-$(CONFIG_PHY_ATHEROS) += atheros.o +obj-$(CONFIG_PHY_BROADCOM) += broadcom.o +obj-$(CONFIG_PHY_DAVICOM) += davicom.o +obj-$(CONFIG_PHY_ET1011C) += et1011c.o +obj-$(CONFIG_PHY_ICPLUS) += icplus.o +obj-$(CONFIG_PHY_LXT) += lxt.o +obj-$(CONFIG_PHY_MARVELL) += marvell.o +obj-$(CONFIG_PHY_MICREL) += micrel.o +obj-$(CONFIG_PHY_NATSEMI) += natsemi.o +obj-$(CONFIG_PHY_REALTEK) += realtek.o +obj-$(CONFIG_PHY_SMSC) += smsc.o +obj-$(CONFIG_PHY_TERANETICS) += teranetics.o +obj-$(CONFIG_PHY_VITESSE) += vitesse.o