diff --git a/sys/modules/ath_hal/Makefile b/sys/modules/ath_hal/Makefile index f1cf9fca22d1..609db014f9e1 100644 --- a/sys/modules/ath_hal/Makefile +++ b/sys/modules/ath_hal/Makefile @@ -58,8 +58,13 @@ MFILES= kern/bus_if.m kern/device_if.m dev/pci/pci_if.m \ CFLAGS+= -I. -I${HAL}/freebsd -I${HAL} # patch for hal naming difference -ATH_MODULE_ARCH=${MACHINE_ARCH:S/amd64/x86_64/} -ATH_MODULE_ARCH=${MACHINE_ARCH:S/sparc64/sparc64-be/} +.if ${MACHINE_ARCH} == "amd64" +ATH_MODULE_ARCH=x86_64 +.elif ${MACHINE_ARCH} == "sparc64" +ATH_MODULE_ARCH=sparc64-be +.else +ATH_MODULE_ARCH=${MACHINE_ARCH} +.endif .if defined(HAL_SRC) .include "${HAL}/freebsd/Makefile.inc"