2022-01-30 22:24:20 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2022-10-17 00:55:59 +00:00
|
|
|
#libdrm
|
2023-04-01 13:14:36 +00:00
|
|
|
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr libpulse libswresample libavfilter libva"
|
2022-10-11 00:47:17 +00:00
|
|
|
includes="$(pkg-config --cflags $dependencies)"
|
2022-09-25 23:26:45 +00:00
|
|
|
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
|
2023-03-17 16:17:14 +00:00
|
|
|
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/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
|
2023-04-01 13:14:36 +00:00
|
|
|
g++ -o gpu-screen-recorder -O2 capture.o nvfbc.o egl.o cuda.o xnvctrl.o overclock.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"
|