diff --git a/compile b/compile index 465fedd..e765c18 100755 --- a/compile +++ b/compile @@ -11,9 +11,18 @@ RAYTRACER_SRC="src/window/*.c \ src/math/*.c \ " +RASTERISER_SRC="src/window/*.c \ + src/vector/*.c \ + src/scene/*.c \ + src/rasteriser/*.c \ + src/math/*.c \ +" + BUILD=build_dir RAYTRACER_OUT="$BUILD/raytracer" +RASTERISER_OUT="$BUILD/rasteriser" mkdir -p $BUILD (set -x ; $CC $CFLAGS $LIBS $RAYTRACER_SRC -o $RAYTRACER_OUT) +(set -x ; $CC $CFLAGS $LIBS $RASTERISER_SRC -o $RASTERISER_OUT) diff --git a/run b/run index b9b89d0..0cfa34a 100755 --- a/run +++ b/run @@ -3,8 +3,8 @@ USAGE="Usage: run (raytracer | rasteriser)" if [[ $# == 0 ]]; then - echo $USAGE - exit 1 + echo $USAGE + exit 1 fi while [[ $# -gt 0 ]]; do @@ -13,8 +13,12 @@ while [[ $# -gt 0 ]]; do RENDERER="raytracer" shift # past argument ;; + rasteriser) + RENDERER="rasteriser" + shift # past argument + ;; -*|--*|*) - echo $USAGE + echo $USAGE exit 1 ;; esac diff --git a/src/rasteriser/main.c b/src/rasteriser/main.c new file mode 100644 index 0000000..11ffbed --- /dev/null +++ b/src/rasteriser/main.c @@ -0,0 +1,7 @@ +#include +#include + +int main(void) { + printf("RASTERISER\n"); + return EXIT_SUCCESS; +}