diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-05-17 18:49:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-05-17 18:49:39 +0200 |
commit | 93f6cb2a1b224235a6bc72c92e7912b3daf3983b (patch) | |
tree | efb637ffb3a7f9187a02abf9a51c6da89b31ea00 /build.sh | |
parent | b15a7cbccf06993e9b3210beb8d1c58db36bdbfb (diff) |
Add debug option to build script
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,8 +1,11 @@ #!/bin/sh -e +opts="-O2 -g0 -DNDEBUG -Wall -Wextra -Werror -s" +[ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra -Werror"; + dependencies="gtk+-3.0 x11 xrandr libpulse" includes="$(pkg-config --cflags $dependencies)" libs="$(pkg-config --libs $dependencies) -ldl" -gcc -c src/egl.c -O2 -g0 -DNDEBUG $includes -g++ -c src/main.cpp -O2 -g0 -DNDEBUG $includes -g++ -o gpu-screen-recorder-gtk -O2 egl.o main.o -s $libs +gcc -c src/egl.c $opts $includes +g++ -c src/main.cpp $opts $includes +g++ -o gpu-screen-recorder-gtk -O2 egl.o main.o $libs $opts |