Convert existing ath users to new Makefile, except for amd64, which needs

the rules due to needing to conditionally postprocess the HAL object file.

Macppc needs a a non-ELF HAL (EABI) object, so take care of that by default
in the atheros include file.
This commit is contained in:
gdamore 2006-04-04 03:13:12 +00:00
parent 344266fa22
commit 75670ddc44
12 changed files with 38 additions and 91 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.amd64,v 1.12 2006/04/02 05:52:14 gdamore Exp $
# $NetBSD: Makefile.amd64,v 1.13 2006/04/04 03:13:12 gdamore Exp $
# Makefile for NetBSD
#
@ -102,12 +102,16 @@ clock.o: config_time.h
%LOAD
%RULES
## Include rules for Atheros WLAN
.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc"
# XXX - Ugly, but make doesn't easily handle .o.uu (assumes it's a suffix)
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
# It needs a pathname of some sort for "object"
.if !empty(OBJS:M\/athhal-x86_64-elf.hal.o)
OBJS:=${OBJS:C/\/athhal-x86_64-elf.hal.o/athhal-x86_64-elf.hal.o/}
.if !empty(OBJS:M\/athhal.o)
OBJS:=${OBJS:C/\/athhal.o/athhal.o/}
.PATH: $S/contrib/dev/ath/public
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
@ -116,7 +120,7 @@ ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
rm -f ${.TARGET}; \
${UUDECODE} -p $> > ${.TARGET}
athhal-x86_64-elf.hal.o: x86_64-elf.hal.o.uu
athhal.o: x86_64-elf.hal.o.uu
${ATH_UUDEC}
.if defined(COPTS) && !empty(COPTS:M-fno-asynchronous-unwind-tables)
${_MKSHECHO}\

View File

@ -1,4 +1,4 @@
# $NetBSD: files.amd64,v 1.21 2006/02/12 18:16:01 tron Exp $
# $NetBSD: files.amd64,v 1.22 2006/04/04 03:13:12 gdamore Exp $
#
# new style config file for amd64 architecture
#
@ -198,7 +198,4 @@ include "dev/ieee1394/files.ieee1394"
include "dev/acpi/files.acpi"
file arch/amd64/acpi/acpi_wakeup.c acpi
# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL)
object /athhal-x86_64-elf.hal.o ath
include "arch/amd64/conf/majors.amd64"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.i386,v 1.143 2006/04/02 05:52:14 gdamore Exp $
# $NetBSD: Makefile.i386,v 1.144 2006/04/04 03:13:12 gdamore Exp $
# Makefile for NetBSD
#
@ -107,21 +107,8 @@ clock.o: config_time.h
%RULES
# XXX - Ugly, but make doesn't easily handle .o.uu (assumes it's a suffix)
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
# It needs a pathname of some sort for "object"
.if !empty(OBJS:M\/athhal-i386-elf.hal.o)
OBJS:=${OBJS:C/\/athhal-i386-elf.hal.o/athhal-i386-elf.hal.o/}
.PATH: $S/contrib/dev/ath/public
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${UUDECODE} -p $> \> ${.TARGET}; \
rm -f ${.TARGET}; \
${UUDECODE} -p $> > ${.TARGET}
athhal-i386-elf.hal.o: i386-elf.hal.o.uu
${ATH_UUDEC}
.endif
## Include rules for Atheros WLAN
.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc"
##
## (9) port independent kernel machinery

View File

@ -1,4 +1,4 @@
# $NetBSD: files.i386,v 1.284 2006/03/31 00:03:57 rittera Exp $
# $NetBSD: files.i386,v 1.285 2006/04/04 03:13:12 gdamore Exp $
#
# new style config file for i386 architecture
#
@ -507,7 +507,4 @@ defflag opt_est.h EST_FREQ_USERWRITE
# AMD PowerNow K7
file arch/i386/i386/powernow_k7.c powernow_k7
# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL)
object /athhal-i386-elf.hal.o ath
include "arch/i386/conf/majors.i386"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.macppc,v 1.26 2006/04/02 05:52:14 gdamore Exp $
# $NetBSD: Makefile.macppc,v 1.27 2006/04/04 03:13:12 gdamore Exp $
#
# Makefile for NetBSD
#
@ -113,21 +113,8 @@ setfault.o: assym.h
%RULES
# XXX - Ugly, but make doesn't easily handle .o.uu (assumes it's a suffix)
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
# It needs a pathname of some sort for "object"
.if !empty(OBJS:M\/athhal-powerpc-be-elf.hal.o)
OBJS:=${OBJS:C/\/athhal-powerpc-be-elf.hal.o/athhal-powerpc-be-elf.hal.o/}
.PATH: $S/contrib/dev/ath/public
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${UUDECODE} -p $> \> ${.TARGET}; \
rm -f ${.TARGET}; \
${UUDECODE} -p $> > ${.TARGET}
athhal-powerpc-be-elf.hal.o: powerpc-be-elf.hal.o.uu
${ATH_UUDEC}
.endif
## Include rules for Atheros WLAN
.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc"
##
## (9) port independent kernel machinery

View File

