Files
somaesque-native/build
2026-02-08 00:19:25 +01:00

18 lines
395 B
Bash
Executable File

#!/bin/bash
LIB_INCLUDE="-lglfw -lGL -lm"
COMMON_FLAGS="-DOS_LINUX=1 -xc -std=c99"
echo [Building target]
if [ $DEBUG ]; then
time clang -O0 -g -g2 $COMMON_FLAGS -DDJSTDLIB_DEBUG=1 ./src/main.c -o ./target/somaesque $LIB_INCLUDE
else
time clang -O3 $COMMON_FLAGS ./src/main.c -o ./target/somaesque $LIB_INCLUDE
fi
echo [Target built]
if [ "$1" == "run" ]; then
./target/somaesque
fi