Set up basic build process

This commit is contained in:
Abdelrahman Said 2023-12-18 11:02:30 +00:00
parent d8a44f57ed
commit dd290f4094
3 changed files with 20 additions and 0 deletions

3
build Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
bear -- ./compile "$@"

14
compile Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
CC=clang
CFLAGS="-g -Wall -Werror -pedantic -Iinclude $(pkg-config --cflags sdl2)"
LIBS="$(pkg-config --libs sdl2)"
SRC="src/*.c"
BUILD=build_dir
OUT="$BUILD/main"
mkdir -p $BUILD
(set -x ; $CC $CFLAGS $LIBS $SRC -o $OUT)

3
run Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
./build_dir/main