xref: /titanic_51/usr/src/uts/intel/ath/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
17a1306a7Sxc151355#
27a1306a7Sxc151355# CDDL HEADER START
37a1306a7Sxc151355#
47a1306a7Sxc151355# The contents of this file are subject to the terms of the
5bb25c06cSjg# Common Development and Distribution License (the "License").
6bb25c06cSjg# You may not use this file except in compliance with the License.
77a1306a7Sxc151355#
87a1306a7Sxc151355# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97a1306a7Sxc151355# or http://www.opensolaris.org/os/licensing.
107a1306a7Sxc151355# See the License for the specific language governing permissions
117a1306a7Sxc151355# and limitations under the License.
127a1306a7Sxc151355#
137a1306a7Sxc151355# When distributing Covered Code, include this CDDL HEADER in each
147a1306a7Sxc151355# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157a1306a7Sxc151355# If applicable, add the following below this CDDL HEADER, with the
167a1306a7Sxc151355# fields enclosed by brackets "[]" replaced with your own identifying
177a1306a7Sxc151355# information: Portions Copyright [yyyy] [name of copyright owner]
187a1306a7Sxc151355#
197a1306a7Sxc151355# CDDL HEADER END
207a1306a7Sxc151355#
217a1306a7Sxc151355#
22d444b03eSAli Bahrami# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
237a1306a7Sxc151355# Use is subject to license terms.
247a1306a7Sxc151355#
257a1306a7Sxc151355
267a1306a7Sxc151355#
277a1306a7Sxc151355#	This file makes the atheros driver for an intel system
287a1306a7Sxc151355#
297a1306a7Sxc151355#	intel architecture dependent
307a1306a7Sxc151355#
317a1306a7Sxc151355
327a1306a7Sxc151355#
337a1306a7Sxc151355#	Path to the base of the uts directory tree (usually /usr/src/uts).
347a1306a7Sxc151355#
357a1306a7Sxc151355UTSBASE	= ../..
367a1306a7Sxc151355#
377a1306a7Sxc151355#	Define the module and object file sets.
387a1306a7Sxc151355#
397a1306a7Sxc151355MODULE		= ath
407a1306a7Sxc151355OBJECTS		= $(ATH_OBJS:%=$(OBJS_DIR)/%) $(OBJS_DIR)/hal.o
417a1306a7Sxc151355LINTS		= $(LINTS_DIR)/ath_aux.ln \
427a1306a7Sxc151355		$(LINTS_DIR)/ath_main.ln \
437a1306a7Sxc151355		$(LINTS_DIR)/ath_osdep.ln \
440ba2cbe9Sxc151355		$(LINTS_DIR)/ath_rate.ln
457a1306a7Sxc151355
467a1306a7Sxc151355ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
477a1306a7Sxc151355
487a1306a7Sxc151355#
497a1306a7Sxc151355#	Include common rules.
507a1306a7Sxc151355#
517a1306a7Sxc151355include $(UTSBASE)/intel/Makefile.intel
527a1306a7Sxc151355
537a1306a7Sxc151355#
547a1306a7Sxc151355#	Define targets
557a1306a7Sxc151355#
567a1306a7Sxc151355ALL_TARGET	= $(BINARY)
577a1306a7Sxc151355LINT_TARGET	= $(MODULE).lint
587a1306a7Sxc151355INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
597a1306a7Sxc151355
607a1306a7Sxc151355#
610ba2cbe9Sxc151355#	Driver depends on GLDv3 & wifi kernel support module.
627a1306a7Sxc151355#
630ba2cbe9Sxc151355LDFLAGS		+= -dy -Nmisc/mac -Nmisc/net80211
647a1306a7Sxc151355
65*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-type-limits
66*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
67*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-empty-body
68*7014882cSRichard Lowe
697a1306a7Sxc151355#
707a1306a7Sxc151355#	Default build targets.
717a1306a7Sxc151355#
727a1306a7Sxc151355.KEEP_STATE:
737a1306a7Sxc151355
747a1306a7Sxc151355def:		$(DEF_DEPS)
757a1306a7Sxc151355
767a1306a7Sxc151355all:		$(ALL_DEPS)
777a1306a7Sxc151355
787a1306a7Sxc151355clean:		$(CLEAN_DEPS)
797a1306a7Sxc151355
807a1306a7Sxc151355clobber:	$(CLOBBER_DEPS)
817a1306a7Sxc151355
827a1306a7Sxc151355lint:		$(LINT_DEPS)
837a1306a7Sxc151355
847a1306a7Sxc151355modlintlib:	$(MODLINTLIB_DEPS)
857a1306a7Sxc151355
867a1306a7Sxc151355clean.lint:	$(CLEAN_LINT_DEPS)
877a1306a7Sxc151355
887a1306a7Sxc151355install:	$(INSTALL_DEPS)
897a1306a7Sxc151355
907a1306a7Sxc151355#
917a1306a7Sxc151355#	Include common targets.
927a1306a7Sxc151355#
937a1306a7Sxc151355include $(UTSBASE)/intel/Makefile.targ
947a1306a7Sxc151355
957a1306a7Sxc151355#
967a1306a7Sxc151355#	If you have any special case that general
977a1306a7Sxc151355#	Makefile rules don't serve for you, just do
987a1306a7Sxc151355#	it yourself.
997a1306a7Sxc151355#
100d444b03eSAli Bahrami#	The amd64 version of this object has the .eh_frame section tagged
101d444b03eSAli Bahrami#	as SHT_PROGBITS, while the ABI requires SHT_AMD64_UNWIND. The Solaris
102d444b03eSAli Bahrami#	ld enforces this, so use elfedit to bring the object in line with
103d444b03eSAli Bahrami#	this requirement.
104d444b03eSAli Bahrami#
1057a1306a7Sxc151355ATHEROS_HAL=$(UTSBASE)/common/io/ath/hal_x86_$(CLASS).o.uu
1067a1306a7Sxc151355$(OBJS_DIR)/hal.o:     $(ATHEROS_HAL)
1077a1306a7Sxc151355	uudecode -o $@ $(ATHEROS_HAL)
108d444b03eSAli Bahrami	if [ `elfedit -r -e 'ehdr:e_machine' $@` = EM_AMD64 ]; \
109d444b03eSAli Bahrami		then elfedit -e 'shdr:sh_type .eh_frame SHT_AMD64_UNWIND' $@; fi
110