remove library/gui source trees, put everything under src/
This commit is contained in:
parent
45d86d1e35
commit
e1c5d0f0f4
8
Makefile
8
Makefile
@ -2,14 +2,6 @@
|
||||
all:
|
||||
@rake $@
|
||||
|
||||
.PHONY: library
|
||||
library:
|
||||
@rake $@
|
||||
|
||||
.PHONY: gui
|
||||
gui:
|
||||
@rake $@
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@rake $@
|
||||
|
22
Rakefile.rb
22
Rakefile.rb
@ -9,19 +9,12 @@ GTEST_VERSION = "1.7.0"
|
||||
|
||||
base_env = Rscons::Environment.new do |env|
|
||||
env.build_root = "build"
|
||||
env["CPPPATH"] << "src/lib/include"
|
||||
env["CCFLAGS"] += ["-Wall", "-O2"]
|
||||
env["CFLAGS"] << "-std=gnu99"
|
||||
env["CXXFLAGS"] << "-std=gnu++11"
|
||||
end
|
||||
|
||||
task :library 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
|
||||
task :default do
|
||||
base_env.clone(clone: :all) do |env|
|
||||
env.parse_flags!("!sdl2-config --cflags --libs")
|
||||
env.parse_flags!("!freetype-config --cflags --libs")
|
||||
@ -31,18 +24,19 @@ task :gui => :library do
|
||||
else
|
||||
env["LIBS"] += ["GL"]
|
||||
end
|
||||
env.Program("bin/jes", Dir["src/gui/**/*.{cc,c}", "lib/lib#{NAME}.a"])
|
||||
env.Program("bin/jes", Dir["src/**/*.{cc,c}"])
|
||||
end
|
||||
end
|
||||
|
||||
task :test => :library do
|
||||
task :test => :default do
|
||||
base_env.clone(clone: :all) do |env|
|
||||
env["CPPPATH"] << "src"
|
||||
env["CPPPATH"] << "gtest-#{GTEST_VERSION}/include"
|
||||
env["CPPPATH"] << "gtest-#{GTEST_VERSION}"
|
||||
sources = Dir["gtest-#{GTEST_VERSION}/src/gtest-all.cc",
|
||||
"gtest-#{GTEST_VERSION}/src/gtest_main.cc",
|
||||
"test/src/**/*.cc",
|
||||
"lib/lib#{NAME}.a"]
|
||||
"src/**/*.{cc,c}",
|
||||
"test/src/**/*.cc"]
|
||||
env.Program("build/tests", sources)
|
||||
if RUBY_PLATFORM =~ /linux/
|
||||
env["LIBS"] << "pthread"
|
||||
@ -51,9 +45,7 @@ task :test => :library do
|
||||
system("./build/tests")
|
||||
end
|
||||
|
||||
task :default => :all
|
||||
|
||||
task :all => [:library, :gui]
|
||||
task :all => :default
|
||||
|
||||
task :clean do
|
||||
Rscons.clean
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "jes/Core.h"
|
||||
#include "Core.h"
|
||||
|
||||
namespace jes
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
#ifndef JES_CORE_H
|
||||
#define JES_CORE_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "jes/Path.h"
|
||||
#include "Ref.h"
|
||||
#include "Path.h"
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
@ -1,7 +1,6 @@
|
||||
#include "jes.h"
|
||||
#include "jes/FileLoader.h"
|
||||
#include "jes/FileReader.h"
|
||||
#include "jes/Text.h"
|
||||
#include "FileLoader.h"
|
||||
#include "FileReader.h"
|
||||
#include "Text.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
@ -1,8 +1,8 @@
|
||||
#ifndef JES_FILELOADER_H
|
||||
#define JES_FILELOADER_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "jes/Text.h"
|
||||
#include "Ref.h"
|
||||
#include "Text.h"
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "jes.h"
|
||||
#include "jes/FileReader.h"
|
||||
#include "FileReader.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
@ -1,7 +1,8 @@
|
||||
#ifndef JES_FILEREADER_H
|
||||
#define JES_FILEREADER_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Core.h"
|
||||
#include "Ref.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace jes
|
@ -1,7 +1,7 @@
|
||||
#ifndef JES_FONT_H
|
||||
#define JES_FONT_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include "gl3w.h"
|
@ -1,5 +1,5 @@
|
||||
#include "FontManager.h"
|
||||
#include "jes/Runtime.h"
|
||||
#include "Runtime.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace jes
|
@ -1,7 +1,7 @@
|
||||
#ifndef JES_FONTMANAGER_H
|
||||
#define JES_FONTMANAGER_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include "Font.h"
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
@ -1,8 +1,8 @@
|
||||
#ifndef GLBUFFER_H
|
||||
#define GLBUFFER_H
|
||||
|
||||
#include "Ref.h"
|
||||
#include "gl3w.h"
|
||||
#include "jes.h"
|
||||
|
||||
namespace jes
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
#ifndef GLPROGRAM_H
|
||||
#define GLPROGRAM_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include "GLShader.h"
|
||||
#include <map>
|
||||
#include <string>
|
@ -1,8 +1,8 @@
|
||||
#ifndef GLSHADER_H
|
||||
#define GLSHADER_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "jes/Path.h"
|
||||
#include "Ref.h"
|
||||
#include "Path.h"
|
||||
#include "gl3w.h"
|
||||
|
||||
namespace jes
|
@ -1,7 +1,7 @@
|
||||
#ifndef GLTEXTURE_H
|
||||
#define GLTEXTURE_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include "gl3w.h"
|
||||
#include <stdint.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "GUI.h"
|
||||
#include "gl3w.h"
|
||||
#include <iostream>
|
||||
#include "jes/Runtime.h"
|
||||
#include "Runtime.h"
|
||||
|
||||
#define WIDTH 500
|
||||
#define HEIGHT 500
|
@ -1,7 +1,7 @@
|
||||
#ifndef JES_GUI_H
|
||||
#define JES_GUI_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include <SDL.h>
|
||||
#include "FontManager.h"
|
||||
#include "GLProgram.h"
|
@ -1,5 +1,5 @@
|
||||
#include "jes/Path.h"
|
||||
#include "jes/FileReader.h"
|
||||
#include "Path.h"
|
||||
#include "FileReader.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
@ -1,7 +1,7 @@
|
||||
#ifndef JES_PATH_H
|
||||
#define JES_PATH_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
@ -1,4 +1,4 @@
|
||||
#include "jes/Runtime.h"
|
||||
#include "Runtime.h"
|
||||
|
||||
namespace jes
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
#ifndef JES_RUNTIME_H
|
||||
#define JES_RUNTIME_H
|
||||
|
||||
#include "jes/Core.h"
|
||||
#include "jes/Path.h"
|
||||
#include "Core.h"
|
||||
#include "Path.h"
|
||||
|
||||
namespace jes
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
#include "jes/Text.h"
|
||||
#include "Text.h"
|
||||
#include <string.h>
|
||||
|
||||
namespace jes
|
@ -2,7 +2,7 @@
|
||||
#define JES_TEXT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "jes/Ref.h"
|
||||
#include "Ref.h"
|
||||
#include <string>
|
||||
|
||||
namespace jes
|
@ -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,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include "GUI.h"
|
||||
|
||||
#include "jes.h"
|
||||
#include "Core.h"
|
||||
|
||||
using namespace std;
|
||||
|
Loading…
x
Reference in New Issue
Block a user