Files
secondo/CM-Scripts/secondo.setroot
2026-01-23 17:03:45 +08:00

90 lines
2.4 KiB
Plaintext

# bash Script for setting up a secondo environment
#
# The first argument is interpreted as SECONDO_BUILD_DIR
# copy this file to an apropriate location and set up
# an shell alias in your .bashrc file:
checkDir "SECONDO_SDK" $SECONDO_SDK
checkVar "SECONDO_PLATFORM" $SECONDO_PLATFORM
checkDir "J2SDK_ROOT" $J2SDK_ROOT
if [ -z $SETVAR_FIRST_CALL ]; then
export SETVAR_FIRST_CALL="true"
export COPY_OF_PATH=$PATH
export COPY_OF_LD_PATH=$LD_LIBRARY_PATH
fi
PATH=$COPY_OF_PATH
LD_LIBRARY_PATH=$COPY_OF_LD_PATH
if [ "$1" != "" ]; then
export SECONDO_BUILD_DIR=$1
else
export SECONDO_BUILD_DIR=$PWD
fi
export SECONDO_CONFIG=${SECONDO_BUILD_DIR}/bin/SecondoConfig.ini
# GCC: Set up search paths for header files and libraries
# Command line -I and -L switches will have a higher rule of
# precendence. Finally, some built in paths like /usr/include and
# usr/lib will be used.
sdk=$SECONDO_SDK
binPaths=""
libPaths=""
incPaths=""
for dir in gcc bdb swi bison flex auxtools; do
binPaths=$binPaths"$sdk/$dir/bin:"
libPaths=$libPaths"$sdk/$dir/lib:"
incPaths=$incPaths"$sdk/$dir/include:"
done
export CPLUS_INCLUDE_PATH=$incPaths
export C_INCLUDE_PATH=$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=$libPaths:${SECONDO_BUILD_DIR}/lib
# Bison
#export BISON_SIMPLE=${SECONDO_SDK}/bison/share/bison/bison.simple
# JNI
export JNI_INIT=${SECONDO_BUILD_DIR}/bin/JNI.ini
## Extend the search path
PATH=.:${J2SDK_ROOT}/bin:$binPaths:${PATH}
# The runtime linker uses different variables on Linux and Windows
if [ $SECONDO_PLATFORM != "win32" ]; then
checkVar "PL_LIB_DIR" $PL_LIB_DIR
pathList=${J2SDK_ROOT}/$J2SDK_LIB
pathList=${pathList}:${J2SDK_ROOT}/$J2SDK_JVMLIB
pathList=${pathList}:${libPaths}
pathList=${pathList}:${SECONDO_BUILD_DIR}/lib
pathList=${pathList}:${PL_LIB_DIR}
pathList=${pathList}:${LD_LIBRARY_PATH}
LD_LIBRARY_PATH=.:${pathList}
else
checkVar "MINGW_DIR" $MINGW_DIR
pathList=${J2SDK_ROOT}/jre/bin/client
pathList=${pathList}:${MINGW_DIR}
pathList=${pathList}:${libPaths}
pathList=${pathList}:${SECONDO_BUILD_DIR}/lib
pathList=${pathList}:${SECONDO_SDK}/pl/bin
PATH=${PATH}:${pathList}
fi
# Some general path extensions
PATH=${PATH}:${SECONDO_BUILD_DIR}/Tools/pd
PATH=${PATH}:${SECONDO_BUILD_DIR}/CM-Scripts
PATH=${PATH}:${SECONDO_BUILD_DIR}/bin
export PATH LD_LIBRARY_PATH
# PD related settings
export PD_HEADER=${SECONDO_BUILD_DIR}/Tools/pd/pd.header