Makefile (1207B)
1 # 2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 # 4 # Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 # 6 # Makefile for SOC drivers 7 # 8 LOCALDIR = systems/drv 9 10 include ${SDK}/make/Make.config 11 12 # 13 # For each "base_target", define a variable "${target-base}-drivers" that 14 # contains the drivers that need to be built for that target. 15 # 16 # Current targets are: vxworks (VxWorks) and unix (Solaris) 17 # 18 ifneq (,$(findstring -DINCLUDE_DRIVERS,$(CFGFLAGS))) 19 vxworks-drivers = socend 20 unix-drivers = 21 endif 22 23 ifneq (,$(findstring -DINCLUDE_BCM570X,$(CFGFLAGS))) 24 subdirs := bcm570x 25 endif 26 27 ifneq (,$(findstring -DINCLUDE_RCPU,$(CFGFLAGS))) 28 subdirs += eth 29 endif 30 31 ifneq (,$(subdirs)) 32 include ${SDK}/make/Make.subdirs 33 endif 34 35 36 # 37 # Get list into one variable. 38 # 39 target-drivers = $($(targetbase)-drivers) 40 41 # 42 # Need to override sources and binaries to only use local 43 # 44 LSRCS := $(foreach drv, $(target-drivers), $(filter $(drv).%,$(LSRCS))) 45 LOBJS := $(foreach drv, $(target-drivers), $(filter $(drv).%,$(LOBJS))) 46 BOBJS := $(addprefix ${BLDDIR}/,${LOBJS}) 47 48 lib = libdrivers 49 include ${SDK}/make/Make.lib 50 51 include ${SDK}/make/Make.depend