@ -1,4 +1,4 @@
# $NetBSD: files.macppc,v 1.72 2006/02/12 21:00:46 macallan Exp $
# $NetBSD: files.macppc,v 1.73 2006/04/04 03:13:12 gdamore Exp $
#
# macppc-specific configuration info
@ -215,9 +215,6 @@ device snapper: audiobus, auconv, mulaw, aurateconv
attach snapper at obio
file arch/macppc/dev/snapper.c snapper
# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL)
object /athhal-powerpc-be-eabi.hal.o ath
include "arch/macppc/conf/majors.macppc"
attach adt7467c at ki2c with adt7467_ki2c

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.sparc64,v 1.61 2006/04/02 05:52:14 gdamore Exp $
# $NetBSD: Makefile.sparc64,v 1.62 2006/04/04 03:13:12 gdamore Exp $
#=========================================================================
#
@ -144,21 +144,8 @@ machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile
%RULES
# XXX - Ugly, but make doesn't easily handle .o.uu (assumes it's a suffix)
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
# It needs a pathname of some sort for "object"
.if !empty(OBJS:M\/athhal-sparc64-be-elf.hal.o)
OBJS:=${OBJS:C/\/athhal-sparc64-be-elf.hal.o/athhal-sparc64-be-elf.hal.o/}
.PATH: $S/contrib/dev/ath/public
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${UUDECODE} -p $> \> ${.TARGET}; \
rm -f ${.TARGET}; \
${UUDECODE} -p $> > ${.TARGET}
athhal-sparc64-be-elf.hal.o: sparc64-be-elf.hal.o.uu
${ATH_UUDEC}
.endif
## Include rules for Atheros WLAN
.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc"
##
## (9) port independent kernel machinery

View File

@ -1,4 +1,4 @@
# $NetBSD: files.sparc64,v 1.98 2006/03/02 10:44:33 martin Exp $
# $NetBSD: files.sparc64,v 1.99 2006/04/04 03:13:12 gdamore Exp $
# @(#)files.sparc64 8.1 (Berkeley) 7/19/93
# sparc64-specific configuration info
@ -201,9 +201,6 @@ file arch/sparc64/sparc64/db_disasm.c ddb
include "dev/wscons/files.wscons"
include "dev/wsfont/files.wsfont"
# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL)
object /athhal-sparc64-be-elf.hal.o ath
# USB Support
include "dev/usb/files.usb"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.xen,v 1.15 2006/04/02 05:52:14 gdamore Exp $
# $NetBSD: Makefile.xen,v 1.16 2006/04/04 03:13:12 gdamore Exp $
# NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp
# Makefile for NetBSD
@ -123,21 +123,8 @@ clock.o: config_time.h
%RULES
# XXX - Ugly, but make doesn't easily handle .o.uu (assumes it's a suffix)
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
# It needs a pathname of some sort for "object"
.if !empty(OBJS:M\/athhal-i386-elf.hal.o)
OBJS:=${OBJS:C/\/athhal-i386-elf.hal.o/athhal-i386-elf.hal.o/}
.PATH: $S/contrib/dev/ath/public
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${UUDECODE} -p $> \> ${.TARGET}; \
rm -f ${.TARGET}; \
${UUDECODE} -p $> > ${.TARGET}
athhal-i386-elf.hal.o: i386-elf.hal.o.uu
${ATH_UUDEC}
.endif
## Include rules for Atheros WLAN
.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc"
##
## (9) port independent kernel machinery

View File

@ -1,4 +1,4 @@
# $NetBSD: files.xen,v 1.38 2006/03/19 00:36:09 bouyer Exp $
# $NetBSD: files.xen,v 1.39 2006/04/04 03:13:12 gdamore Exp $
# NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp
# NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp
@ -176,9 +176,6 @@ include "dev/pci/files.agp"
file arch/i386/pci/agp_machdep.c agp
file arch/xen/xen/pciide_machdep.c pciide_common
# Atheros 5210/5211/5212 Hardware Abstraction Layer (HAL)
object /athhal-i386-elf.hal.o ath
#
# Machine-independent ISA devices
#

View File

@ -1,4 +1,4 @@
# $NetBSD: files,v 1.765 2006/04/02 05:52:14 gdamore Exp $
# $NetBSD: files,v 1.766 2006/04/04 03:13:12 gdamore Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@ -518,6 +518,7 @@ file dev/ic/ath.c ath
file dev/ic/ath_netbsd.c ath
file dev/ic/athrate-sample.c ath
file contrib/dev/ath/netbsd/ah_osdep.c ath
object /athhal.o ath
# ADMtek ADM8211 802.11
#

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.ath.inc,v 1.1 2006/04/04 01:26:53 gdamore Exp $
# $NetBSD: Makefile.ath.inc,v 1.2 2006/04/04 03:13:12 gdamore Exp $
# Rules for building a HAL on various platforms. We put them here
# to centralize them all in one place.
@ -12,7 +12,16 @@
## hardware (R3000).
##
.if ${MACHINE_ARCH} == "alpha"
#
# First we look for some specific MACHINEs that we know about
#
.if ${MACHINE} == "macppc"
ATH_HAL=powerpc-be-eabi
#
# Then use use MACHINE_ARCH if we still don't know
#
.elif ${MACHINE_ARCH} == "alpha"
ATH_HAL=alpha-elf
.elif ${MACHINE_ARCH} == "arm"