From 7d8858e349f411a154969e7d4793dd9a6218f479 Mon Sep 17 00:00:00 2001 From: Philip Whitfield Date: Fri, 2 Nov 2012 16:20:44 +0100 Subject: [PATCH 1/7] added codelite linux project --- bin/data/templates/codeliteLinux/Makefile | 2 + .../templates/codeliteLinux/bin/data/.gitkeep | 0 bin/data/templates/codeliteLinux/config.make | 56 +++++++ .../codeliteLinux/emptyExample.project | 105 ++++++++++++ .../codeliteLinux/emptyExample.workspace | 20 +++ bin/data/templates/codeliteLinux/src/main.cpp | 16 ++ .../templates/codeliteLinux/src/testApp.cpp | 59 +++++++ .../templates/codeliteLinux/src/testApp.h | 22 +++ projectGenerator_linux64.cbp | 2 +- projectGenerator_linux64.workspace | 10 +- src/projects/CodeliteLinuxProject.cpp | 150 ++++++++++++++++++ src/projects/CodeliteLinuxProject.h | 25 +++ src/testApp.cpp | 114 ++++++++----- src/testApp.h | 41 ++--- 14 files changed, 558 insertions(+), 64 deletions(-) create mode 100644 bin/data/templates/codeliteLinux/Makefile create mode 100644 bin/data/templates/codeliteLinux/bin/data/.gitkeep create mode 100644 bin/data/templates/codeliteLinux/config.make create mode 100644 bin/data/templates/codeliteLinux/emptyExample.project create mode 100644 bin/data/templates/codeliteLinux/emptyExample.workspace create mode 100644 bin/data/templates/codeliteLinux/src/main.cpp create mode 100644 bin/data/templates/codeliteLinux/src/testApp.cpp create mode 100644 bin/data/templates/codeliteLinux/src/testApp.h create mode 100644 src/projects/CodeliteLinuxProject.cpp create mode 100644 src/projects/CodeliteLinuxProject.h diff --git a/bin/data/templates/codeliteLinux/Makefile b/bin/data/templates/codeliteLinux/Makefile new file mode 100644 index 0000000..2d83a77 --- /dev/null +++ b/bin/data/templates/codeliteLinux/Makefile @@ -0,0 +1,2 @@ +include config.make +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/Makefile.examples diff --git a/bin/data/templates/codeliteLinux/bin/data/.gitkeep b/bin/data/templates/codeliteLinux/bin/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/bin/data/templates/codeliteLinux/config.make b/bin/data/templates/codeliteLinux/config.make new file mode 100644 index 0000000..9eec157 --- /dev/null +++ b/bin/data/templates/codeliteLinux/config.make @@ -0,0 +1,56 @@ +# add custom variables to this file + +# OF_ROOT allows to move projects outside apps/* just set this variable to the +# absoulte path to the OF root folder + +OF_ROOT = ../../.. + + +# USER_CFLAGS allows to pass custom flags to the compiler +# for example search paths like: +# USER_CFLAGS = -I src/objects + +USER_CFLAGS = + + +# USER_LDFLAGS allows to pass custom flags to the linker +# for example libraries like: +# USER_LDFLAGS = libs/libawesomelib.a + +USER_LDFLAGS = + + +EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj" + +# change this to add different compiler optimizations to your project + +USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os + + +# android specific, in case you want to use different optimizations +USER_LIBS_ARM = +USER_LIBS_ARM7 = +USER_LIBS_NEON = + +# android optimizations + +ANDROID_COMPILER_OPTIMIZATION = -Os + +NDK_PLATFORM = android-8 + +# uncomment this for custom application name (if the folder name is different than the application name) +#APPNAME = folderName + +# uncomment this for custom package name, must be the same as the java package that contains OFActivity +#PKGNAME = cc.openframeworks.$(APPNAME) + + + + + +# linux arm flags + +LINUX_ARM7_COMPILER_OPTIMIZATIONS = -march=armv7-a -mtune=cortex-a8 -finline-functions -funroll-all-loops -O3 -funsafe-math-optimizations -mfpu=neon -ftree-vectorize -mfloat-abi=hard -mfpu=vfp + + + diff --git a/bin/data/templates/codeliteLinux/emptyExample.project b/bin/data/templates/codeliteLinux/emptyExample.project new file mode 100644 index 0000000..392c95e --- /dev/null +++ b/bin/data/templates/codeliteLinux/emptyExample.project @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + make clean Debug + make Debug + + + + None + $(WorkspacePath)/.. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + make clean Release + make Release + + + + None + $(WorkspacePath)/.. + + + + + + + + + + + + + + diff --git a/bin/data/templates/codeliteLinux/emptyExample.workspace b/bin/data/templates/codeliteLinux/emptyExample.workspace new file mode 100644 index 0000000..6030c3e --- /dev/null +++ b/bin/data/templates/codeliteLinux/emptyExample.workspace @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/bin/data/templates/codeliteLinux/src/main.cpp b/bin/data/templates/codeliteLinux/src/main.cpp new file mode 100644 index 0000000..6a32c6a --- /dev/null +++ b/bin/data/templates/codeliteLinux/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // <-------- setup the GL context + + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp( new testApp()); + +} diff --git a/bin/data/templates/codeliteLinux/src/testApp.cpp b/bin/data/templates/codeliteLinux/src/testApp.cpp new file mode 100644 index 0000000..6335e6f --- /dev/null +++ b/bin/data/templates/codeliteLinux/src/testApp.cpp @@ -0,0 +1,59 @@ +#include "testApp.h" + +//-------------------------------------------------------------- +void testApp::setup(){ +} + +//-------------------------------------------------------------- +void testApp::update(){ +} + +//-------------------------------------------------------------- +void testApp::draw(){ + +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void testApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void testApp::dragEvent(ofDragInfo dragInfo){ + +} \ No newline at end of file diff --git a/bin/data/templates/codeliteLinux/src/testApp.h b/bin/data/templates/codeliteLinux/src/testApp.h new file mode 100644 index 0000000..0cb5a8c --- /dev/null +++ b/bin/data/templates/codeliteLinux/src/testApp.h @@ -0,0 +1,22 @@ +#pragma once + +#include "ofMain.h" + +class testApp : public ofBaseApp{ + + public: + void setup(); + void update(); + void draw(); + + void keyPressed (int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + +}; diff --git a/projectGenerator_linux64.cbp b/projectGenerator_linux64.cbp index 3865643..8f7c973 100644 --- a/projectGenerator_linux64.cbp +++ b/projectGenerator_linux64.cbp @@ -2,7 +2,7 @@ -