libgles-omap3.inc: Tweak PLATFORM variable.
authorFranklin S. Cooper Jr <fcooper@ti.com>
Fri, 31 Aug 2012 23:19:57 +0000 (18:19 -0500)
committerDenys Dmytriyenko <denys@ti.com>
Wed, 26 Sep 2012 18:18:48 +0000 (14:18 -0400)
* Newer versions of libgles-omap3 utilize a different PLATFORM value. This
  patch allows the PLATFORM variable to be easily overridden if needed.
* Replace the hardcoded usage of LinuxOMAP3 with the PLATFORM variable.

Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
recipes-graphics/libgles/libgles-omap3.inc

index ac9d5df9febef94fac490415a5f71c046077c4bd..b6aa3829cab9a61d50f349e5ed4e0c6af3df3614 100644 (file)
@@ -65,10 +65,11 @@ TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L$
 -L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}"
 PARALLEL_MAKE = ""
 
+PLATFORM ?= "LinuxOMAP3"
+
 do_compile() {
        export X11ROOT="${STAGING_DIR_HOST}/usr"
        export TOOLCHAIN="${TOOLCHAIN_PATH}"
-       export PLATFORM="LinuxOMAP3"
 
        export PLAT_CC="${CC}"
        export PLAT_CPP="${CXX}"
@@ -81,23 +82,23 @@ do_compile() {
        for X11BUILD in 0 1 ; do
                for demo in ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Demos/* ; do
                        cd $demo/OGLES/Build/LinuxGeneric
-                       oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD  
-                       rm $demo/OGLES/Build/LinuxOMAP3/Release*/*.o
-                       install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true
+                       oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=$X11BUILD
+                       rm $demo/OGLES/Build/${PLATFORM}/Release*/*.o
+                       install -m 0755 $demo/OGLES/Build/${PLATFORM}/ReleaseX11/* ${S}/demos/x11 || true
                        sed -e s:NAME:$(basename $demo): \
-                           -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/*): \
+                           -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/${PLATFORM}/ReleaseX11/*): \
                             ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
-                       install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true        
+                       install -m 0755 $demo/OGLES/Build/${PLATFORM}/ReleaseRaw/* ${S}/demos/raw || true
                done
                for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do
                        cd $demo/OGLES2/Build/LinuxGeneric
-                       oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD  
-                       rm -f $demo/OGLES2/Build/LinuxOMAP3/Release*/*.o
-                       install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true
+                       oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=$X11BUILD
+                       rm -f $demo/OGLES2/Build/${PLATFORM}/Release*/*.o
+                       install -m 0755 $demo/OGLES2/Build/${PLATFORM}/ReleaseX11/* ${S}/demos/x11 || true
                        sed -e s:NAME:$(basename $demo): \
-                           -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/*): \
+                           -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/${PLATFORM}/ReleaseX11/*): \
                             ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
-                       install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true       
+                       install -m 0755 $demo/OGLES2/Build/${PLATFORM}/ReleaseRaw/* ${S}/demos/raw || true
                done
        done
 
@@ -113,14 +114,14 @@ do_compile() {
                                cd $training/OGLES2/Build/LinuxGeneric
                        fi
 
-                       if [ -e $training/OGLES2/Build/LinuxOMAP3/Makefile ] ; then
-                               cd $training/OGLES2/Build/LinuxOMAP3
+                       if [ -e $training/OGLES2/Build/${PLATFORM}/Makefile ] ; then
+                               cd $training/OGLES2/Build/${PLATFORM}
                        fi                      
 
-                       oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD  
-                       rm -f $training/OGLES2/Build/LinuxOMAP3/Release*/*.o
-                       install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/trainingcourses/x11 || true
-                       install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true 
+                       oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=$X11BUILD
+                       rm -f $training/OGLES2/Build/${PLATFORM}/Release*/*.o
+                       install -m 0755 $training/OGLES2/Build/${PLATFORM}/ReleaseX11/* ${S}/trainingcourses/x11 || true
+                       install -m 0755 $training/OGLES2/Build/${PLATFORM}/ReleaseRaw/* ${S}/trainingcourses/raw || true
                done
        done
 
@@ -141,7 +142,7 @@ do_install () {
        install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/
 
        install -m 0755 ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true
-       cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/lib/*X11WS* ${D}${libdir} || true
+       cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/${PLATFORM}/lib/*X11WS* ${D}${libdir} || true
 
        install -d ${D}${includedir}
        cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/
@@ -149,8 +150,8 @@ do_install () {
 
        cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
        cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/
-       cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/ || true
-       cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES2/ || true
+       cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/${PLATFORM}/Include/GLES/* ${D}${includedir}/GLES/ || true
+       cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/${PLATFORM}/Include/GLES/* ${D}${includedir}/GLES2/ || true
        cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${D}${includedir}/ || true
        cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${D}${includedir}/ || true
        cp -pPr ${S}/include/*.h ${D}${includedir} || true