Fill in the following lines into your .bashrc file. This allows you to change your profile to e.g. "Embedded Development" calling qtopieemb on the commandline.
alias qtopie2953='/bin/bash --rcfile ~/.goqtopiearm2953rc'
alias qtopiesharp='/bin/bash --rcfile ~/.goqtopiearmsharprc'
alias qtopiesuse='/bin/bash --rcfile ~/.goqtopiearmsuserc'
alias qtopieemb='/bin/bash --rcfile ~/.goqtopieembrc'
alias qtx11='/bin/bash --rcfile ~/.goqtx11rc'
This subsection shows the script .goqtopiearmsharprc
#!/bin/bash
#
# .goqtopiearmsharprc
# 11.10.03 - sc V0.1.6
# 09.11.03 - sc V0.1.7
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
TEMPFILE="$HOME/_sharpprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=$TCDPATH/Embedix/tools
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=$TCDPATH/linux-arm-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=$TCDPATH/qt2opie-sharp
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=$TCDPATH/opie-sharp
OPIEDIR=$TCDPATH/opie-sharp
ADDOPIE=$TCDPATH/addopie/sharp
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR ADDOPIE
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$ADDOPIE/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I$TCDPATH/include/sharp \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Libnrary PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$ADDOPIE/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L$TCDPATH/lib/sharp \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-ld
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1="[QT-CDOPIESHARP]:\w\$ "
This subsection shows the script .goqtopiearm2953rc
#!/bin/bash
#
# .goqtopiearm2953rc
# 09.11.03 - sc V0.1.7
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
TEMPFILE="$HOME/_ipaqprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=$TCDPATH/arm/2.95.3
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=$TCDPATH/linux-ipaq3600-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=$TCDPATH/qt2opie-ipaq
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=$TCDPATH/opie-ipaq
OPIEDIR=$TCDPATH/opie-ipaq
ADDOPIE=$TCDPATH/addopie/ipaq
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR ADDOPIE
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
#-------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$ADDOPIE/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I$TCDPATH/include/ipaq \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Library PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$ADDOPIE/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L$TCDPATH/lib/ipaq \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-gcc
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/arm-linux-strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1='[QT-CDOPIE2953]:\w\$ '
This subsection shows the script .goqtopiearm323rc
Note, that this script will try to detect you glibc version and uses a different compilerpath, if glibc-2.2 is detected. The toolchain behind that is is unfortunately not completed. It may only be used to build the pxa kernel. The c++ compilers are still missing. Im working on that ...
#!/bin/bash
#
# .goqtopiearm323rc
# 11.10.03 - sc V0.1.6
# 01.11.03 - sc V0.1.7
# tries to find out, which glibc (2.3 or 2.2) is used
# and uses the fitting compiler
# default is 2.2
# 09.11.03 - sc V0.1.8
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
GLIBCAPP="-glibc-2.2"
GLIBCTYPE=`grep -c GLIBC_2.3 /lib/libc.so.6`
if [ "$GLIBCTYPE" != "0" ];then
GLIBCAPP=""
fi
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
TEMPFILE="$HOME/_ipaqprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=$TCDPATH/arm/3.2.3$GLIBCAPP
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=$TCDPATH/linux-xscale-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=$TCDPATH/qt2opie-ipaq
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=$TCDPATH/opie-ipaq
OPIEDIR=$TCDPATH/opie-ipaq
ADDOPIE=$TCDPATH/addopie/ipaq
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR ADDOPIE
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
#-------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$ADDOPIE/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I$TCDPATH/include/ipaq \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Library PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$ADDOPIE/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L$TCDPATH/lib/ipaq \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-gcc
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/arm-linux-strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1='[QT-CDOPIE323]:\w\$ '
This subsection shows the script .goqtopiearmsuserc
#!/bin/bash
#
# .goqtopiearmsuserc
# 11.10.03 - sc V0.1.6
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm), Sharp compiler
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=/opt/cross
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/local/armdev/linux-arm-kernel
# QTDIR is the directory, where the QTE library is located.
QTDIR=/usr/lib/qt2opie-arm
# OPIEDIR is the directory, where the OPIE-ARM-Directory is located.
OPIEDIR=/usr/lib/opie-arm
# PATH has to be added by QTDIR and COMPILER-PATH bins.
PATH=$QTDIR/bin:$COMPILER_PATH/bin:$PATH
export COMPILER_PATH KERNEL_PATH PATH QTDIR OPIEDIR
# required for kdevelop 2.1.5 ---
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
# required for opie dev boot CDs kdevelop usage
export QTLINKBASE=/usr/lib
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-ld
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Libnrary PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# set the prompt ...
PS1="[QT-OPIEARMSUSE]$PS1"
This subsection shows the script .goqtopieembrc
#!/bin/bash
#
# .goqtopieembrc
# 09.11.03 - sc V0.1.7
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (emb)
# -------------------------------------------------
TEMPFILE="$HOME/_embprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-EMB-Directory is located.
QTDIR=$TCDPATH/qt2opie-emb
# QPEDIR is the directory, where the QPE-EMB-Directory is located.
QPEDIR=$TCDPATH/opie-emb
OPIEDIR=$TCDPATH/opie-emb
ADDOPIE=
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
# embedded mit LD_LIBRARY_PATH to find embedded stuff.
LD_LIBRARY_PATH=/usr/local/lib-emb:$QTDIR/lib:$OPIEDIR/lib:$LD_LIBRARY_PATH:$LD_LIBRARY_PATH_SAVE
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH LD_LIBRARY_PATH QVFB_PATH
export QPEDIR OPIEDIR ADDOPIE
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I/usr/local/include-emb"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Libnrary PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L/usr/local/lib-emb"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-emb
INC_INST_PATH=/usr/local/include-emb
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=gcc
CXX=g++
CCX=gcc
CXXX=g++
COMPILER=gcc
LINKER=g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1="[QT-CDOPIEEMB]:\w\$ "
This subsection shows the script .goqtx11rc
#!/bin/bash
#
# .goqtx11rc
# 11.10.03 - sc V0.1.6
# -------------------------------------------------
# sets some Environment variables for QT X11
# compiling (x11)
# -------------------------------------------------
# PATHs .....
# Compiler-Path is the directory, where your compiler
# is located (for the embedded its not necessary).
# It is used to find the compiler includes.
COMPILER_PATH=
# Kernel-Path is the directory, where your Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=/usr/src/linux
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=/usr/local/bin
# QTDIR is the directory, where the QT-Directory is located.
QTDIR=/usr/lib/qt2
# PATH has to be added by QTDIR bins.
PATH=$QTDIR/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH
# required for kdevelop 2.1.5 ---
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
# required for opie dev boot CDs kdevelop usage
export QTLINKBASE=/usr/lib
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=o
SO_EXT=so
LIB_EXT=so
HEADER_EXT=h
CPP_EXT=cpp
export _EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I/usr/local/include"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Libnrary PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L/usr/local/lib"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib
INC_INST_PATH=/usr/local/include
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=gcc
CXX=g++
CCX=gcc
CXXX=g++
COMPILER=gcc
LINKER=g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CCX CXX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqt"
KDEVXT_LIB=""
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
OPTIONS="-fno-exceptions -pipe"
export OPTIONS
# set the prompt ...
PS1="[QT-X11]$PS1"
Here is the qte compilation script source.
#!/bin/sh
######################################################################################################
# _makeqte.rc : qte build script from werner@schulte-ac.de
# Author : Werner Schulte
# email : werner@schulte-ac.de
# licence : GPL
# --------------------------------------------------------------------------------------------------
# This script allows to build qte by answering some questions.
# The script tries to store the inputs in an tempfile (_makeqte.tmp)
# in your home dir. Multiple runs suggest the last inputs than.
#
# The script uses different environment scripts to configure the right
# usage of the qte build.
# For more information and newest versions see http://www.uv-ac.de/opiedev
# --------------------------------------------------------------------------------------------------
# V0.1.0
# V0.1.1 : 29.10.03 - BASEENVI used to find the environment scripts (OPIEDEVCD)
# - EXTRA_INC_PATH, EXTRA_LIB_PATH
# will be cleared (confuse qte compilation, if different version is compiled)
# - QTEDIR is always $PWD (to get the right includes)
######################################################################################################
TARGET=$1
CONFIGURE=$2
COMPIL=""
QTETEMPFILE=$HOME/_makeqte.tmp
# ---------------------------------------------
# set the last environment variables
# ---------------------------------------------
set_old_values()
{
if [ -e $QTETEMPFILE ];then
. $QTETEMPFILE
fi
}
# ---------------------------------------------
# request first config variables
# ---------------------------------------------
get_new_values()
{
if [ "$CLEAN" == "" ];then
echo -n "clean directory ? [Y]es,[n]o : $CLN "
read CLEAN
if [ "$CLEAN" == "" ];then
CLEAN=$CLN
fi
fi
if [ "$CLEAN" == "Y" ];then
CONFIGURE="Y"
else
if [ "$CONFIGURE" == "" ];then
echo -n "include configure ? [Y]es,[n]o : $MCONF "
read CONFIGURE
if [ "$CONFIGURE" == "" ];then
CONFIGURE=$MCONF
fi
fi
fi
# create target entry
if [ "$TARGET" == "" ];then
echo -n "Please select target [e]mb,[i]paq,[z]aurus : $TARG "
read TARGET
if [ "$TARGET" == "" ];then
TARGET=$TARG
fi
fi
if [ "$TARGET" == "i" ] || [ "TARGET" == "I" ] || [ "$TARGET" == "ipaq" ] || \
[ "$TARGET" == "z" ] || [ "TARGET" == "Z" ] || [ "$TARGET" == "zaurus" ]
then
if [ "$COMPIL" == "" ];then
echo -n "Please select compiler [s]kiff,[2]953,[3]23,[n]etwinder,s[h]arp,s[u]se : $COMP "
read COMPIL
if [ "$COMPIL" == "" ];then
COMPIL=$COMP
fi
fi
fi
if [ "$CONFIGURE" == "Y" ];then
echo $CONFFLAGS $COFLAGS
# create convflags entry
if [ "$CONFFLAGS" == "" ];then
echo -n "Please enter confflags : $COFLAGS "
read CONFFLAGS
if [ "$CONFFLAGS" == "" ];then
CONFFLAGS=$COFLAGS
fi
fi
else
CONFFLAGS=$COFLAGS
fi
}
# ---------------------------------------------
# set compiler environment variables
# ---------------------------------------------
set_compiler_env()
{
echo checking for COMPIL=$COMPIL
case "$COMPIL" in
s )
echo "using skiff cross compiler ... "
. $BASEENVI/.goqtopiearmskiffrc
;;
2 )
echo "using 2953 cross compiler ... "
. $BASEENVI/.goqtopiearm2953rc
;;
3 )
echo "using 32 cross compiler ... "
. $BASEENVI/.goqtopiearm323rc
;;
n )
echo "using netwinder cross compiler ... "
. $BASEENVI/.goqtopiearmnetwinderrc
;;
h )
echo "using sharp cross compiler ... "
. $BASEENVI/.goqtopiearmsharprc
;;
u )
echo "using suse cross compiler ... "
. $BASEENVI/.goqtopiearmsuserc
;;
* )
echo "invalid crosscompiler entered, exiting ... "
exit 3
;;
esac
}
# ---------------------------------------------
# set all environment variable
# ---------------------------------------------
set_target_env()
{
case "$TARGET" in
e | E | emb )
echo "Target EMB selected ... "
. $BASEENVI/.goqtopieembrc
;;
i | I | ipaq )
echo "Target IPAQ selected ... "
set_compiler_env
;;
z | Z | zaurus )
echo "Target ZAURUS selected ... "
set_compiler_env
;;
* )
echo "No valid target found, exiting ... "
exit 1
;;
esac
}
# ---------------------------------------------
# choose the QTDIR directory
# has to be called after target script is executed
# ---------------------------------------------
get_qtdir()
{
if [ "$QTD" == "" ];then
echo -n "your QTDIR location ? $PWD : "
read QTD
if [ "$QTD" == "" ];then
QTD=$PWD
fi
fi
}
# ---------------------------------------------
# write the input into the environment file
# ---------------------------------------------
write_result ()
{
echo "#!/bin/sh" > $QTETEMPFILE
echo "# automatically stored during last scdomake run" >> $QTETEMPFILE
echo "export MCONF=$CONFIGURE" >> $QTETEMPFILE
echo "export CLN=$CLEAN" >> $QTETEMPFILE
echo "export TARG=$TARGET" >> $QTETEMPFILE
echo "export QTDIR=$QTD" >> $QTETEMPFILE
echo "export COMP=$COMPIL" >> $QTETEMPFILE
echo "export COFLAGS=\"$CONFFLAGS\"" >> $QTETEMPFILE
}
show_result ()
{
echo ------------------------------------
echo "export MCONF=$CONFIGURE"
echo "export CLN=$CLEAN"
echo "export TARG=$TARGET"
echo "export QTDIR=$QTD"
echo "export COMP=$COMPIL"
echo "export CONFFLAGS=\"$CONFFLAGS\""
echo
echo "COMPILER_PATH=$COMPILER_PATH"
echo "COMPILER=$CXX"
which $CXX
echo "BASE environment path=\"$BASEENVI\""
echo ------------------------------------
echo
echo -n "Do you want to use that config ? [Y]es, [n]o : "
read YN
case "$YN" in
y | Y ) return 0;;
* ) return 1;;
esac
exit 1
}
# ---------------------------------------------
# export QTE releated environment variables
# overwrites the environment variables to get
# rid of version problems.
# ---------------------------------------------
overwrite_variables()
{
export QTDIR=$QTD
export PATH=$QTDIR/bin:$PATH
export EXTRA_INC_PATH=""
export EXTRA_LIB_PATH=""
export LDFLAGS_EXTRA="-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib"
export CXXFLAGS_EXTRA="-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include"
}
noSuccess()
{
echo "exitcode was $EXITCODE"
echo "-- QTE compilation unsuccessfull -------------"
echo "-- exiting ..."
exit 1
}
doit()
{
if [ "$CLEAN" == "Y" ];then
make clean
fi
if [ "$CONFIGURE" == "Y" ];then
./configure $CONFFLAGS $EXTRA_INC_PATH $EXTRA_LIB_PATH
fi
EXITCODE=$?
if [ $EXITCODE -eq 0 ];then
make
EXITCODE=$?
if [ ! $EXITCODE -eq 0 ];then
noSuccess
fi
else
noSuccess
fi
}
check_baseenvi()
{
if [ "$BASEENVI" == "" ];then
echo "You did not provide your base environment path."
echo "use e.g. \"export BASEENVI=~\" for local environemt or"
echo "\"export BASEENVI=/mnt/envi\" for CDImage environment"
echo "exiting unsuccessfully ..."
exit 1
fi
}
check_baseenvi
set_old_values
get_new_values
set_target_env
get_qtdir
overwrite_variables
if ! show_result
then
exit 2
fi
write_result
doit
echo "-- QTE build finished successfull --------"
echo -n "you used the compiler : "
which $CXX
exit $EXITCODE
Here is the opie compilation script source.
#!/bin/sh
######################################################################################################
# _makeopie.rc : opie build script from werner@schulte-ac.de
# Author : Werner Schulte
# email : werner@schulte-ac.de
# licence : GPL
# --------------------------------------------------------------------------------------------------
# This script allows to build opie by answering some questions.
# The script tries to store the inputs in an tempfile (_makeopie.tmp)
# in your home dir. Multiple runs suggest the last inputs than.
#
# The script uses different environment scripts to configure the right
# usage of the opie build tree.
# For more information and newest versions see http://www.uv-ac.de/opiedev
# --------------------------------------------------------------------------------------------------
# V0.1.0
# V0.1.1 : 28.06.03 - .goqtemb.rc exchanged with .goqtopieemb.rc
# V0.1.2 : 24.10.03 - BASEENVI used to find the environment scripts (OPIEDEVCD)
# - EXTRA_INC_PATH, EXTRA_LIB_PATH, CXXFLAGS_EXTRA, CFLAGS_EXTRA
# will be cleared (confuse opie compilation, if different version is compiled)
# - OPIEDIR is always $PWD (to get the right includes)
# - Option Question clean-configs added.
# V0.1.3 : 29.10.03 - BASEENVI will be printed out
# - script will print out Success / No Success
######################################################################################################
TARGET=$1
MENUCONFIG=$2
QTD=$3
QMAKE=qmake
COMPIL=""
TOPIEFILE="$HOME/_makeopie.tmp"
# ---------------------------------------------
# set the last environment variables
# ---------------------------------------------
set_old_values()
{
if [ -e $TOPIEFILE ];then
. $TOPIEFILE
fi
}
# ---------------------------------------------
# request first config variables
# ---------------------------------------------
get_new_values()
{
if [ "$CLEAN" == "" ];then
echo -n "clean directory ? [Y]es,[n]o : $CLN "
read CLEAN
if [ "$CLEAN" == "" ];then
CLEAN=$CLN
fi
fi
if [ "$CLEANCONFIG" == "" ];then
echo "This option is used to clear all config.in entries recursively."
echo "It may be necessary, if some config parameters have changed."
echo -n "include clean-config ? [Y]es,[n]o : $CCONF "
read CLEANCONFIG
if [ "$CLEANCONFIG" == "" ];then
CLEANCONFIG=$CCONF
fi
fi
if [ "$MENUCONFIG" == "" ];then
echo -n "include menuconfig ? [Y]es,[n]o : $MCONF "
read MENUCONFIG
if [ "$MENUCONFIG" == "" ];then
MENUCONFIG=$MCONF
fi
fi
# create target entry
if [ "$TARGET" == "" ];then
echo -n "Please select target [x]11,[e]mb,[i]paq,[z]aurus : $TARG "
read TARGET
if [ "$TARGET" == "" ];then
TARGET=$TARG
fi
fi
if [ "$TARGET" == "i" ] || [ "TARGET" == "I" ] || [ "$TARGET" == "ipaq" ] || \
[ "$TARGET" == "z" ] || [ "TARGET" == "Z" ] || [ "$TARGET" == "zaurus" ]
then
if [ "$COMPIL" == "" ];then
echo -n "Please select compiler [s]kiff,[2]953,[3]23,[n]etwinder,s[h]arp,s[u]se : $COMP "
read COMPIL
if [ "$COMPIL" == "" ];then
COMPIL=$COMP
fi
fi
fi
}
# ---------------------------------------------
# set compiler environment variables
# ---------------------------------------------
set_compiler_env()
{
echo checking for COMPIL=$COMPIL
case "$COMPIL" in
s )
echo "using skiff cross compiler ... "
. $BASEENVI/goqtopiearmskiffrc
;;
2 )
echo "using 2953 cross compiler ... "
. $BASEENVI/.goqtopiearm2953rc
;;
3 )
echo "using 323 cross compiler ... "
. $BASEENVI/.goqtopiearm323rc
;;
n )
echo "using netwinder cross compiler ... "
. $BASEENVI/.goqtopiearmrc
;;
h )
echo "using sharp cross compiler ... "
. $BASEENVI/.goqtopiearmsharprc
;;
u )
echo "using suse cross compiler ... "
. $BASEENVI/.goqtopiearmsuserc
;;
* )
echo "incalid crosscompiler entered, exiting ... "
exit 3
;;
esac
}
# ---------------------------------------------
# set all environment variable
# ---------------------------------------------
set_target_env()
{
case "$TARGET" in
x | X | x11 | X11 )
echo "Target X11 selected ... "
. $BASEENVI/.goqtopiex11rc
;;
e | E | emb )
echo "Target EMB selected ... "
. $BASEENVI/.goqtopieembrc
;;
i | I | ipaq )
echo "Target IPAQ selected ... "
set_compiler_env
;;
z | Z | zaurus )
echo "Target ZAURUS selected ... "
set_compiler_env
;;
* )
echo "No valid target found, exiting ... "
exit 1
;;
esac
}
# ---------------------------------------------
# choose the QTDIR directory
# has to be called after target script is executed
# ---------------------------------------------
get_qtdir()
{
if [ "$QTDIR2" == "" ];then
QTDIR2=$QTDIR
fi
if [ "$QTD" == "" ];then
echo -n "your QTDIR location ? $QTDIR2 : "
read QTD
if [ "$QTD" == "" ];then
QTD=$QTDIR2
fi
fi
}
# ---------------------------------------------
# write the input into the environment file
# ---------------------------------------------
write_result ()
{
DATE=`date`
echo "#!/bin/sh" > $TOPIEFILE
echo "# automatically stored during last _makeopie.rc run ($DATE)" >> $TOPIEFILE
echo "export MCONF=$MENUCONFIG" >> $TOPIEFILE
echo "export CCONF=$CLEANCONFIG" >> $TOPIEFILE
echo "export CLN=$CLEAN" >> $TOPIEFILE
echo "export TARG=$TARGET" >> $TOPIEFILE
echo "export QTDIR2=$QTD" >> $TOPIEFILE
echo "export COMP=$COMPIL" >> $TOPIEFILE
}
show_result ()
{
echo ------------------------------------
echo "export MCONF=$MENUCONFIG"
echo "export CLN=$CLEAN"
echo "export TARG=$TARGET"
echo "export QTDIR=$QTDIR"
echo "export OPIEDIR=$OPIEDIR"
echo "export COMP=$COMPIL"
echo "export EXTRA_INC_PATH=$EXTRA_INC_PATH"
echo "export CXXFLAGS_EXTRA=$CXXFLAGS_EXTRA"
echo "export CFLAGS_EXTRA=$CFLAGS_EXTRA"
echo
echo "COMPILER_PATH=$COMPILER_PATH"
echo "COMPILER=$CXX"
echo -n "QMAKE=";/usr/bin/which $QMAKE
echo "BASE environment path=\"$BASEENVI\""
echo ------------------------------------
echo
echo -n "Do you want to use that config ? [Y]es, [n]o : "
read YN
case "$YN" in
y | Y ) return 0;;
* ) return 1;;
esac
exit 1
}
# ---------------------------------------------
# export OPIE releated environment variables
# overwrites the environment variables to get
# rid of version problems.
# ---------------------------------------------
overwrite_variables()
{
export QTDIR=$QTD
export PATH=$QTDIR/bin:$PATH
export OPIEDIR=$PWD
export EXTRA_INC_PATH=""
export EXTRA_LIB_PATH=""
export CXXFLAGS_EXTRA=""
export CFLAGS_EXTRA=""
}
noSuccess()
{
echo "make returned EXITCODE = $EXITCODE"
echo "-- OPIE compilation unsuccessfull -------------"
echo "-- exiting ..."
exit 1
}
doit()
{
if [ "$CLEAN" == "Y" ];then
make clean
sleep 3
fi
if [ "$CLEANCONFIG" == "Y" ];then
make clean-configs
sleep 3
fi
if [ "$MENUCONFIG" == "Y" ];then
make menuconfig
sleep 3
fi
EXITCODE=$?
if [ $EXITCODE -eq 0 ];then
echo inside before make
make
EXITCODE=$?
if [ ! $EXITCODE -eq 0 ];then
noSuccess
fi
else
echo menuconfig not successfull
noSuccess
fi
}
check_baseenvi()
{
if [ "$BASEENVI" == "" ];then
echo "You did not provide your base environment path."
echo "use e.g. \"export BASEENVI=~\" for local environemt or"
echo "\"export BASEENVI=/mnt/envi\" for CDImage environment"
echo "exiting unsuccessfully ..."
exit 1
fi
}
check_baseenvi
set_old_values
get_new_values
set_target_env
get_qtdir
overwrite_variables
if ! show_result
then
exit 2
fi
write_result
doit
echo "-- OPIE build finished successfull --------"
echo -n "you used the compiler : "
which $CXX
exit $EXITCODE