📄 makefile.inc
字号:
## Copyright (c) 2002-2005 Sam Leffler, Errno Consulting# Copyright (c) 2002-2005 Atheros Communications, Inc.# All rights reserved.## $Id: Makefile.inc,v 1.3 2006/10/02 07:41:12 steven Exp $#HAL= ..PUBLIC= ${HAL}/public## Makefile for building the Atheros/MADWIFI HAL from source code on Linux.## This file is intended to be called by the Makefile in the hal# directory with TARGET set to the desired target platform.## There is support for 3 "generations" of Atheros hardware devices:## AH_SUPPORT_AR5210 802.11a only MAC# AH_SUPPORT_AR5211 802.11a+802.11b MAC (also pure g, but not yet supported)# AH_SUPPORT_AR5212 802.11a+802.11b+802.11g MAC# AH_SUPPORT_AR5312 5212 MAC WiSoC (requires AH_SUPPORT_AR5212)# AH_SUPPORT_5111 5111 RF support for 5212 et. al.# AH_SUPPORT_5112 5112 RF support for 5212 et. al.# AH_SUPPORT_2413 2413 RF support for 5212 et. al.# AH_SUPPORT_5413 5413 RF support for 5212 et. al.# AH_SUPPORT_2316 2416 RF (Cobra) support for 5212 et. al.# AH_SUPPORT_2317 2417 RF (Cobra) support for 5212 et. al.## and numerous optional debugging facilities (typically named AH_DEBUG_*):## AH_DEBUG enables debugging stuff that's controlled by the sysctl:# hw.ath.hal.debug# AH_ASSERT enables assertions that panic or trap into the debugger.# AH_DEBUG_ALQ enables support for tracing register reads+writes# via alq# AH_DEBUG_COUNTRY accept the CTR_DEBUG country code (for debugging# the regulatory domain support)# AH_REGOPS_FUNC arrange for OS_REG_READ and OS_REG_WRITE to be function# calls and not inline expanded to memory references# AH_ENABLE_AP_SUPPORT enables AP-specific support not publicly available# (e.g. don't cap turbo power limits)# AH_DISABLE_WME disable HAL_TXQ_USE_LOCKOUT_BKOFF_DIS support## AH_PRIVATE_DIAG enable private diagnostic support# AH_WRITE_EEPROM permit EEPROM writes (use with AH_PRIVATE_DIAG)# AH_WRITE_REGDOMAIN permit EEPROM writes of the regulatory domain through# ah_setRegulatoryDomain (implies AH_WRITE_EEPROM)# AH_SUPPORT_XR enable XR support# AH_RADAR_CALIBRATE level of radar messages used for calibrating threshold of radar# detection (Valid values: {1,2} - 1 minimal info, # 2 detailed info, 3 detailed info)# AH_SUPPORT_WRITE_REG permit direct writing of any HAL register via ioctl### Default settings...#AH_SUPPORT_AR5210?=0 # 5210 supportAH_SUPPORT_AR5211?=0 # 5211 supportAH_SUPPORT_AR5212?=1 # 5212 supportAH_SUPPORT_AR5312?=0 # 5312 supportAH_SUPPORT_AR5416V2?=1 # 5416 Version 2 supportAH_SUPPORT_AR5416FPGA?=1 # 5416 FPGA supportAH_SUPPORT_5111?=1 # 5111 RF supportAH_SUPPORT_5112?=1 # 5112 RF supportAH_SUPPORT_2413?=1 # 2413 RF supportAH_SUPPORT_5413?=1 # 5413 RF supportAH_SUPPORT_2316?=0 # 2316 RF supportAH_SUPPORT_2317?=0 # 2317 RF supportAH_DEBUG?=0 # debugging (e.g. hw.ath.hal.debug)AH_ASSERT?=0 # assertions (pretty lame)AH_DEBUG_ALQ?=0 # ALQ register tracing supportAH_REGOPS_FUNC?=0 # use inline memory referencesAH_WRITE_REGDOMAIN?=0 # support EEPROM writes of the regulatory domainAH_DEBUG_COUNTRY?=0 # accept CTR_DEBUG country codeAH_DISABLE_WME?=0 # disable HAL_TXQ_USE_LOCKOUT_BKOFF_DISAH_ENABLE_AP_SUPPORT?=0 # enable AP-specific supportAH_WRITE_EEPROM?=0 # support EEPROM writesAH_PRIVATE_DIAG?=1 # non-public diagnostic supportAH_NEED_DESC_SWAP?=0 # Need to swap TX descriptorAH_SUPPORT_XR?=0 # disable XRAH_SUPPORT_DFS?=1 # support DFSAH_RADAR_CALIBRATE?=0 # don't display any info for calibrationAH_SUPPORT_WRITE_REG?=0 # don't support ioctl writing of regs## If 5312 support is enabled it's almost certain we're not going# to use the 5210 or 5211 support so disable it to save some space.#ifeq ($(strip ${AH_SUPPORT_AR5312}),1)AH_SUPPORT_AR5210=0AH_SUPPORT_AR5211=0AH_SUPPORT_AR5414=0endif## Basic build components.#OBJDIR= obj/${TARGET}COPTS= -Werror -g -OINCS= -I${OBJDIR} -I. -I..CLEANFILES= ${OBJDIR}/.dependinclude ${PUBLIC}/${TARGET}.incCFLAGS= ${INCS} ${COPTS}HAL_SRCS=${HAL}/ah.c ${HAL}/ah_eeprom.c ${HAL}/ah_regdomain.cHAL_OBJS=${OBJDIR}/ah.o ${OBJDIR}/ah_eeprom.o ${OBJDIR}/ah_regdomain.oAR5210= ${HAL}/ar5210HAL_SRCS+=${AR5210}/ar5210_attach.c ${AR5210}/ar5210_beacon.c \ ${AR5210}/ar5210_interrupts.c ${AR5210}/ar5210_keycache.c \ ${AR5210}/ar5210_misc.c ${AR5210}/ar5210_power.c \ ${AR5210}/ar5210_phy.c ${AR5210}/ar5210_recv.c \ ${AR5210}/ar5210_reset.c ${AR5210}/ar5210_xmit.c \ $(AR5210)/ar5210_radar.cHAL_OBJS+=${OBJDIR}/ar5210_attach.o ${OBJDIR}/ar5210_beacon.o \ ${OBJDIR}/ar5210_interrupts.o ${OBJDIR}/ar5210_keycache.o \ ${OBJDIR}/ar5210_misc.o ${OBJDIR}/ar5210_power.o \ ${OBJDIR}/ar5210_phy.o ${OBJDIR}/ar5210_recv.o \ ${OBJDIR}/ar5210_reset.o ${OBJDIR}/ar5210_xmit.o \ $(OBJDIR)/ar5210_radar.oAR5211= ${HAL}/ar5211HAL_SRCS+=${AR5211}/ar5211_attach.c ${AR5211}/ar5211_beacon.c \ ${AR5211}/ar5211_interrupts.c ${AR5211}/ar5211_keycache.c \ ${AR5211}/ar5211_misc.c ${AR5211}/ar5211_power.c \ ${AR5211}/ar5211_phy.c ${AR5211}/ar5211_recv.c \ ${AR5211}/ar5211_reset.c ${AR5211}/ar5211_xmit.c \ $(AR5211)/ar5211_radar.cHAL_OBJS+=${OBJDIR}/ar5211_attach.o ${OBJDIR}/ar5211_beacon.o \ ${OBJDIR}/ar5211_interrupts.o ${OBJDIR}/ar5211_keycache.o \ ${OBJDIR}/ar5211_misc.o ${OBJDIR}/ar5211_power.o \ ${OBJDIR}/ar5211_phy.o ${OBJDIR}/ar5211_recv.o \ ${OBJDIR}/ar5211_reset.o ${OBJDIR}/ar5211_xmit.o \ $(OBJDIR)/ar5211_radar.oAR5212= ${HAL}/ar5212HAL_SRCS+=${AR5212}/ar5212_attach.c ${AR5212}/ar5212_beacon.c \ ${AR5212}/ar5212_eeprom.c ${AR5212}/ar5212_gpio.c \ ${AR5212}/ar5212_interrupts.c ${AR5212}/ar5212_keycache.c \ ${AR5212}/ar5212_misc.c ${AR5212}/ar5212_power.c \ ${AR5212}/ar5212_phy.c ${AR5212}/ar5212_recv.c \ ${AR5212}/ar5212_reset.c ${AR5212}/ar5212_xmit.c \ ${AR5212}/ar5212_ani.c ${AR5212}/ar5212_radar.cHAL_OBJS+=${OBJDIR}/ar5212_attach.o ${OBJDIR}/ar5212_beacon.o \ ${OBJDIR}/ar5212_eeprom.o ${OBJDIR}/ar5212_gpio.o \ ${OBJDIR}/ar5212_interrupts.o ${OBJDIR}/ar5212_keycache.o \ ${OBJDIR}/ar5212_misc.o ${OBJDIR}/ar5212_power.o \ ${OBJDIR}/ar5212_phy.o ${OBJDIR}/ar5212_recv.o \ ${OBJDIR}/ar5212_reset.o ${OBJDIR}/ar5212_xmit.o \ ${OBJDIR}/ar5212_ani.o ${OBJDIR}/ar5212_radar.oAR5312= ${HAL}/ar5312HAL_SRCS+=${AR5312}/ar5312_attach.c ${AR5312}/ar5312_interrupts.c \ ${AR5312}/ar5312_eeprom.c ${AR5312}/ar5312_gpio.c \ ${AR5312}/ar5312_misc.c ${AR5312}/ar5312_power.c \ ${AR5312}/ar5312_reset.c \ ${AR5312}/ar5312_bsp.cHAL_OBJS+=${OBJDIR}/ar5312_attach.o ${OBJDIR}/ar5312_interrupts.o \ ${OBJDIR}/ar5312_eeprom.o ${OBJDIR}/ar5312_gpio.o \ ${OBJDIR}/ar5312_misc.o ${OBJDIR}/ar5312_power.o \ ${OBJDIR}/ar5312_reset.o \ ${OBJDIR}/ar5312_bsp.oHAL_SRCS+=${AR5212}/ar5111.cHAL_OBJS+=${OBJDIR}/ar5111.oHAL_SRCS+=${AR5212}/ar5112.cHAL_OBJS+=${OBJDIR}/ar5112.oHAL_SRCS+=${AR5212}/ar2413.cHAL_OBJS+=${OBJDIR}/ar2413.oHAL_SRCS+=${AR5212}/ar5413.cHAL_OBJS+=${OBJDIR}/ar5413.oHAL_SRCS+=${AR5212}/ar2316.cHAL_OBJS+=${OBJDIR}/ar2316.oHAL_SRCS+=${AR5212}/ar2317.cHAL_OBJS+=${OBJDIR}/ar2317.oSRCS+= ${HAL_SRCS}CLEANFILES+= ${OBJDIR}/opt_ah.h ${HAL_OBJS} \ ${OBJDIR}/t.o ${OBJDIR}/hal.mangle ${OBJDIR}/hal-release.o## NB: These are typically overridden in the target-specific specification.#LD?= ldSTRIP?= stripNM?= nmSED?= sedOBJCOPY?=objcopy## These are specific to the host doing the build.#AWK?= awkUUENCODE?=uuencodeCVS?= cvsALL= ${OBJDIR}/hal.oall: ${ALL}${OBJDIR}/hal.o: ${HAL_OBJS} Makefile ${LD} -o $@ -r ${LDOPTS} ${HAL_OBJS}## The released object file is constructed by stripping all possible symbols# and mangling any that remain. The latter is necessary because GCC stubornly# uses various symbols for relocation when it doesn't need to. Look at the# script syms.awk to understand the symbol munging.#${OBJDIR}/hal.mangle: ${HAL_SRCS} ${PUBLIC}/syms.awk# ${STRIP} --strip-unneeded -o ${OBJDIR}/t.o ${OBJDIR}/hal.o cp ${OBJDIR}/hal.o ${OBJDIR}/t.o ${STRIP} --strip-unneeded ${OBJDIR}/t.o ${NM} -a ${OBJDIR}/t.o | grep -v ' U' | sed \ -e '/ath_hal_probe/d' \ -e '/ath_hal_attach/d' \ -e '/_ath_hal_attach/d' \ -e '/ath_hal_detach/d' \ -e '/ath_hal_init_channels/d' \ -e '/ath_hal_getwirelessmodes/d' \ -e '/ath_hal_computetxtime/d' \ -e '/ath_hal_mhz2ieee/d' \ -e '/ath_hal_ieee2mhz/d' \ -e '/ath_hal_version/d' \ -e '/ath_hal_buildopts/d' \ | ${AWK} -f ${PUBLIC}/syms.awk > ${OBJDIR}/hal.mangle rm -f t.o${OBJDIR}/hal-release.o: ${OBJDIR}/hal.o ${OBJDIR}/hal.mangle# ${STRIP} --strip-unneeded -o ${OBJDIR}/hal-release.o ${OBJDIR}/hal.o cp ${OBJDIR}/hal.o ${OBJDIR}/hal-release.o ${STRIP} --strip-unneeded ${OBJDIR}/hal-release.o ${OBJCOPY} `cat ${OBJDIR}/hal.mangle` ${OBJDIR}/hal-release.o
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -