remove library/gui source trees, put everything under src/

This commit is contained in:
josh committed 2014-07-12 09:46:32 -04:00
1 parent 45d86d1e35
commit e1c5d0f0f4
34 files changed
+37 -69

No files matched your search

-8
View File
@@ -2,14 +2,6 @@
all: all:
@rake $@ @rake $@
.PHONY: library
library:
@rake $@
.PHONY: gui
gui:
@rake $@
.PHONY: test .PHONY: test
test: test:
@rake $@ @rake $@
+7 -15
View File
@@ -9,19 +9,12 @@ GTEST_VERSION = "1.7.0"
base_env = Rscons::Environment.new do |env| base_env = Rscons::Environment.new do |env|
env.build_root = "build" env.build_root = "build"
env["CPPPATH"] << "src/lib/include"
env["CCFLAGS"] += ["-Wall", "-O2"] env["CCFLAGS"] += ["-Wall", "-O2"]
env["CFLAGS"] << "-std=gnu99" env["CFLAGS"] << "-std=gnu99"
env["CXXFLAGS"] << "-std=gnu++11" env["CXXFLAGS"] << "-std=gnu++11"
end end
task :library do task :default do
base_env.clone(clone: :all) do |env|
env.Library("lib/lib#{NAME}.a", Dir["src/lib/**/*.{cc,c}"])
end
end
task :gui => :library do
base_env.clone(clone: :all) do |env| base_env.clone(clone: :all) do |env|
env.parse_flags!("!sdl2-config --cflags --libs") env.parse_flags!("!sdl2-config --cflags --libs")
env.parse_flags!("!freetype-config --cflags --libs") env.parse_flags!("!freetype-config --cflags --libs")
@@ -31,18 +24,19 @@ task :gui => :library do
else else
env["LIBS"] += ["GL"] env["LIBS"] += ["GL"]
end end
env.Program("bin/jes", Dir["src/gui/**/*.{cc,c}", "lib/lib#{NAME}.a"]) env.Program("bin/jes", Dir["src/**/*.{cc,c}"])
end end
end end
task :test => :library do task :test => :default do
base_env.clone(clone: :all) do |env| base_env.clone(clone: :all) do |env|
env["CPPPATH"] << "src"
env["CPPPATH"] << "gtest-#{GTEST_VERSION}/include" env["CPPPATH"] << "gtest-#{GTEST_VERSION}/include"
env["CPPPATH"] << "gtest-#{GTEST_VERSION}" env["CPPPATH"] << "gtest-#{GTEST_VERSION}"
sources = Dir["gtest-#{GTEST_VERSION}/src/gtest-all.cc", sources = Dir["gtest-#{GTEST_VERSION}/src/gtest-all.cc",
"gtest-#{GTEST_VERSION}/src/gtest_main.cc", "gtest-#{GTEST_VERSION}/src/gtest_main.cc",
"test/src/**/*.cc", "src/**/*.{cc,c}",
"lib/lib#{NAME}.a"] "test/src/**/*.cc"]
env.Program("build/tests", sources) env.Program("build/tests", sources)
if RUBY_PLATFORM =~ /linux/ if RUBY_PLATFORM =~ /linux/
env["LIBS"] << "pthread" env["LIBS"] << "pthread"
@@ -51,9 +45,7 @@ task :test => :library do
system("./build/tests") system("./build/tests")
end end
task :default => :all task :all => :default
task :all => [:library, :gui]
task :clean do task :clean do
Rscons.clean Rscons.clean
+1 -1
View File
@@ -1,4 +1,4 @@
#include "jes/Core.h" #include "Core.h"
namespace jes namespace jes
{ {
+2 -2
View File
@@ -1,8 +1,8 @@
#ifndef JES_CORE_H #ifndef JES_CORE_H
#define JES_CORE_H #define JES_CORE_H
#include "jes/Ref.h" #include "Ref.h"
#include "jes/Path.h" #include "Path.h"
#include <string> #include <string>
#ifdef _WIN32 #ifdef _WIN32
@@ -1,7 +1,6 @@
#include "jes.h" #include "FileLoader.h"
#include "jes/FileLoader.h" #include "FileReader.h"
#include "jes/FileReader.h" #include "Text.h"
#include "jes/Text.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
@@ -1,8 +1,8 @@
#ifndef JES_FILELOADER_H #ifndef JES_FILELOADER_H
#define JES_FILELOADER_H #define JES_FILELOADER_H
#include "jes/Ref.h" #include "Ref.h"
#include "jes/Text.h" #include "Text.h"
#include <stdint.h> #include <stdint.h>
#include <vector> #include <vector>
@@ -1,5 +1,4 @@
#include "jes.h" #include "FileReader.h"
#include "jes/FileReader.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
@@ -1,7 +1,8 @@
#ifndef JES_FILEREADER_H #ifndef JES_FILEREADER_H
#define JES_FILEREADER_H #define JES_FILEREADER_H
#include "jes/Ref.h" #include "Core.h"
#include "Ref.h"
#include <stdint.h> #include <stdint.h>
namespace jes namespace jes
View File
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JES_FONT_H #ifndef JES_FONT_H
#define JES_FONT_H #define JES_FONT_H
#include "jes/Ref.h" #include "Ref.h"
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include "gl3w.h" #include "gl3w.h"
@@ -1,5 +1,5 @@
#include "FontManager.h" #include "FontManager.h"
#include "jes/Runtime.h" #include "Runtime.h"
#include <iostream> #include <iostream>
namespace jes namespace jes
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JES_FONTMANAGER_H #ifndef JES_FONTMANAGER_H
#define JES_FONTMANAGER_H #define JES_FONTMANAGER_H
#include "jes/Ref.h" #include "Ref.h"
#include "Font.h" #include "Font.h"
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
File renamed without changes.
+1 -1
View File
@@ -1,8 +1,8 @@
#ifndef GLBUFFER_H #ifndef GLBUFFER_H
#define GLBUFFER_H #define GLBUFFER_H
#include "Ref.h"
#include "gl3w.h" #include "gl3w.h"
#include "jes.h"
namespace jes namespace jes
{ {
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef GLPROGRAM_H #ifndef GLPROGRAM_H
#define GLPROGRAM_H #define GLPROGRAM_H
#include "jes/Ref.h" #include "Ref.h"
#include "GLShader.h" #include "GLShader.h"
#include <map> #include <map>
#include <string> #include <string>
File renamed without changes.
+2 -2
View File
@@ -1,8 +1,8 @@
#ifndef GLSHADER_H #ifndef GLSHADER_H
#define GLSHADER_H #define GLSHADER_H
#include "jes/Ref.h" #include "Ref.h"
#include "jes/Path.h" #include "Path.h"
#include "gl3w.h" #include "gl3w.h"
namespace jes namespace jes
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef GLTEXTURE_H #ifndef GLTEXTURE_H
#define GLTEXTURE_H #define GLTEXTURE_H
#include "jes/Ref.h" #include "Ref.h"
#include "gl3w.h" #include "gl3w.h"
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -1,7 +1,7 @@
#include "GUI.h" #include "GUI.h"
#include "gl3w.h" #include "gl3w.h"
#include <iostream> #include <iostream>
#include "jes/Runtime.h" #include "Runtime.h"
#define WIDTH 500 #define WIDTH 500
#define HEIGHT 500 #define HEIGHT 500
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JES_GUI_H #ifndef JES_GUI_H
#define JES_GUI_H #define JES_GUI_H
#include "jes/Ref.h" #include "Ref.h"
#include <SDL.h> #include <SDL.h>
#include "FontManager.h" #include "FontManager.h"
#include "GLProgram.h" #include "GLProgram.h"
+2 -2
View File
@@ -1,5 +1,5 @@
#include "jes/Path.h" #include "Path.h"
#include "jes/FileReader.h" #include "FileReader.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JES_PATH_H #ifndef JES_PATH_H
#define JES_PATH_H #define JES_PATH_H
#include "jes/Ref.h" #include "Ref.h"
#include <string> #include <string>
#include <vector> #include <vector>
#include <stdint.h> #include <stdint.h>
File renamed without changes.
+1 -1
View File
@@ -1,4 +1,4 @@
#include "jes/Runtime.h" #include "Runtime.h"
namespace jes namespace jes
{ {
@@ -1,8 +1,8 @@
#ifndef JES_RUNTIME_H #ifndef JES_RUNTIME_H
#define JES_RUNTIME_H #define JES_RUNTIME_H
#include "jes/Core.h" #include "Core.h"
#include "jes/Path.h" #include "Path.h"
namespace jes namespace jes
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
#include "jes/Text.h" #include "Text.h"
#include <string.h> #include <string.h>
namespace jes namespace jes
+1 -1
View File
@@ -2,7 +2,7 @@
#define JES_TEXT_H #define JES_TEXT_H
#include <stdint.h> #include <stdint.h>
#include "jes/Ref.h" #include "Ref.h"
#include <string> #include <string>
namespace jes namespace jes
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
-15
View File
@@ -1,15 +0,0 @@
#ifndef JES_H
#define JES_H
#include "jes/Core.h"
#include "jes/Ref.h"
namespace jes
{
static inline void JES_Init(const std::string & bin_path)
{
Core::instance.init(bin_path);
}
}
#endif
+1 -1
View File
@@ -1,7 +1,7 @@
#include <iostream> #include <iostream>
#include "GUI.h" #include "GUI.h"
#include "jes.h" #include "Core.h"
using namespace std; using namespace std;