1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
|
# File: Makefile
# Copyright © Marvell International Ltd. and/or its affiliates, 2003-2006
CC= $(CROSS)gcc
LD= $(CROSS)ld
BACKUP= /root/backup
YMD= `date +%Y%m%d%H%M`
#############################################################################
# Configuration Options
#############################################################################
# Debug Option
# DEBUG LEVEL n/1/2:
# n: NO DEBUG
# 1: Only PRINTM(MSG,...), PRINTM(FATAL,...), ...
# 2: All PRINTM()
CONFIG_DEBUG=n
# Proc in /proc/net/wlan
CONFIG_PROC_DEBUG=y
# Linux Power Management
CONFIG_ENABLE_PM=n
# Re-association in driver
CONFIG_REASSOCIATION=y
# Manufacturing firmware support
CONFIG_MFG_CMD_SUPPORT=n
#############################################################################
# Select Platform Tools
#############################################################################
MODEXT = ko
CFLAGS += -I$(PWD)/os/linux
CFLAGS += -I$(PWD)/wlan
#TOOLPATH_S3C2412= /opt/samsung/s3c2412/usr/local/arm/4.0.3/bin
TOOLPATH_S3C2412= /usr/local/arm/3.4.1/arm-linux/bin
S3C2412_DIR= /tftpboot/samsung
INSTALLDIR=$(S3C2412_DIR)
PLATFORM=s3c2412
TOOLPATH=$(TOOLPATH_S3C2412)
# CROSS=$(TOOLPATH)/arm-linux-
CROSS=$(TOOLPATH)/
KERNEL_WE=15
# Intel Bulverde Mainstone Platform
CONFIG_MAINSTONE=n
ifeq ($(CONFIG_MAINSTONE), y)
CFLAGS += -D_MAINSTONE
export CONFIG_MAINSTONE
else
# Default MVL kernel has WE14
#KERNEL_WE=14
endif
# KERNELDIR=/home/prasanth/project/S3c2412/BUILD/s3c-linux-2.6.16
# KERNELDIR=/lib/modules/`uname -r`/build
KERNELDIR=/home/perso/Bureau/linux-2.6.25
CFLAGS += -I$(PWD)/if/if_sdio
CFLAGS += -I$(PWD)/io/sdio/$(PLATFORM)
BINDIR = ../bin_sd8686
#############################################################################
# Compiler Flags
#############################################################################
CFLAGS += -I$(KERNELDIR)/include
CFLAGS += -DFPNUM='"4"'
ifeq ($(CONFIG_DEBUG),1)
CFLAGS += -DDEBUG_LEVEL1
endif
ifeq ($(CONFIG_DEBUG),2)
CFLAGS += -DDEBUG_LEVEL1
CFLAGS += -DDEBUG_LEVEL2
DBG= -dbg
endif
ifeq ($(CONFIG_PROC_DEBUG),y)
CFLAGS += -DPROC_DEBUG
export CONFIG_PROC_DEBUG
endif
ifeq ($(CONFIG_ENABLE_PM),y)
CFLAGS += -DENABLE_PM
endif
ifeq ($(CONFIG_REASSOCIATION),y)
CFLAGS += -DREASSOCIATION
endif
ifeq ($(CONFIG_MFG_CMD_SUPPORT),y)
CFLAGS += -DMFG_CMD_SUPPORT
endif
#############################################################################
# Make Targets
#############################################################################
ifneq ($(KERNELRELEASE),)
WLANOBJS = wlan/wlan_main.o wlan/wlan_fw.o wlan/wlan_wext.o \
wlan/wlan_rx.o wlan/wlan_tx.o \
wlan/wlan_cmd.o wlan/wlan_cmdresp.o \
wlan/wlan_scan.o wlan/wlan_join.o
WLANOBJS += wlan/wlan_wmm.o
WLANOBJS += wlan/wlan_11d.o
WLANOBJS += wlan/wlan_fops.o
ifdef CONFIG_PROC_FS
WLANOBJS += wlan/wlan_proc.o
ifeq ($(CONFIG_PROC_DEBUG), y)
WLANOBJS += wlan/wlan_debug.o
endif
endif
IFOBJS := if/if_sdio/if_sdio.o
IOOBJS := io/sdio/$(PLATFORM)/sdio.o
obj-m := sd8686.o
sd8686-objs := $(WLANOBJS) $(IFOBJS) $(IOOBJS)
# Otherwise we were called directly from the command line; invoke the kernel build system.
else
default:
@echo "Building driver"
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
$(MAKE) -C app/wlanconfig
endif
###############################################################
export CC LD CFLAGS KERNELDIR
.PHONY: app/wlanconfig wlan clean distclean
@echo "Finished Making Marvell Wlan Linux Driver"
wlan app/wlanconfig:
$(MAKE) -C $@
echo:
@echo "Please make sure the following are done before building:"
@echo " 1. Modify release_version.h to set correct version number"
@echo " 2. Updates the README files"
build: echo default
@if [ ! -d $(BINDIR) ]; then \
mkdir $(BINDIR); \
fi
cp -f sd8686.$(MODEXT) $(BINDIR)/sd8686$(DBG).$(MODEXT)
cp -f README $(BINDIR)
$(MAKE) -C app/wlanconfig $@ INSTALLDIR=$(BINDIR)
cp -r config $(BINDIR)
clean:
-find . -name "*.o" -exec rm {} \;
-find . -name "*.ko" -exec rm {} \;
-find . -name ".*.cmd" -exec rm {} \;
-find . -name "*.mod.c" -exec rm {} \;
-rm -rf .tmp_versions
$(MAKE) -C app/wlanconfig $@
install: default
$(MAKE) -C app/wlanconfig $@ INSTALLDIR=$(INSTALLDIR)
cp -f sd8686.$(MODEXT) $(INSTALLDIR)/sd8686$(DBG).$(MODEXT)
echo "sd8686 Driver Installed"
distclean:
-find . -name "*.o" -exec rm {} \;
-find . -name "*.orig" -exec rm {} \;
-find . -name "*.swp" -exec rm {} \;
-find . -name "*.*~" -exec rm {} \;
-find . -name "*~" -exec rm {} \;
-find . -name "*.d" -exec rm {} \;
-find . -name "*.a" -exec rm {} \;
-find . -name "tags" -exec rm {} \;
-find . -name ".*" -exec rm -rf 2> /dev/null \;
-find . -name "*.ko" -exec rm {} \;
-find . -name ".*.cmd" -exec rm {} \;
-find . -name "*.mod.c" -exec rm {} \;
-rm -rf .tmp_versions
$(MAKE) -C app/wlanconfig $@
# End of file |
Partager