#  Copyright 2001, Broadcom Corporation
#  All Rights Reserved.
#  
#
# Makefile for the Broadcom wl driver
#
# $Id: Makefile,v 1.13.10.1 2003/06/19 00:57:19 noname Exp $
#

# build each variant of wl aswell as requested variant.
subdir-m += wl_ap
subdir-m += wl_sta
subdir-m += wl_apsta

O_TARGET	:= wl.o

export-objs	:=
obj-y		:= wl_linux.o wlc.o d11ucode.o wlc_phy.o wlc_rate.o wlc_led.o wlc_cmn_ioctl.o wlc_security.o wlc_tkhash.o
obj-m		:= $(O_TARGET)

SRCBASE		:= $(TOPDIR)/../..
EXTRA_CFLAGS	+= -I$(SRCBASE)/include
EXTRA_CFLAGS	+= -DDMA

WL_BIN_PATH := 
ifeq ($(CONFIG_WL_AP),y)
EXTRA_CFLAGS	+= -DAP
WL_BIN_PATH := ap
endif

ifeq ($(CONFIG_WL_STA),y)
EXTRA_CFLAGS	+= -DSTA
WL_BIN_PATH := $(WL_BIN_PATH)sta
endif

# Search for sources under src/wl/sys or objects under src/wl/linux
ifneq ($(wildcard $(SRCBASE)/wl/sys),)
EXTRA_CFLAGS	+= -I$(SRCBASE)/wl/sys
vpath %.c $(SRCBASE)/wl/sys $(SRCBASE)/shared
else
obj-y		:= $(foreach obj,$(obj-y),$(SRCBASE)/wl/linux_$(WL_BIN_PATH)/$(obj))
endif

include $(TOPDIR)/Rules.make
