1# 2# Makefile for the Broadcom wl driver 3# 4# Copyright (C) 2013, Broadcom Corporation. All Rights Reserved. 5# 6# Permission to use, copy, modify, and/or distribute this software for any 7# purpose with or without fee is hereby granted, provided that the above 8# copyright notice and this permission notice appear in all copies. 9# 10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 13# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 15# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 16# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17# 18# $Id: Makefile,v 1.13 2010-12-13 20:23:49 $ 19# 20 21SRCBASE_OFFSET := ../../../../../../src-rt-6.x.4708 22 23TARGET := wl 24WLCONF_H := wlconf.h 25WLCONF_O := wlconf.o 26 27ifeq ($(CONFIG_BUZZZ_FUNC),y) 28subdir-ccflags-y += -O0 -fno-inline -finstrument-functions 29endif # CONFIG_BUZZZ_FUNC 30 31# Generate list of supported variants 32VLIST_BASE := AP STA APSTA 33ifeq ($(CONFIG_WL_USE_AP_SDSTD),y) 34 VLIST_BASE += AP_SDSTD 35endif 36 37VLIST += $(VLIST_BASE) 38 39ifeq ($(CONFIG_WL_USBAP),y) 40# Do variants because we need two drivers for dual band operation 41WL_VARIANTS := 1 42VLIST += HIGH 43# Note that we don't use CONFIG_WL_USE_HIGH because we need to leave WL_SUFFIX for 44# the other driver. HIGH driver is always called wl_high and loaded upon hotplut 45# event. 46endif 47 48ifeq ($(BUILD_WL_ONCHIP_G),true) 49 VLIST += $(foreach base,$(VLIST_BASE),$(base)_ONCHIP_G) 50endif # BUILD_WL_ONCHIP_G 51 52# Set suffix and config based on the selected variant 53WL_SUFFIX := $(strip $(foreach v,$(VLIST),$(if $(CONFIG_WL_USE_$(v)),$(v)))) 54CONFIG_WL_CONF := $(CONFIG_WL_$(WL_SUFFIX)) 55 56# Module file names use lowercase of the suffix 57wl_suffix := $(shell echo "$(WL_SUFFIX)" | tr A-Z a-z) 58 59 60# For PREBUILD and postbuild w/WLSRC, compile variants in subdirs 61# Subdir names use lowercase versions of the variant suffixes 62#wlsubdirs := $(addprefix wl_,$(foreach v,$(VLIST),$(shell echo "$(v)/" | tr A-Z a-z))) 63wlsubdirs := $(addprefix wl_,$(foreach v,$(VLIST),$(shell echo "$(v)" | tr A-Z a-z))) 64 65 66#subdir-y += $(wlsubdirs) 67#subdir-m += $(wlsubdirs) 68 69.NOTPARALLEL: 70include $(src)/wl_generic.mk 71