summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2024-03-12 03:55:58 +0500
committertalha <talha@talhaamir.xyz>2024-03-12 03:55:58 +0500
commit008997aa2107ae6940b2895b320f574adc85a114 (patch)
treeddf757fa9fb930115b4ed35cb8528ced978e1a8d /build.sh
Added project files to git
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..b9c1793
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+build_mode="debug" # temporary for now
+
+build_dir="build"
+mkdir -p $build_dir
+
+include_path=include
+include_opts="-I $include_path"
+
+files="main.cpp $include_path/glad/glad.c"
+build_opts="$build_dir/main"
+
+lib_path="lib/SDL2"
+link_opts="-L $lib_path -lSDL2"
+
+build_command="g++ -g -Og $include_opts $files $link_opts -o $build_opts"
+
+printf "Building your sdl2 project.\n\nThis is the build command for posteritys' sake:\n\n"
+printf "$build_command\n\n"
+$build_command
+printf "Build Complete!\n"