cg-from-scratch/compile

17 lines
315 B
Bash

#!/bin/bash
CC=clang
CFLAGS="-g -Wall -Werror -pedantic -Iinclude $(pkg-config --cflags sdl2)"
LIBS="$(pkg-config --libs sdl2)"
RAYTRACER_SRC="src/window/*.c \
src/raytracer/*.c \
"
BUILD=build_dir
RAYTRACER_OUT="$BUILD/raytracer"
mkdir -p $BUILD
(set -x ; $CC $CFLAGS $LIBS $RAYTRACER_SRC -o $RAYTRACER_OUT)