aboutsummaryrefslogtreecommitdiff
path: root/make.sh
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-09-11 23:22:50 -0400
committerBobby <[email protected]>2023-09-11 23:22:50 -0400
commit2876b8b38f699b3062230a7b570b45cc7399716e (patch)
tree16044732c690de0b92cdbd1f91135825b3f5c299 /make.sh
downloadgameoflife-2876b8b38f699b3062230a7b570b45cc7399716e.tar.xz
gameoflife-2876b8b38f699b3062230a7b570b45cc7399716e.zip
Added Game of Life
Diffstat (limited to 'make.sh')
-rwxr-xr-xmake.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/make.sh b/make.sh
new file mode 100755
index 0000000..f483b85
--- /dev/null
+++ b/make.sh
@@ -0,0 +1,17 @@
+echo "Creating build directory... (if it doesn't exist)"
+mkdir -p build
+
+echo "Removing old gameOfLife... (if it exists)"
+rm -f build/gameOfLife
+
+echo "Building gameOfLife..."
+echo "C++ version: $(clang++ --version)"
+echo "SDL2 version: $(sdl2-config --version)"
+
+echo "Setting C++20 standard and libc++ as the standard library..."
+echo "Including SDL2 headers from /opt/homebrew/include..."
+echo "Linking SDL2 libraries from /opt/homebrew/lib..."
+
+clang++ -std=c++20 -stdlib=libc++ src/gameOfLife.cpp -I/opt/homebrew/include -L/opt/homebrew/lib/ -lSDL2 -o build/gameOfLife
+
+echo "gameOfLife built successfully"