summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-11-21 13:56:37 -0500
committerFox Caminiti <fox@foxcam.net>2022-11-21 13:56:37 -0500
commit09c6cb9e3be2655b842e13dd68879cb10cf52acf (patch)
tree62b19be03e7fd0e9235953e8517980e7c11b059e /build.sh
parent990bd319c696c2b65fa858b40fd75279fec2a13b (diff)
things
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh20
1 files changed, 2 insertions, 18 deletions
diff --git a/build.sh b/build.sh
index e0df0d4..31a9eed 100755
--- a/build.sh
+++ b/build.sh
@@ -1,13 +1,10 @@
#!/bin/bash
-WINDOWS=0 # Compile for Windows with Mingw.
ARM=0 # Compile on ARM machines.
OPTIMIZATION="-O2" # Enable optimization.
DEBUG=0 # Compile with debug UI.
IMGUI=1 # Compile ImGui libs. Our custom ImGui functions still compile on zero.
-THREADED=1 # Compile with threading. Useful to disable when stepping through the renderer.
-PACKEDRGB=0 # Use 4x4 chunks for the software rasterizer. Isn't actually faster at the moment.
PERF=0 # Print cycle stats.
# Add flag overrides to this file (it's untracked on the tree)
@@ -53,9 +50,6 @@ fi
if [[ "$THREADED" == 1 ]]; then
WARNING_FLAGS="$WARNING_FLAGS -DTHREADED=1"
fi
-if [[ "$WINDOWS" == 1 ]]; then
-WARNING_FLAGS="$WARNING_FLAGS -DWINDOWS=1"
-fi
if [[ "$ARM" == 1 ]]; then
WARNING_FLAGS="$WARNING_FLAGS -DARM=1"
ADDITIONAL_FLAGS="
@@ -66,9 +60,6 @@ ADDITIONAL_FLAGS="
-march=native
"
fi
-if [[ "$PACKEDRGB" == 1 ]]; then
-WARNING_FLAGS="$WARNING_FLAGS -DPACKEDRGB=1"
-fi
if [[ "$PERF" == 1 ]]; then
WARNING_FLAGS="$WARNING_FLAGS -DPERF=1"
fi
@@ -107,19 +98,12 @@ if [[ "$IMGUI" == 1 ]]; then
done
fi
-if [[ "$WINDOWS" == 1 ]]; then
-clang++ $OPTIMIZATION $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 \
- -o bin/real2d
-else
clang lib/glad.c $GLAD_FLAGS -I/usr/local/include -I/opt/local/include -c \
$WARNING_FLAGS $OPTIMIZATION $ADDITIONAL_FLAGS -o bin/glad.o
clang main.cpp $WARNING_FLAGS $OPTIMIZATION $ADDITIONAL_FLAGS -o bin/real2d bin/*.o \
$GLAD_FLAGS \
- -std=c++11 -lstdc++ -lcurl -Iimgui -Iimgui/backends \
+ -std=c++11 -lstdc++ -Iimgui -Iimgui/backends \
$SDL_ARGS \
-I . \
-lm -I /usr/local/include $(pkg-config --cflags --libs $FFMPEG_LIBS)
-fi
+# -lcurl