gpu-screen-recorder/build.sh

23 lines
1002 B
Bash
Raw Normal View History

2022-01-30 22:24:20 +00:00
#!/bin/sh -e
2022-10-17 00:55:59 +00:00
#libdrm
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr libpulse libswresample libavfilter"
2022-10-11 00:47:17 +00:00
includes="$(pkg-config --cflags $dependencies)"
libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm"
2023-03-16 12:36:19 +00:00
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/xnvctrl.c $opts $includes
gcc -c src/overclock.c $opts $includes
2023-03-16 12:36:19 +00:00
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 xnvctrl.o overclock.o vaapi.o window_texture.o time.o xcomposite_cuda.o xcomposite_drm.o sound.o main.o -s $libs
2022-10-17 00:55:59 +00:00
echo "Successfully built gpu-screen-recorder"