aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorSteam Deck User <deck@arch.steamdeck>2023-03-16 13:36:19 +0100
committerdec05eba <dec05eba@protonmail.com>2023-03-17 11:44:51 +0100
commit8cbdb596ebf79587a432ed40583630b6cd39ed88 (patch)
tree82c60558aaaa7a1fc1eb9ffc388f1dd84a9529d2 /build.sh
parent689419a78238626aba887e974cbfcf5dff99de81 (diff)
vaapi wip
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh24
1 files changed, 13 insertions, 11 deletions
diff --git a/build.sh b/build.sh
index 3d3745d..5989604 100755
--- a/build.sh
+++ b/build.sh
@@ -4,15 +4,17 @@
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr libpulse libswresample libavfilter"
includes="$(pkg-config --cflags $dependencies)"
libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm"
-gcc -c src/capture/capture.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/capture/nvfbc.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/capture/xcomposite_cuda.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/capture/xcomposite_drm.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/egl.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/cuda.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/window_texture.c -O2 -g0 -DNDEBUG $includes
-gcc -c src/time.c -O2 -g0 -DNDEBUG $includes
-g++ -c src/sound.cpp -O2 -g0 -DNDEBUG $includes
-g++ -c src/main.cpp -O2 -g0 -DNDEBUG $includes
-g++ -o gpu-screen-recorder -O2 capture.o nvfbc.o egl.o cuda.o window_texture.o time.o xcomposite_cuda.o xcomposite_drm.o sound.o main.o -s $libs
+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
+gcc -c src/capture/xcomposite_drm.c $opts $includes
+gcc -c src/egl.c $opts $includes
+gcc -c src/cuda.c $opts $includes
+gcc -c src/vaapi.c $opts $includes
+gcc -c src/window_texture.c $opts $includes
+gcc -c src/time.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 egl.o cuda.o vaapi.o window_texture.o time.o xcomposite_cuda.o xcomposite_drm.o sound.o main.o -s $libs
echo "Successfully built gpu-screen-recorder"