diff --git a/src/FileLoader.cc b/src/core/FileLoader.cc similarity index 100% rename from src/FileLoader.cc rename to src/core/FileLoader.cc diff --git a/src/FileLoader.h b/src/core/FileLoader.h similarity index 100% rename from src/FileLoader.h rename to src/core/FileLoader.h diff --git a/src/FileReader.cc b/src/core/FileReader.cc similarity index 100% rename from src/FileReader.cc rename to src/core/FileReader.cc diff --git a/src/FileReader.h b/src/core/FileReader.h similarity index 100% rename from src/FileReader.h rename to src/core/FileReader.h diff --git a/wscript b/wscript index 9881748..511531c 100644 --- a/wscript +++ b/wscript @@ -1,5 +1,6 @@ import platform import re +import os.path def options(opt): opt.load("compiler_c compiler_cxx") @@ -9,23 +10,26 @@ def configure(conf): conf.check(header_name = "getopt.h") def build(bld): + includes = [p for p in bld.path.ant_glob("src/**", dir = True) if os.path.isdir(p.abspath())] bld(features = "c cprogram cxx cxxprogram", target = "jes", source = bld.path.ant_glob(["src/**/*.cc", "src/**/*.c"]), + includes = includes, cxxflags = ["-Wall", "-std=gnu++14"], lib = ["dl", "GL"]) test_libs = [] if re.search(r'linux', platform.platform(), re.IGNORECASE): test_libs += ["pthread"] - test_sources = bld.path.ant_glob("src/**/*.cc") - test_sources = [s for s in test_sources if not s.abspath().endswith("src/jes.cc")] + test_sources = bld.path.ant_glob("src/core/**/*.cc") test_sources += bld.path.ant_glob("test/src/**/*.cc") test_sources += ["gtest-1.7.0/src/gtest-all.cc", "gtest-1.7.0/src/gtest_main.cc"] + test_includes = ["src/core"] + test_includes += ["gtest-1.7.0/include", "gtest-1.7.0"] bld(features = "cxx cxxprogram", target = "tests", source = test_sources, - includes = ["gtest-1.7.0/include", "gtest-1.7.0", "src"], + includes = test_includes, lib = test_libs, cxxflags = ["-Wall", "-std=gnu++14"])