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" },