Jean-Michel Gorius f6278ce63e Simplify the Hittable API
We need to disable strict aliasing, but it is weird anyways:
https://blog.regehr.org/archives/1307
2022-11-11 11:27:00 +01:00

14 lines
326 B
Bash
Executable File

#!/bin/bash
CC=${CC:-"gcc"}
CFLAGS=${CFLAGS:-"-Wall -Wextra -std=gnu18 -fno-strict-aliasing -g"}
LDFLAGS=${LDFLAGS:-"-lm"}
MAIN_FILE=${MAIN_FILE:-"main.c"}
# Write out compile_flags.txt for clangd
echo "${CFLAGS}" | tr ' ' '\n' > compile_flags.txt
mkdir -p build
${CC} ${CFLAGS} ${MAIN_FILE} -o build/raytracer ${LDFLAGS}