From 4594187ecbd49cb0f22c8bfc61245e0e95d3d7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konsta=20=27sooda=27=20H=C3=B6ltt=C3=A4?= Date: Sun, 23 Jun 2013 01:29:43 +0300 Subject: [PATCH] ogl_editor: build for linux with tundra Remove testing scripts and use the build system in linux too --- ogl_editor/.gitignore | 1 + ogl_editor/komp | 2 -- ogl_editor/kompile | 6 ------ ogl_editor/linux-build.sh | 1 + ogl_editor/tundra.lua | 13 +++++++++++++ ogl_editor/units.lua | 5 ++++- 6 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 ogl_editor/komp delete mode 100644 ogl_editor/kompile create mode 100755 ogl_editor/linux-build.sh diff --git a/ogl_editor/.gitignore b/ogl_editor/.gitignore index 78f5cfd..233690a 100644 --- a/ogl_editor/.gitignore +++ b/ogl_editor/.gitignore @@ -1,5 +1,6 @@ tags tundra-output +t2-output .tundra* *.swp *.swo diff --git a/ogl_editor/komp b/ogl_editor/komp deleted file mode 100644 index 5e3d7bc..0000000 --- a/ogl_editor/komp +++ /dev/null @@ -1,2 +0,0 @@ -gcc -c `sdl-config --cflags` src/linux/*.c -I emgui/include/ -DEMGUI_UNIX -gcc *.o -lSDL -lGL -lm diff --git a/ogl_editor/kompile b/ogl_editor/kompile deleted file mode 100644 index fa884c5..0000000 --- a/ogl_editor/kompile +++ /dev/null @@ -1,6 +0,0 @@ -gcc $CFLAGS -c external/mxml/*.c -D_THREAD_SAFE -D_REENTRANT -gcc $CFLAGS -c emgui/src/*.c emgui/src/*/*.c -DEMGUI_UNIX -I emgui/include -I emgui/src/ -gcc $CFLAGS ../sync/*.c -c -gcc $CFLAGS -c src/*.c -DEMGUI_UNIX -I emgui/include -I external/mxml/ -I src/ -gcc $CFLAGS -c `sdl-config --cflags` src/linux/*.c -I emgui/include/ -DEMGUI_UNIX -gcc $CFLAGS *.o -lSDL -lGL -lm diff --git a/ogl_editor/linux-build.sh b/ogl_editor/linux-build.sh new file mode 100755 index 0000000..9d1f51f --- /dev/null +++ b/ogl_editor/linux-build.sh @@ -0,0 +1 @@ +tundra linux-gcc-release diff --git a/ogl_editor/tundra.lua b/ogl_editor/tundra.lua index 6f35cbc..235d028 100644 --- a/ogl_editor/tundra.lua +++ b/ogl_editor/tundra.lua @@ -24,11 +24,24 @@ local win32 = { }, } +local linux = { + Env = { + CPPDEFS = { "EMGUI_UNIX" }, + CCOPTS = { + "-I.", + "`sdl-config --cflags`", + { "-O0", "-g"; Config = "*-*-debug" }, + { "-O2"; Config = "*-*-release" }, + }, + }, +} + Build { Units = "units.lua", Configs = { Config { Name = "macosx-clang", DefaultOnHost = "macosx", Inherit = macosx, Tools = { "clang-osx" } }, Config { Name = "win32-msvc", DefaultOnHost = { "windows" }, Inherit = win32, Tools = { "msvc" } }, + Config { Name = "linux-gcc", DefaultOnHost = { "linux" }, Inherit = linux, Tools = { "gcc" } }, }, } diff --git a/ogl_editor/units.lua b/ogl_editor/units.lua index 93de4a4..5b10d26 100644 --- a/ogl_editor/units.lua +++ b/ogl_editor/units.lua @@ -107,7 +107,10 @@ Program { Depends = { "sync", "mxml", "emgui" }, - Libs = { { "wsock32.lib", "opengl32.lib", "glu32.lib", "kernel32.lib", "user32.lib", "gdi32.lib", "Comdlg32.lib", "Advapi32.lib" ; Config = "win32-*-*" } }, + Libs = { + { "wsock32.lib", "opengl32.lib", "glu32.lib", "kernel32.lib", "user32.lib", "gdi32.lib", "Comdlg32.lib", "Advapi32.lib" ; Config = "win32-*-*" }, + { "GL", "SDL", "m"; Config = "linux-*-*" } + }, Frameworks = { "Cocoa", "OpenGL", "Carbon" },