diff options
| author | pryazha <pryadeiniv@mail.ru> | 2025-10-12 15:25:23 +0500 |
|---|---|---|
| committer | pryazha <pryadeiniv@mail.ru> | 2025-10-12 15:25:23 +0500 |
| commit | 818f818f583881156eb279c71b1359bf2c4f3580 (patch) | |
| tree | 874e8d2fdc5334bc70925aa87923791f7662ddb8 /example/b | |
| parent | 3cf987880e384140bf996c37f820ddeea38bc60e (diff) | |
change identation, maybe will change back, add own gl functions loading, and glx example
Diffstat (limited to 'example/b')
| -rwxr-xr-x | example/b | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/example/b b/example/b new file mode 100755 index 0000000..4ccb9a4 --- /dev/null +++ b/example/b @@ -0,0 +1,40 @@ +#!/bin/sh + +echorun() +{ + echo $1 + $1 +} + +compile() +{ + echorun "$cc -c $cflags $include $lflags -o $1.o $1.c $libs" +} + +compile_and_link() +{ + echorun "$cc $cflags $include $lflags -o $1 $1.c $libs" +} + +start=`pwd` +dir=`realpath $0` +dir=`dirname $dir` + +echorun "cd $dir" + +if [ "$1" = 'clean' ] ; then + echorun "rm -f *.o linux" + echorun "cd $start" + exit +fi + +cc='gcc' +cflags='-g' + +include="-I../../prb -I../../prge" +lflags="-L../../prb -L../../prge" +libs='-lprb -lprge -lGL -lX11 -lm' + +compile_and_link linux + +echorun "cd $start" |
