diff options
author | Claudiu Manoil <claudiu.manoil@nxp.com> | 2019-08-01 14:52:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-02 18:22:18 -0700 |
commit | 0c010a9deb33179169fa867d3c76833ce80165b7 (patch) | |
tree | 1dfeb49219a843046473e30a5b52163bd084743f | |
parent | 2152e7a2d9a8c29e8850adabd2175fa042ad5bb8 (diff) | |
download | linux-stable-0c010a9deb33179169fa867d3c76833ce80165b7.tar.gz linux-stable-0c010a9deb33179169fa867d3c76833ce80165b7.tar.bz2 linux-stable-0c010a9deb33179169fa867d3c76833ce80165b7.zip |
enetc: Clean up makefile
Clean up overcomplicated makefile to make it more maintainable.
Basically, there's a set of common objects shared between
the PF and VF driver modules. This can be implemented in a
simpler way, without conditionals, less repetition, allowing
also for easier updates in the future.
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/Makefile | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/Makefile b/drivers/net/ethernet/freescale/enetc/Makefile index 7139e414dccf..164453a5dc1d 100644 --- a/drivers/net/ethernet/freescale/enetc/Makefile +++ b/drivers/net/ethernet/freescale/enetc/Makefile @@ -1,19 +1,13 @@ # SPDX-License-Identifier: GPL-2.0 + +common-objs := enetc.o enetc_cbdr.o enetc_ethtool.o + obj-$(CONFIG_FSL_ENETC) += fsl-enetc.o -fsl-enetc-$(CONFIG_FSL_ENETC) += enetc.o enetc_cbdr.o enetc_ethtool.o \ - enetc_mdio.o +fsl-enetc-y := enetc_pf.o enetc_mdio.o $(common-objs) fsl-enetc-$(CONFIG_PCI_IOV) += enetc_msg.o -fsl-enetc-objs := enetc_pf.o $(fsl-enetc-y) obj-$(CONFIG_FSL_ENETC_VF) += fsl-enetc-vf.o - -ifeq ($(CONFIG_FSL_ENETC)$(CONFIG_FSL_ENETC_VF), yy) -fsl-enetc-vf-objs := enetc_vf.o -else -fsl-enetc-vf-$(CONFIG_FSL_ENETC_VF) += enetc.o enetc_cbdr.o \ - enetc_ethtool.o -fsl-enetc-vf-objs := enetc_vf.o $(fsl-enetc-vf-y) -endif +fsl-enetc-vf-y := enetc_vf.o $(common-objs) obj-$(CONFIG_FSL_ENETC_PTP_CLOCK) += fsl-enetc-ptp.o -fsl-enetc-ptp-$(CONFIG_FSL_ENETC_PTP_CLOCK) += enetc_ptp.o +fsl-enetc-ptp-y := enetc_ptp.o |