diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-05-17 18:49:16 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-05-17 18:49:16 +0200 |
commit | 6cff1a49d2b124266f8da41065c471d80cdd32e2 (patch) | |
tree | ff15da38af695c0bb149165db201765e0f4fc050 /build.sh | |
parent | 715a3c612a606465ee5526efe53029741ee4c7f9 (diff) |
Fix all warnings
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,19 +1,20 @@ #!/bin/sh -e +opts="-O2 -g0 -DNDEBUG -Wall -Wextra -Werror -s" +[ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra -Werror"; + build_gsr_kms_server() { dependencies="libdrm" includes="$(pkg-config --cflags $dependencies)" libs="$(pkg-config --libs $dependencies) -ldl" - opts="-O2 -g0 -DNDEBUG" gcc -c kms/server/kms_server.c $opts $includes - gcc -o gsr-kms-server -O2 kms_server.o -s $libs + gcc -o gsr-kms-server -O2 kms_server.o $libs $opts } build_gsr() { dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr xfixes libpulse libswresample libavfilter libva libcap" includes="$(pkg-config --cflags $dependencies)" libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm" - opts="-O2 -g0 -DNDEBUG" gcc -c src/capture/capture.c $opts $includes gcc -c src/capture/nvfbc.c $opts $includes gcc -c src/capture/xcomposite_cuda.c $opts $includes @@ -32,7 +33,7 @@ build_gsr() { gcc -c src/library_loader.c $opts $includes g++ -c src/sound.cpp $opts $includes g++ -c src/main.cpp $opts $includes - g++ -o gpu-screen-recorder -O2 capture.o nvfbc.o kms_client.o egl.o cuda.o xnvctrl.o overclock.o window_texture.o shader.o color_conversion.o cursor.o utils.o library_loader.o xcomposite_cuda.o xcomposite_vaapi.o kms_vaapi.o sound.o main.o -s $libs + g++ -o gpu-screen-recorder -O2 capture.o nvfbc.o kms_client.o egl.o cuda.o xnvctrl.o overclock.o window_texture.o shader.o color_conversion.o cursor.o utils.o library_loader.o xcomposite_cuda.o xcomposite_vaapi.o kms_vaapi.o sound.o main.o $libs $opts } build_gsr_kms_server |