Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .
#!/bin/sh
 
#######################################################################
# Guess build parameters
###
 
KERNELPATH=/lib/modules/`uname -r`/build
KERNELRELEASE=`uname -r`
MODULEPATH=/lib/modules/`uname -r`/extra
WIRELESSEXT=`gcc -include linux/wireless.h -E -dM -x c /dev/null |\
             grep "\#define WIRELESS_EXT" |\
             cut -d ' ' -f3`
#######################################################################
 
echo KERNELPATH=$KERNELPATH
echo KERNELRELEASE=$KERNELRELEASE
echo MODULEPATH=$MODULEPATH
echo WIRELESSEXT=$WIRELESSEXT
 
# run make with the guessted parameters
runmake() {
        make KERNELPATH=$KERNELPATH \
             KERNELRELEASE=$KERNELRELEASE \
             MODULEPATH=$MODULEPATH \
             WIRELESSEXT=$WIRELESSEXT \
             "$@"
}
 
# Check if make install is used
checkmakeinstall() {
        local   i
 
        for i in "$@"; do
                if [ "$i" = install ]; then
                        return 1
                fi
        done
 
        return 0
}
 
runmake "$@"
 
if [ $? = 0 ] && checkmakeinstall "$@"; then
        echo
        echo "============================================================"
        echo "Congratulations, madwifi successfully compiled!"
        echo "Please run SuSEbuild install as a root to install the driver"
        echo "============================================================"
fi