From 0ed130b659b94b9b408a628bc4f198dbf705b85b Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 14 Jan 2024 16:50:15 +0000 Subject: [PATCH] Add basic build scripts --- .gitignore | 3 +++ build | 3 +++ compile | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 .gitignore create mode 100755 build create mode 100755 compile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e47b57 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.cache +compile_commands.json +main diff --git a/build b/build new file mode 100755 index 0000000..cd3a103 --- /dev/null +++ b/build @@ -0,0 +1,3 @@ +#!/bin/bash + +bear -- ./compile $@ diff --git a/compile b/compile new file mode 100755 index 0000000..67a10f1 --- /dev/null +++ b/compile @@ -0,0 +1,9 @@ +#!/bin/bash + +CC=clang +CFLAGS="-g -Wall $(pkg-config --cflags sdl2)" +LIBS="$(pkg-config --libs sdl2)" +SRC=main.c +OUT=main + +(set -x ; $CC $CFLAGS $LIBS $SRC -o $OUT)