]> oss.titaniummirror.com Git - cp210x.git/blobdiff - src/configure
Support Ubuntu 14.04 Trusty Tahr
[cp210x.git] / src / configure
index 1d20a181385529f52e49501287e70f5e64283d2c..32725a2c9e050340475e852217a1dd79ddf4777d 100755 (executable)
@@ -24,21 +24,21 @@ CONFIG_FILE="Makefile.config"
 
 while (($# > 0)) ; do
     if [ "$1" == "-help" ] || [ "$1" == "-h" ] ; then
-        usage
+       usage
        exit 0   
     elif [ "$1" == "-kinc" ] ; then
        if [ "$2" == "" ] ; then
            usage
            exit 1
        fi
-        LINUX_INCLUDE="$2"
+       LINUX_INCLUDE="$2"
        shift 2
     elif [ "$1" == "-kpath" ] ; then
        if [ "$2" == "" ] ; then
            usage
            exit 1
        fi
-        LINUX_KERNEL="$2"
+       LINUX_KERNEL="$2"
        shift 2
     elif [ "$1" == "-kver" ] ; then
        if [ "$2" == "" ] ; then
@@ -52,11 +52,11 @@ while (($# > 0)) ; do
            usage
            exit 1
        fi
-        INSTALL_PREFIX="$2"
+       INSTALL_PREFIX="$2"
        shift 2
     else
-        echo "ERROR: Unknown option $1"
-        exit 1
+       echo "ERROR: Unknown option $1"
+       exit 1
     fi
 done
 
@@ -88,14 +88,29 @@ KVER1=`echo $KVER | awk -F . -- '{ print $1 }'`
 KVER2=`echo $KVER | awk -F . -- '{ print $2 }'`
 KVER3=`echo $KVER | sed -e "s/$KVER1\\.$KVER2\\.//g"`
 
-case $KVER2 in
-    4)
-       makefile="Makefile24"
-       EXT=".o"
+case $KVER1 in
+    2)
+       case $KVER2 in
+           4)
+               makefile="Makefile24"
+               EXT=".o"
+               ;;
+           6)
+               makefile="Makefile26"
+               EXT=".ko"
+               ;;
+       esac
        ;;
-    6)
-       makefile="Makefile26"
+    3)
        EXT=".ko"
+       case $KVER2 in
+           2)
+               makefile="Makefile32"
+               ;;
+           13)
+               makefile="Makefile313"
+               ;;
+       esac
        ;;
 esac