summaryrefslogtreecommitdiff
path: root/build_osx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build_osx.sh')
-rw-r--r--build_osx.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/build_osx.sh b/build_osx.sh
new file mode 100644
index 0000000..82b41db
--- /dev/null
+++ b/build_osx.sh
@@ -0,0 +1,19 @@
+shopt -s extglob
+
+OUT_DIR="bin/debug"
+FLAGS="-g3 -w"
+
+if [[ $* == *-release* ]]; then
+ OUT_DIR="bin/release"
+ FLAGS="-O3"
+fi
+
+mkdir -p $OUT_DIR
+
+# misc items are converted to header files, not embedded. (xxd -i LICENSE misc/osx/LICENSE.h)
+
+g++ -m64 -std=c++17 $FLAGS -DUNICODE -o $OUT_DIR/text-search imgui/imgui*.cpp imgui/backends/imgui_impl_glfw.cpp src/widgets/*.cpp src/*.cpp imfiledialog/*.cpp src/osx/*.cpp -Iimgui -Iimgui/backends -Isrc -Isrc/osx -pthread -ldl -lglfw -lGL
+
+if [[ $* == *-r* ]]; then
+ ./$OUT_DIR/text-search
+fi \ No newline at end of file