diff --git a/README.md b/README.md index 8fa5977..d5ff693 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,8 @@ Inspired by Noita, this is a simple "falling sand" simulation to demonstrate the - The executable will be placed in `bin\` - run `bin\SandSim.exe` - **mac**: - - You'll need gcc - From the terminal, `cd`into the root directory for this project. - - run `bash ./proc/osx/gcc.sh` + - run `bash ./proc/osx/clang.sh` - The exectuable will be placed in `bin/` - run `./bin/SandSim` - **linux**: diff --git a/proc/osx/clang.sh b/proc/osx/clang.sh new file mode 100755 index 0000000..aa7c53b --- /dev/null +++ b/proc/osx/clang.sh @@ -0,0 +1,40 @@ +#!bin/sh + +rm -rf bin +mkdir bin +cd bin + +proj_root_dir=$(pwd)/../ + +flags=( + -std=c99 -ObjC +) + +# Include directories +inc=( + -I ../third_party/include/ + -I ../include/ +) + +# Source files +src=( + ../source/main.c + ../source/render_passes/*.c +) + +fworks=( + -framework OpenGL + -framework CoreFoundation + -framework CoreVideo + -framework IOKit + -framework Cocoa + -framework Carbon + +) + +clang -O3 ${fworks[*]} ${inc[*]} ${src[*]} ${flags[*]} -o SandSim + +cd .. + + +