7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# CDDL HEADER START
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# The contents of this file are subject to the terms of the
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# Common Development and Distribution License (the "License").
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg# You may not use this file except in compliance with the License.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# or http://www.opensolaris.org/os/licensing.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# See the License for the specific language governing permissions
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# and limitations under the License.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# When distributing Covered Code, include this CDDL HEADER in each
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# If applicable, add the following below this CDDL HEADER, with the
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# fields enclosed by brackets "[]" replaced with your own identifying
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# information: Portions Copyright [yyyy] [name of copyright owner]
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# CDDL HEADER END
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Use is subject to license terms.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# This file makes the atheros driver for an intel system
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# intel architecture dependent
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Path to the base of the uts directory tree (usually /usr/src/uts).
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcUTSBASE = ../..
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Define the module and object file sets.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcMODULE = ath
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcOBJECTS = $(ATH_OBJS:%=$(OBJS_DIR)/%) $(OBJS_DIR)/hal.o
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcLINTS = $(LINTS_DIR)/ath_aux.ln \
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc $(LINTS_DIR)/ath_main.ln \
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc $(LINTS_DIR)/ath_osdep.ln \
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc $(LINTS_DIR)/ath_rate.ln
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Include common rules.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcinclude $(UTSBASE)/intel/Makefile.intel
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Define targets
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcALL_TARGET = $(BINARY)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcLINT_TARGET = $(MODULE).lint
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxc# Driver depends on GLDv3 & wifi kernel support module.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
0ba2cbe97e0678a691742f98d2532caed0a2c4aaxcLDFLAGS += -dy -Nmisc/mac -Nmisc/net80211
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-type-limits
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-variable
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-empty-body
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Default build targets.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc.KEEP_STATE:
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcdef: $(DEF_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcall: $(ALL_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcclean: $(CLEAN_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcclobber: $(CLOBBER_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xclint: $(LINT_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcmodlintlib: $(MODLINTLIB_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcclean.lint: $(CLEAN_LINT_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcinstall: $(INSTALL_DEPS)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Include common targets.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcinclude $(UTSBASE)/intel/Makefile.targ
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# If you have any special case that general
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# Makefile rules don't serve for you, just do
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc# it yourself.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc#
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami# The amd64 version of this object has the .eh_frame section tagged
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami# as SHT_PROGBITS, while the ABI requires SHT_AMD64_UNWIND. The Solaris
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami# ld enforces this, so use elfedit to bring the object in line with
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami# this requirement.
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami#
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcATHEROS_HAL=$(UTSBASE)/common/io/ath/hal_x86_$(CLASS).o.uu
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc$(OBJS_DIR)/hal.o: $(ATHEROS_HAL)
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc uudecode -o $@ $(ATHEROS_HAL)
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami if [ `elfedit -r -e 'ehdr:e_machine' $@` = EM_AMD64 ]; \
d444b03e85973a0566ba10d94e6f65ca1a6b21faAli Bahrami then elfedit -e 'shdr:sh_type .eh_frame SHT_AMD64_UNWIND' $@; fi