aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: 4265d517516e7e16505080254fce4c2adfc966aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e

#libdrm
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr libpulse libswresample libavfilter"
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
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
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
echo "Successfully built gpu-screen-recorder"