From dd290f40941ed4a4e9c4febcd2454e1786b3f76c Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Mon, 18 Dec 2023 11:02:30 +0000 Subject: [PATCH] Set up basic build process --- build | 3 +++ compile | 14 ++++++++++++++ run | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 build create mode 100644 compile create mode 100644 run diff --git a/build b/build new file mode 100644 index 0000000..fde0b40 --- /dev/null +++ b/build @@ -0,0 +1,3 @@ +#!/bin/bash + +bear -- ./compile "$@" diff --git a/compile b/compile new file mode 100644 index 0000000..d99205d --- /dev/null +++ b/compile @@ -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) diff --git a/run b/run new file mode 100644 index 0000000..4485a73 --- /dev/null +++ b/run @@ -0,0 +1,3 @@ +#!/bin/bash + +./build_dir/main