From e96cab6e8637da48a34cf2f75dfac5547b715b3e Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 08 Aug 2021 21:39:45 +0800
Subject: [PATCH] update appweb build shell script

---
 3rdparty/appweb/build.sh |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/3rdparty/appweb/build.sh b/3rdparty/appweb/build.sh
index dd4c8d6..d23744d 100755
--- a/3rdparty/appweb/build.sh
+++ b/3rdparty/appweb/build.sh
@@ -7,13 +7,16 @@
 #|           1, Initialize 1.0.0 on 2011.04.12
 #+--------------------------------------------------------------------------------------------
 
+CROSS_COMPILE=no
+
 PRJ_PATH=`pwd`
-PREFIX_PATH=`pwd`/appweb
+PREFIX_PATH=${PRJ_PATH}/../appweb
+
 BOARD=RPI
 
 mkdir -p $PREFIX_PATH/{bin,modules}
 
-if [ -z  $CROSSTOOL ] ; then 
+if [ $CROSS_COMPILE = "yes" ] ; then 
     CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
 fi
 
@@ -51,7 +54,9 @@
     export STRIP=${CROSSTOOL}strip
 
     # export cross configure 
-    export CONFIG_CROSS=" --build=i686-pc-linux --host=arm-linux "
+    if [ $CROSS_COMPILE = "yes" ] ; then 
+        export CONFIG_CROSS=" --build=i686-pc-linux --host=arm-linux "
+    fi
 
     # Clear LDFLAGS and CFLAGS
     export LDFLAGS=
@@ -174,8 +179,6 @@
     ls -l appweb_${BOARD}.tar.gz 
 }
 
-
-export_cross
 
 compile_php
 

--
Gitblit v1.9.1