Commit c844fec7 by Nicolas Capens

Add the OGLES2HelloTriangle sample to the Linux build.

Change-Id: Ia58a554b682fa9a6ce87a4a4274013ee1a7d0b50
parent d5b18a78
...@@ -74,7 +74,7 @@ void *loadLibrary(const char *(&names)[n]) ...@@ -74,7 +74,7 @@ void *loadLibrary(const char *(&names)[n])
inline void *getLibraryHandle(const char *path) inline void *getLibraryHandle(const char *path)
{ {
bool resident = (dlopen(path, RTLD_NOLOAD) != 0); void *resident = dlopen(path, RTLD_LAZY | RTLD_NOLOAD);
if(resident) if(resident)
{ {
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
<Linker> <Linker>
<Add option="-m32" /> <Add option="-m32" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libEGL.so.1 ./../../../lib/Debug_x86/libEGL.so" />
</ExtraCommands>
</Target> </Target>
<Target title="Release x86"> <Target title="Release x86">
<Option output="./../../../lib/Release_x86/libEGL.so.1" prefix_auto="0" extension_auto="0" /> <Option output="./../../../lib/Release_x86/libEGL.so.1" prefix_auto="0" extension_auto="0" />
...@@ -38,6 +41,9 @@ ...@@ -38,6 +41,9 @@
<Add option="-s" /> <Add option="-s" />
<Add option="-m32" /> <Add option="-m32" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libEGL.so.1 ./../../../lib/Release_x86/libEGL.so" />
</ExtraCommands>
</Target> </Target>
<Target title="Debug x64"> <Target title="Debug x64">
<Option output="./../../../lib/Debug_x64/libEGL.so.1" prefix_auto="0" extension_auto="0" /> <Option output="./../../../lib/Debug_x64/libEGL.so.1" prefix_auto="0" extension_auto="0" />
...@@ -54,6 +60,9 @@ ...@@ -54,6 +60,9 @@
<Linker> <Linker>
<Add option="-m64" /> <Add option="-m64" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libEGL.so.1 ./../../../lib/Debug_x64/libEGL.so" />
</ExtraCommands>
</Target> </Target>
<Target title="Release x64"> <Target title="Release x64">
<Option output="./../../../lib/Release_x64/libEGL.so.1" prefix_auto="0" extension_auto="0" /> <Option output="./../../../lib/Release_x64/libEGL.so.1" prefix_auto="0" extension_auto="0" />
...@@ -74,6 +83,9 @@ ...@@ -74,6 +83,9 @@
<Add option="-s" /> <Add option="-s" />
<Add option="-m64" /> <Add option="-m64" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libEGL.so.1 ./../../../lib/Release_x64/libEGL.so" />
</ExtraCommands>
</Target> </Target>
</Build> </Build>
<Compiler> <Compiler>
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
<Add option="-m32" /> <Add option="-m32" />
<Add library="./../../LLVM/bin/x86/Debug/libLLVM.a" /> <Add library="./../../LLVM/bin/x86/Debug/libLLVM.a" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libGLESv2.so.2 ./../../../lib/Debug_x86/libGLESv2.so" />
</ExtraCommands>
</Target> </Target>
<Target title="Release x86"> <Target title="Release x86">
<Option output="./../../../lib/Release_x86/libGLESv2.so.2" prefix_auto="0" extension_auto="0" /> <Option output="./../../../lib/Release_x86/libGLESv2.so.2" prefix_auto="0" extension_auto="0" />
...@@ -45,6 +48,9 @@ ...@@ -45,6 +48,9 @@
<Add option="-Wl,--gc-sections" /> <Add option="-Wl,--gc-sections" />
<Add library="./../../LLVM/bin/x86/Release/libLLVM.a" /> <Add library="./../../LLVM/bin/x86/Release/libLLVM.a" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libGLESv2.so.2 ./../../../lib/Release_x86/libGLESv2.so" />
</ExtraCommands>
</Target> </Target>
<Target title="Debug x64"> <Target title="Debug x64">
<Option output="./../../../lib/Debug_x64/libGLESv2.so.2" prefix_auto="0" extension_auto="0" /> <Option output="./../../../lib/Debug_x64/libGLESv2.so.2" prefix_auto="0" extension_auto="0" />
...@@ -62,6 +68,9 @@ ...@@ -62,6 +68,9 @@
<Add option="-m64" /> <Add option="-m64" />
<Add library="./../../LLVM/bin/x64/Debug/libLLVM.a" /> <Add library="./../../LLVM/bin/x64/Debug/libLLVM.a" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libGLESv2.so.2 ./../../../lib/Debug_x64/libGLESv2.so" />
</ExtraCommands>
</Target> </Target>
<Target title="Release x64"> <Target title="Release x64">
<Option output="./../../../lib/Release_x64/libGLESv2.so.2" prefix_auto="0" extension_auto="0" /> <Option output="./../../../lib/Release_x64/libGLESv2.so.2" prefix_auto="0" extension_auto="0" />
...@@ -87,6 +96,9 @@ ...@@ -87,6 +96,9 @@
<Add option="-Wl,--gc-sections" /> <Add option="-Wl,--gc-sections" />
<Add library="./../../LLVM/bin/x64/Release/libLLVM.a" /> <Add library="./../../LLVM/bin/x64/Release/libLLVM.a" />
</Linker> </Linker>
<ExtraCommands>
<Add after="ln -s -f ./libGLESv2.so.2 ./../../../lib/Release_x64/libGLESv2.so" />
</ExtraCommands>
</Target> </Target>
</Build> </Build>
<Compiler> <Compiler>
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file> <CodeBlocks_workspace_file>
<Workspace title="SwiftShader"> <Workspace title="SwiftShader">
<Project filename="./OpenGL/libEGL/libEGL.cbp" /> <Project filename="OpenGL/libEGL/libEGL.cbp" />
<Project filename="./OpenGL/libGLESv2/libGLESv2.cbp"> <Project filename="OpenGL/libGLESv2/libGLESv2.cbp">
<Depends filename="./LLVM/LLVM.cbp" /> <Depends filename="LLVM/LLVM.cbp" />
</Project>
<Project filename="LLVM/LLVM.cbp" />
<Project filename="../tests/third_party/PowerVR/Examples/Beginner/01_HelloAPI/OGLES2/Build/OGLES2HelloAPI.cbp">
<Depends filename="OpenGL/libEGL/libEGL.cbp" />
<Depends filename="OpenGL/libGLESv2/libGLESv2.cbp" />
</Project> </Project>
<Project filename="./LLVM/LLVM.cbp" />
</Workspace> </Workspace>
</CodeBlocks_workspace_file> </CodeBlocks_workspace_file>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="OGLES2HelloAPI" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug x86">
<Option output="bin/Debug_x86/OGLES2HelloAPI" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug_x86/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../../../../../../../lib/Debug_x86" />
</Linker>
</Target>
<Target title="Release x86">
<Option output="bin/Release_x86/OGLES2HelloAPI" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release_x86/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="../../../../../../../../lib/Release_x86" />
</Linker>
</Target>
<Target title="Debug x64">
<Option output="bin/Debug_x64/OGLES2HelloAPI" prefix_auto="1" extension_auto="1" />
<Option working_dir="../../../../../../../../lib/Debug_x64" />
<Option object_output="obj/Debug_x64/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../../../../../../../lib/Debug_x64" />
</Linker>
</Target>
<Target title="Release x64">
<Option output="bin/Release_x64/OGLES2HelloAPI" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release_x64/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="../../../../../../../../lib/Release_x64" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
<Add directory="../../../../../Builds/Include" />
</Compiler>
<Linker>
<Add library="X11" />
<Add library="EGL" />
<Add library="GLESv2" />
</Linker>
<Unit filename="../OGLES2HelloAPI_LinuxX11.cpp" />
<Extensions>
<code_completion />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment