diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index 12e2483..43adef0 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,5 +2,10 @@ cmake_minimum_required(VERSION 3.10) project(flark) -add_executable(flark main.cpp vec3.h colour.h) +file(GLOB flark_src + "src/*.h" + "src/*.cpp" +) + +add_executable(flark ${flark_src}) diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/run.sh b/run.sh index a4a3405..aa54cc5 100755 --- a/run.sh +++ b/run.sh @@ -2,6 +2,12 @@ bin=./flark output=image.ppm viewer=$(which feh) +if [ -f $bin ]; +then + echo "Removing old binary" + rm $bin +fi + # generate makefile cmake . diff --git a/colour.h b/src/colour.h old mode 100644 new mode 100755 similarity index 100% rename from colour.h rename to src/colour.h diff --git a/main.cpp b/src/main.cpp old mode 100644 new mode 100755 similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/vec3.h b/src/vec3.h old mode 100644 new mode 100755 similarity index 100% rename from vec3.h rename to src/vec3.h