Permalink
Browse files

Merge pull request #1 from hungc/master

Use environment variables provided from the BBNDK installation.
  • Loading branch information...
2 parents 211e8a9 + 0eca146 commit 19357691c38fcb35752c240cee82abfa98c468be @hungc hungc committed Dec 12, 2011
Showing with 10 additions and 21 deletions.
  1. +0 −8 PlayBook-build/bbndk.env
  2. +9 −12 PlayBook-build/build.sh
  3. +1 −1 js/src/config/QNX6.6.0.mk
@@ -1,8 +0,0 @@
-# Change these to the proper locations for your setup.
-export BBNDK_DIR=/home/chung/bbndk-2.0.0
-export BBNDK_HOST="$BBNDK_DIR/host/linux/x86"
-export BBNDK_TARGET="$BBNDK_DIR/target/qnx6"
-
-export QNX_HOST=$BBNDK_HOST
-export QNX_TARGET=$BBNDK_TARGET
-export PATH=$PATH:$BBNDK_HOST/usr/bin
@@ -7,26 +7,23 @@ build_spidermonkey_for_playbook()
###########################################################################
set -e
- source bbndk.env
-
local BUILD_ROOT=`pwd`
###########################################################################
# Setup PlayBook Environment Variables #
###########################################################################
# ensure required BBNDK env variables are set
- : ${BBNDK_DIR:?"Error: BBNDK_DIR environment variable is not set."}
- : ${BBNDK_HOST:?"Error: BBNDK_HOST environment variable is not set."}
- : ${BBNDK_TARGET:?"Error: BBNDK_TARGET environment variable is not set."}
+ : ${QNX_HOST:?"Error: QNX_HOST environment variable is not set."}
+ : ${QNX_TARGET:?"Error: QNX_TARGET environment variable is not set."}
#set up env for cross-compiling for PlayBook
- export PATH=$BBNDK_HOST/usr/bin:$PATH
- export CC="$BBNDK_HOST/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp "
+ export PATH=$QNX_HOST/usr/bin:$PATH
+ export CC="$QNX_HOST/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp "
export CFLAGS="-V4.4.2,gcc_ntoarmv7le_cpp -g "
- export CPP="$BBNDK_HOST/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E"
- export LD="$BBNDK_HOST/usr/bin/ntoarmv7-ld "
- export RANLIB="$BBNDK_HOST/usr/bin/ntoarmv7-ranlib "
+ export CPP="$QNX_HOST/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E"
+ export LD="$QNX_HOST/usr/bin/ntoarmv7-ld "
+ export RANLIB="$QNX_HOST/usr/bin/ntoarmv7-ranlib "
###########################################################################
# Build SpiderMonkey 1.8.0 #
@@ -36,8 +33,8 @@ build_spidermonkey_for_playbook()
export JS_INSTALL_DIR=$BUILD_ROOT
local JS_TARGET=arm-unknown-nto-qnx6.5.0eabi
export SPIDERMONKEY_TARGET_OS=QNX
- export LDFLAGS="-L$BBNDK_TARGET/armle-v7/usr/lib -L$BBNDK_TARGET/armle-v7/lib"
- export CPPFLAGS="-D__QNXNTO__ -I$BBNDK_TARGET/usr/local/include"
+ export LDFLAGS="-L$QNX_TARGET/armle-v7/usr/lib -L$QNX_TARGET/armle-v7/lib"
+ export CPPFLAGS="-D__QNXNTO__ -I$QNX_TARGET/usr/include -I$QNX_TARGET/usr/local/include"
# Build release version
export BUILD_OPT=1
@@ -43,7 +43,7 @@
#CC = $(CC) #Build script will define this
CCC = $(CPP)
-CFLAGS += -Wall -Wno-format -MMD -D __QNX__ -D__QNXNTO__ -I$(BBNDK_TARGET)/usr/include
+CFLAGS += -Wall -Wno-format -MMD -D __QNX__ -D__QNXNTO__ -I$(QNX_TARGET)/usr/include
OS_CFLAGS = -DXP_UNIX

0 comments on commit 1935769

Please sign in to comment.