Initial commit.

This commit is contained in:
2026-03-08 14:53:55 -07:00
commit 0717d54f63
106 changed files with 59106 additions and 0 deletions
Executable
+53
View File
@@ -0,0 +1,53 @@
#!/bin/sh
mkdir -p ../../build
program_run() {
clear
../../build/handmadehero
}
program_compile() { #-std=c99 -pedantic
clear
clang++ -Wall -Wextra -Wno-unused-function -fno-caret-diagnostics \
-fno-show-column -Wno-missing-field-initializers -Wno-unused-parameter\
-Wno-unused-variable -Wno-unused-but-set-variable -I./sdl/include/ "$@" sdl_handmade.cpp \
./sdl/lib/arm-macos/libSDL2.a \
-framework Cocoa \
-framework IOKit \
-framework CoreAudio \
-framework AudioToolbox \
-framework ForceFeedback \
-framework Carbon \
-framework GameController \
-framework Metal \
-framework QuartzCore \
-framework CoreHaptics \
-o ../../build/handmadehero
#./sdl/lib/x86_64-linux/libSDL2.a -lX11 \
}
if [ "$#" -lt 1 ]; then
# program_compile "-O0" "-ggdb"
program_compile "-O0" "-glldb"
else
if [ "$1" = "run" ]; then
program_run
elif [ "$1" = "no-debug" ]; then
program_compile "-O0" "-ggdb" "-DBUILD_DEBUG=0"
elif [ "$1" = "no-internal" ]; then
program_compile "-O0" "-ggdb" "-DBUILD_INTERNAL=0"
elif [ "$1" = "no-debug-no-internal" ] || [ "$1" = "no-internal-no-debug" ]; then
program_compile "-O0" "-ggdb" "-DBUILD_DEBUG=0" "-DBUILD_INTERNAL=0"
elif [ "$1" = "perf" ]; then
program_compile "-O3"
elif [ "$1" = "debugger" ]; then
kdbg ../../build/handmadehero > /dev/null 2>&1 &
disown
elif [ "$1" = "tags" ] || [ "$1" = "ctags" ]; then
ctags -R *.h *.cpp
else
echo "Unknown command . . ."
fi
fi