From 818f818f583881156eb279c71b1359bf2c4f3580 Mon Sep 17 00:00:00 2001 From: pryazha Date: Sun, 12 Oct 2025 15:25:23 +0500 Subject: change identation, maybe will change back, add own gl functions loading, and glx example --- example/b | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 example/b (limited to 'example/b') 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" -- cgit v1.2.3-70-g09d2