-rwxr-xr-x | configure | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -83,218 +83,222 @@ while [ -n "$1" ]; do QT3=yes ;; *) HELP=yes;; esac shift done TARGET=configs/$PLATFORM-$SHARING$DEBUG if [ '!' -f $TARGET ] then if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ] then TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG PLATFORM=linux-$PLATFORM-g++ else echo echo ' The specified platform/compiler not supported: ' $TARGET echo exit 2 fi fi # Next, emit a usage message if something failed. if [ "$HELP" = "yes" ]; then cat <<EOF Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] The defaults (*) are usually acceptable. Here is a short explanation of each option: * -release ........... Compile and link Qt with debugging turned off. -debug ............. Compile and link Qt with debugging turned on. * -shared ............ Create and use a shared Qt library (libqt.so) -static ............ Create and use a static Qt library (libqt.a) -qt3 ............... Configure for use with Qt 3.x -platform target ... The platform you are building on ($PLATFORM) EOF exit 0; fi CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` if [ -f library/custom-$CUSTOM.h ] then rm -f library/custom.h ln -s custom-$CUSTOM.h library/custom.h fi mkdir -p include/qpe ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) mkdir -p include/qtopia ( cd include/qtopia && rm -f *.h; ln -s ../../library/*.h .; ) mkdir -p include/qtopia/private ( cd include/qtopia/private && rm -f *.h; ln -s ../../../library/backend/*.h .; ) mkdir -p include/opie ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) ( cd include/opie && ln -s ../../libsql/*.h .; ) ( cd include/opie && ln -s ../../libopie/pim/*.h .; ) +( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ + ln -s ../../libopie/$generatedHeader $generatedHeader; done ) echo Creating makefiles... # Set version for library directly # Version 1.5.0 right now for compat. sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v mv library/library.pro-v library/library.pro if [ "$QT3" = yes ] then VCONFIG="CONFIG+=qt3" else VCONFIG="CONFIG+=qt2" fi if [ -f $TMAKEPATH/tmake.conf ] then # You have tmake. We'll regenerate the file for you... echo "Makefiles will be regenerated." fi H=`pwd` if [ -z "$TOMAKE" ] then TOMAKE=`make showcomponents` fi for a in $TOMAKE ; do N=$a/Makefile M=$a/Makefile.in O=$a/Makefile.add f=`basename $a` if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] then ( cd $a; TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ -t $H/qt/tmake/propagate.t $f.pro | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; ) echo -n "." # echo Building $N.. appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` if [ -n "$translation" -a -n "$appname" ] then if [ "$appname" != "$translation" ] then echo echo "Warning: translation and appname disagree in $a/$f.pro" fi fi fi cat > $N <<EOF ############################################################################# # Automatically generated from $M # Build options from $1 ############################################################################# EOF SED= PLATFORM_CFLAGS= if [ "$f" = "embeddedkonsole" ] then case $PLATFORM in - *x86*|*generic*|*ipaq*|*sharp*) + *x86*|*generic*|*ipaq*|*oz*|*sharp*) SED="$SED /^LIBS.*=/s/\$/ -lutil/;" PLATFORM_CFLAGS="-DHAVE_OPENPTY" ;; *) SED= esac elif [ "$f" = "libmpeg3" ] then # Patch our Makefile.in file with the platform specifics for the libmpeg3 library # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) SED='s/\$(CC)/\$(CXX)/;' case $PLATFORM in # For x86 turn on using floating point, compile mmx and css code *x86*) # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" # For generic turn on using floating point ;; *generic*) PLATFORM_CFLAGS="" # For the ipaq use fixed point maths, don't compile the mmx or css code - ;; *ipaq*|*sharp*) + ;; *ipaq*|*oz*|*sharp*) PLATFORM_CFLAGS="-DUSE_FIXED_POINT" ;; *) # For 'other platforms', turn off optimizations and use fixed point PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT" esac elif [ "$f" = "libmad" ] then # Patch our Makefile.in file with the platform specifics for the libmad library case $PLATFORM in # For x86 use intel optimizations *x86*) PLATFORM_CFLAGS="-DFPM_INTEL" # For the ipaq use ARM asm optimizations - ;; *ipaq*|*sharp*) + ;; *ipaq*|*oz*|*sharp*) PLATFORM_CFLAGS="-DFPM_ARM" SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" # For generic platforms use the C 64-bit implementation ;; *generic*) PLATFORM_CFLAGS="-DFPM_64BIT" # For 'other platforms' use the ARM code ;; *) PLATFORM_CFLAGS="-DFPM_ARM" SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" esac fi + SED="$SED /LFLAGS.*=.*/s/\$/ $EXTRA $EXTRALIBS/;" + PLATFORM_CFLAGS="$PLATFORM_CFLAGS $EXTRAFLAGS"; if [ -n "$PLATFORM_CFLAGS" ] then # Append the addition c-flags we have defined SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" - SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" + SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS -fpermissive/;" fi cat $TARGET >> $N if [ -n "$SED" ] then sed -e "$SED" $M >> $N else cat $M >> $N fi cat >> $N <<EOF lupdate: lupdate $f.pro lrelease: lrelease $f.pro EOF if [ -f "$O" ] then cat >> $N $O fi done MAKE=make echo echo "Opie is now configured for building. Just run $MAKE (or $MAKE single)." echo "To reconfigure, run $MAKE clean and configure." echo |