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

#libdrm
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr libpulse libswresample libavfilter libva"
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_vaapi.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/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 window_texture.o time.o xcomposite_cuda.o xcomposite_vaapi.o sound.o main.o -s $libs
echo "Successfully built gpu-screen-recorder"