From 24b4b4855563b8c4f77a81905b4addabb69f6dbb Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 12 Sep 2019 20:31:38 -0400 Subject: [PATCH] move sources to src directory --- Rsconscript | 12 +++++++----- {distrib => src/distrib}/distrib.cc | 0 {distrib => src/distrib}/distrib.h | 0 {main => src/main}/BMP.cc | 0 {main => src/main}/BMP.h | 0 {main => src/main}/Light.cc | 0 {main => src/main}/Light.h | 0 {main => src/main}/PointLight.cc | 0 {main => src/main}/PointLight.h | 0 {main => src/main}/Scene-load.cc | 0 {main => src/main}/Scene.cc | 0 {main => src/main}/Scene.h | 0 {main => src/main}/fart.cc | 0 {parser => src/parser}/nodes.cc | 0 {parser => src/parser}/nodes.h | 0 {parser => src/parser}/parser.h | 0 {parser => src/parser}/parser.ll | 0 {parser => src/parser}/parser.yy | 0 {parser => src/parser}/preparser.cc | 0 {shapes => src/shapes}/BoolShape.cc | 0 {shapes => src/shapes}/BoolShape.h | 0 {shapes => src/shapes}/Box.cc | 0 {shapes => src/shapes}/Box.h | 0 {shapes => src/shapes}/Cyl.cc | 0 {shapes => src/shapes}/Cyl.h | 0 {shapes => src/shapes}/Extrude.cc | 0 {shapes => src/shapes}/Extrude.h | 0 {shapes => src/shapes}/Intersect.cc | 0 {shapes => src/shapes}/Intersect.h | 0 {shapes => src/shapes}/Plane.cc | 0 {shapes => src/shapes}/Plane.h | 0 {shapes => src/shapes}/Shape.cc | 0 {shapes => src/shapes}/Shape.h | 0 {shapes => src/shapes}/Sphere.cc | 0 {shapes => src/shapes}/Sphere.h | 0 {shapes => src/shapes}/Subtract.cc | 0 {shapes => src/shapes}/Subtract.h | 0 {shapes => src/shapes}/Union.cc | 0 {shapes => src/shapes}/Union.h | 0 {shapes => src/shapes}/shapes.h | 0 {util => src/util}/AABB.h | 0 {util => src/util}/Color.cc | 0 {util => src/util}/Color.h | 0 {util => src/util}/Material.h | 0 {util => src/util}/Matrix.cc | 0 {util => src/util}/Matrix.h | 0 {util => src/util}/Polygon.cc | 0 {util => src/util}/Polygon.h | 0 {util => src/util}/Ray.cc | 0 {util => src/util}/Ray.h | 0 {util => src/util}/Scope.h | 0 {util => src/util}/Solver.cc | 0 {util => src/util}/Solver.h | 0 {util => src/util}/Transform.cc | 0 {util => src/util}/Transform.h | 0 {util => src/util}/Vector.cc | 0 {util => src/util}/Vector.h | 0 {util => src/util}/refptr.h | 0 58 files changed, 7 insertions(+), 5 deletions(-) rename {distrib => src/distrib}/distrib.cc (100%) rename {distrib => src/distrib}/distrib.h (100%) rename {main => src/main}/BMP.cc (100%) rename {main => src/main}/BMP.h (100%) rename {main => src/main}/Light.cc (100%) rename {main => src/main}/Light.h (100%) rename {main => src/main}/PointLight.cc (100%) mode change 100755 => 100644 rename {main => src/main}/PointLight.h (100%) rename {main => src/main}/Scene-load.cc (100%) rename {main => src/main}/Scene.cc (100%) rename {main => src/main}/Scene.h (100%) rename {main => src/main}/fart.cc (100%) rename {parser => src/parser}/nodes.cc (100%) rename {parser => src/parser}/nodes.h (100%) rename {parser => src/parser}/parser.h (100%) rename {parser => src/parser}/parser.ll (100%) rename {parser => src/parser}/parser.yy (100%) rename {parser => src/parser}/preparser.cc (100%) rename {shapes => src/shapes}/BoolShape.cc (100%) rename {shapes => src/shapes}/BoolShape.h (100%) rename {shapes => src/shapes}/Box.cc (100%) rename {shapes => src/shapes}/Box.h (100%) rename {shapes => src/shapes}/Cyl.cc (100%) rename {shapes => src/shapes}/Cyl.h (100%) rename {shapes => src/shapes}/Extrude.cc (100%) rename {shapes => src/shapes}/Extrude.h (100%) rename {shapes => src/shapes}/Intersect.cc (100%) rename {shapes => src/shapes}/Intersect.h (100%) rename {shapes => src/shapes}/Plane.cc (100%) rename {shapes => src/shapes}/Plane.h (100%) rename {shapes => src/shapes}/Shape.cc (100%) mode change 100755 => 100644 rename {shapes => src/shapes}/Shape.h (100%) rename {shapes => src/shapes}/Sphere.cc (100%) rename {shapes => src/shapes}/Sphere.h (100%) rename {shapes => src/shapes}/Subtract.cc (100%) rename {shapes => src/shapes}/Subtract.h (100%) rename {shapes => src/shapes}/Union.cc (100%) rename {shapes => src/shapes}/Union.h (100%) rename {shapes => src/shapes}/shapes.h (100%) rename {util => src/util}/AABB.h (100%) rename {util => src/util}/Color.cc (100%) rename {util => src/util}/Color.h (100%) rename {util => src/util}/Material.h (100%) rename {util => src/util}/Matrix.cc (100%) rename {util => src/util}/Matrix.h (100%) rename {util => src/util}/Polygon.cc (100%) rename {util => src/util}/Polygon.h (100%) rename {util => src/util}/Ray.cc (100%) rename {util => src/util}/Ray.h (100%) rename {util => src/util}/Scope.h (100%) rename {util => src/util}/Solver.cc (100%) rename {util => src/util}/Solver.h (100%) rename {util => src/util}/Transform.cc (100%) rename {util => src/util}/Transform.h (100%) rename {util => src/util}/Vector.cc (100%) rename {util => src/util}/Vector.h (100%) rename {util => src/util}/refptr.h (100%) diff --git a/Rsconscript b/Rsconscript index 068fa23..7fdfeea 100644 --- a/Rsconscript +++ b/Rsconscript @@ -9,13 +9,15 @@ end build do Environment.new do |env| - subdirs = %w[util shapes main distrib parser] env["CCFLAGS"] += %w[-Wall -O2] - env["CPPPATH"] += %w[.] + subdirs + ["#{env.build_root}/parser"] - sources = glob("{#{subdirs.join(",")}}/*.cc") + env["CPPPATH"] += glob("src/**") + + env.CFile("^/parser/lexer.cc", "src/parser/parser.ll") + env.CFile("^/parser/parser.cc", "src/parser/parser.yy") + env["CPPPATH"] += ["#{env.build_root}/parser"] + + sources = glob("src/**/*.cc") sources += ["^/parser/lexer.cc", "^/parser/parser.cc"] - env.CFile("^/parser/lexer.cc", "parser/parser.ll") - env.CFile("^/parser/parser.cc", "parser/parser.yy") env.Program("fart", sources) end end diff --git a/distrib/distrib.cc b/src/distrib/distrib.cc similarity index 100% rename from distrib/distrib.cc rename to src/distrib/distrib.cc diff --git a/distrib/distrib.h b/src/distrib/distrib.h similarity index 100% rename from distrib/distrib.h rename to src/distrib/distrib.h diff --git a/main/BMP.cc b/src/main/BMP.cc similarity index 100% rename from main/BMP.cc rename to src/main/BMP.cc diff --git a/main/BMP.h b/src/main/BMP.h similarity index 100% rename from main/BMP.h rename to src/main/BMP.h diff --git a/main/Light.cc b/src/main/Light.cc similarity index 100% rename from main/Light.cc rename to src/main/Light.cc diff --git a/main/Light.h b/src/main/Light.h similarity index 100% rename from main/Light.h rename to src/main/Light.h diff --git a/main/PointLight.cc b/src/main/PointLight.cc old mode 100755 new mode 100644 similarity index 100% rename from main/PointLight.cc rename to src/main/PointLight.cc diff --git a/main/PointLight.h b/src/main/PointLight.h similarity index 100% rename from main/PointLight.h rename to src/main/PointLight.h diff --git a/main/Scene-load.cc b/src/main/Scene-load.cc similarity index 100% rename from main/Scene-load.cc rename to src/main/Scene-load.cc diff --git a/main/Scene.cc b/src/main/Scene.cc similarity index 100% rename from main/Scene.cc rename to src/main/Scene.cc diff --git a/main/Scene.h b/src/main/Scene.h similarity index 100% rename from main/Scene.h rename to src/main/Scene.h diff --git a/main/fart.cc b/src/main/fart.cc similarity index 100% rename from main/fart.cc rename to src/main/fart.cc diff --git a/parser/nodes.cc b/src/parser/nodes.cc similarity index 100% rename from parser/nodes.cc rename to src/parser/nodes.cc diff --git a/parser/nodes.h b/src/parser/nodes.h similarity index 100% rename from parser/nodes.h rename to src/parser/nodes.h diff --git a/parser/parser.h b/src/parser/parser.h similarity index 100% rename from parser/parser.h rename to src/parser/parser.h diff --git a/parser/parser.ll b/src/parser/parser.ll similarity index 100% rename from parser/parser.ll rename to src/parser/parser.ll diff --git a/parser/parser.yy b/src/parser/parser.yy similarity index 100% rename from parser/parser.yy rename to src/parser/parser.yy diff --git a/parser/preparser.cc b/src/parser/preparser.cc similarity index 100% rename from parser/preparser.cc rename to src/parser/preparser.cc diff --git a/shapes/BoolShape.cc b/src/shapes/BoolShape.cc similarity index 100% rename from shapes/BoolShape.cc rename to src/shapes/BoolShape.cc diff --git a/shapes/BoolShape.h b/src/shapes/BoolShape.h similarity index 100% rename from shapes/BoolShape.h rename to src/shapes/BoolShape.h diff --git a/shapes/Box.cc b/src/shapes/Box.cc similarity index 100% rename from shapes/Box.cc rename to src/shapes/Box.cc diff --git a/shapes/Box.h b/src/shapes/Box.h similarity index 100% rename from shapes/Box.h rename to src/shapes/Box.h diff --git a/shapes/Cyl.cc b/src/shapes/Cyl.cc similarity index 100% rename from shapes/Cyl.cc rename to src/shapes/Cyl.cc diff --git a/shapes/Cyl.h b/src/shapes/Cyl.h similarity index 100% rename from shapes/Cyl.h rename to src/shapes/Cyl.h diff --git a/shapes/Extrude.cc b/src/shapes/Extrude.cc similarity index 100% rename from shapes/Extrude.cc rename to src/shapes/Extrude.cc diff --git a/shapes/Extrude.h b/src/shapes/Extrude.h similarity index 100% rename from shapes/Extrude.h rename to src/shapes/Extrude.h diff --git a/shapes/Intersect.cc b/src/shapes/Intersect.cc similarity index 100% rename from shapes/Intersect.cc rename to src/shapes/Intersect.cc diff --git a/shapes/Intersect.h b/src/shapes/Intersect.h similarity index 100% rename from shapes/Intersect.h rename to src/shapes/Intersect.h diff --git a/shapes/Plane.cc b/src/shapes/Plane.cc similarity index 100% rename from shapes/Plane.cc rename to src/shapes/Plane.cc diff --git a/shapes/Plane.h b/src/shapes/Plane.h similarity index 100% rename from shapes/Plane.h rename to src/shapes/Plane.h diff --git a/shapes/Shape.cc b/src/shapes/Shape.cc old mode 100755 new mode 100644 similarity index 100% rename from shapes/Shape.cc rename to src/shapes/Shape.cc diff --git a/shapes/Shape.h b/src/shapes/Shape.h similarity index 100% rename from shapes/Shape.h rename to src/shapes/Shape.h diff --git a/shapes/Sphere.cc b/src/shapes/Sphere.cc similarity index 100% rename from shapes/Sphere.cc rename to src/shapes/Sphere.cc diff --git a/shapes/Sphere.h b/src/shapes/Sphere.h similarity index 100% rename from shapes/Sphere.h rename to src/shapes/Sphere.h diff --git a/shapes/Subtract.cc b/src/shapes/Subtract.cc similarity index 100% rename from shapes/Subtract.cc rename to src/shapes/Subtract.cc diff --git a/shapes/Subtract.h b/src/shapes/Subtract.h similarity index 100% rename from shapes/Subtract.h rename to src/shapes/Subtract.h diff --git a/shapes/Union.cc b/src/shapes/Union.cc similarity index 100% rename from shapes/Union.cc rename to src/shapes/Union.cc diff --git a/shapes/Union.h b/src/shapes/Union.h similarity index 100% rename from shapes/Union.h rename to src/shapes/Union.h diff --git a/shapes/shapes.h b/src/shapes/shapes.h similarity index 100% rename from shapes/shapes.h rename to src/shapes/shapes.h diff --git a/util/AABB.h b/src/util/AABB.h similarity index 100% rename from util/AABB.h rename to src/util/AABB.h diff --git a/util/Color.cc b/src/util/Color.cc similarity index 100% rename from util/Color.cc rename to src/util/Color.cc diff --git a/util/Color.h b/src/util/Color.h similarity index 100% rename from util/Color.h rename to src/util/Color.h diff --git a/util/Material.h b/src/util/Material.h similarity index 100% rename from util/Material.h rename to src/util/Material.h diff --git a/util/Matrix.cc b/src/util/Matrix.cc similarity index 100% rename from util/Matrix.cc rename to src/util/Matrix.cc diff --git a/util/Matrix.h b/src/util/Matrix.h similarity index 100% rename from util/Matrix.h rename to src/util/Matrix.h diff --git a/util/Polygon.cc b/src/util/Polygon.cc similarity index 100% rename from util/Polygon.cc rename to src/util/Polygon.cc diff --git a/util/Polygon.h b/src/util/Polygon.h similarity index 100% rename from util/Polygon.h rename to src/util/Polygon.h diff --git a/util/Ray.cc b/src/util/Ray.cc similarity index 100% rename from util/Ray.cc rename to src/util/Ray.cc diff --git a/util/Ray.h b/src/util/Ray.h similarity index 100% rename from util/Ray.h rename to src/util/Ray.h diff --git a/util/Scope.h b/src/util/Scope.h similarity index 100% rename from util/Scope.h rename to src/util/Scope.h diff --git a/util/Solver.cc b/src/util/Solver.cc similarity index 100% rename from util/Solver.cc rename to src/util/Solver.cc diff --git a/util/Solver.h b/src/util/Solver.h similarity index 100% rename from util/Solver.h rename to src/util/Solver.h diff --git a/util/Transform.cc b/src/util/Transform.cc similarity index 100% rename from util/Transform.cc rename to src/util/Transform.cc diff --git a/util/Transform.h b/src/util/Transform.h similarity index 100% rename from util/Transform.h rename to src/util/Transform.h diff --git a/util/Vector.cc b/src/util/Vector.cc similarity index 100% rename from util/Vector.cc rename to src/util/Vector.cc diff --git a/util/Vector.h b/src/util/Vector.h similarity index 100% rename from util/Vector.h rename to src/util/Vector.h diff --git a/util/refptr.h b/src/util/refptr.h similarity index 100% rename from util/refptr.h rename to src/util/refptr.h