From 2380741bea16d5e3d54195c266e335cb131ac642 Mon Sep 17 00:00:00 2001 From: nasr Date: Sun, 29 Mar 2026 23:09:33 +0200 Subject: feature: moving rectangle --- build.sh | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index e602edb..b1e31be 100755 --- a/build.sh +++ b/build.sh @@ -1,29 +1,13 @@ #!/bin/sh set -eu - script_dir="$(dirname "$(readlink -f "$0")")" cd "$script_dir" - build_dir="build" mkdir -p "$build_dir" -compile() -{ - source="$1" - out="$2" - flags="${3:-}" - - common_flags="-I. -Wall -Wextra -Wno-unused-function -Wno-unused-variable" - linker_flags="-lX11 -lm" - - flags="$common_flags $flags $linker_flags" - - gcc $flags "$(readlink -f "$source")" -o "$build_dir"/"$out" -} - -# Build core shared lib -compile "source/core/core.h" "libcore.so" "-fPIC -shared -DCORE_UNITY" - -# Build app -compile "source/core/core.c" "app" "-L$build_dir -lcore" - +gcc -I. \ + -Wall -Wextra -Wno-unused-function -Wno-unused-variable \ + -DCORE_UNITY \ + source/core/core.c \ + -lX11 -lm \ + -o "$build_dir"/app -- cgit v1.3