vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: 6a8b35157a071ca75833b57576237a533fd5ec09
Parent: cec0499bd52edb679930f506c4d154d0d80770d8
Author: Randy Palamar
Date:   Tue, 20 Aug 2024 09:06:35 -0600

build.sh: split up debug and non-debug builds

Diffstat:
Mbuild.sh | 28++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/build.sh b/build.sh @@ -1,19 +1,27 @@ #!/bin/sh -cflags="-march=native -ggdb -O0 -Wall" +cc=${CC:-cc} +debug=${DEBUG} + +cflags="-march=native -O3 -Wall" cflags="$cflags $(pkg-config --cflags glfw3 gl fontconfig)" ldflags="" ldflags="$ldflags $(pkg-config --static --libs glfw3 gl fontconfig)" -# Hot Reloading/Debugging -cflags="$cflags -D_DEBUG -Wno-unused-function -Wno-undefined-internal" -#cflags="$cflags -fsanitize=address,undefined" +testcflags="$cflags -D_DEBUG -Wno-unused-function -Wno-undefined-internal" + +[ ! -s "./config.h" ] && cp config.def.h config.h + +if [ $debug ]; then + # Hot Reloading/Debugging + cflags="$cflags -ggdb -O0 -D_DEBUG -Wno-unused-function -Wno-undefined-internal" + #cflags="$cflags -fsanitize=address,undefined" -libcflags="$cflags -fPIC -Wno-unused-function" -libldflags="$ldflags -shared" + libcflags="$cflags -fPIC -Wno-unused-function" + libldflags="$ldflags -shared" -if ! [ -s "./config.h" ]; then cp ./config.def.h ./config.h; fi + ${cc} $libcflags vtgl.c -o vtgl.so $libldflags +fi -cc $libcflags vtgl.c -o vtgl.so $libldflags -cc $cflags -o vtgl main.c $ldflags -cc $cflags -o test test.c $ldflags +${cc} $cflags -o vtgl main.c $ldflags +${cc} $testcflags -o test test.c $ldflags