summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh20
1 files changed, 6 insertions, 14 deletions
diff --git a/build.sh b/build.sh
index df94d61..39f05cd 100755
--- a/build.sh
+++ b/build.sh
@@ -1,26 +1,18 @@
#!/bin/bash
-WINDOWS=0
+WINDOWS=1
-
-if [[ "$WINDOWS" == 1 ]]; then
-WARNING_FLAGS="
- -Wall -Wextra \
- -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable \
- -Wno-missing-field-initializers -Wno-sign-compare -Wno-write-strings -Wno-unused-but-set-parameter \
- -Wno-missing-braces -Wno-format-security
- -fno-exceptions -Wno-strict-aliasing \
- -DDEBUG=1 -DARM=0 -DTHREADED=1 -DPACKEDRGB=1 -DWINDOWS=1 \
-"
-else
WARNING_FLAGS="
-Wall -Wextra \
-Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable \
-Wno-missing-field-initializers -Wno-sign-compare -Wno-write-strings -Wno-unused-but-set-parameter \
-Wno-missing-braces -Wno-format-security
-fno-exceptions -Wno-strict-aliasing \
- -DDEBUG=1 -DARM=0 -DTHREADED=1 -DPACKEDRGB=1 -DWINDOWS=0 \
+ -DDEBUG=1 -DARM=0 -DTHREADED=1 -DPACKEDRGB=1 \
"
+
+if [[ "$WINDOWS" == 1 ]]; then
+WARNING_FLAGS="$WARNING_FLAGS -DWINDOWS=1"
fi
@@ -76,7 +68,7 @@ fi
# imgui
if [[ "$WINDOWS" == 1 ]]; then
-clang++ $WARNING_FLAGS -g -target x86_64-pc-windows-gnu -march=x86-64-v3 -I .. -Iimgui -Iimgui/backends \
+clang++ -g $WARNING_FLAGS -target x86_64-pc-windows-gnu -march=x86-64-v3 -I .. -Iimgui -Iimgui/backends \
main.cpp imgui/imgui*.cpp imgui/backends/imgui_impl_sdl.cpp imgui/backends/imgui_impl_opengl3.cpp \
-I/usr/x86_64-w64-mingw32/include/SDL2 -I/usr/x86_64-w64-mingw32/include/GL \
-lmingw32 -lopengl32 -lSDL2main -lSDL2 -llibavcodec -llibswscale -llibavformat -llibavutil \