From 223b1056273f5d48d1c0bbfee75be7b82374d4eb Mon Sep 17 00:00:00 2001 From: pryazha Date: Sun, 12 Oct 2025 15:24:30 +0500 Subject: change identation, maybe will change back, add own gl functions loading, and glx example --- examples/b | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 examples/b (limited to 'examples/b') diff --git a/examples/b b/examples/b new file mode 100755 index 0000000..9c29028 --- /dev/null +++ b/examples/b @@ -0,0 +1,53 @@ +#!/bin/sh + +echorun() +{ + echo $1 + $1 +} + +compile() +{ + echorun "$cc $cflags $include $lflags -o $dir/$1 $dir/$1.c $libs" +} + +cur=`pwd` +dir=`realpath $0` +dir=`dirname $dir` + +echorun "cd $dir" + +if [ "$1" = 'clean' ] ; then + echorun "rm -f $dir/macros \ + $dir/macros.exe \ + $dir/arena \ + $dir/arena.exe \ + $dir/sys \ + $dir/sys.exe \ + $dir/string \ + $dir/string.exe" + echorun "cd $cur" + exit +fi + +cc='tcc' +if [ "$1" = 'windows' ] ; then + cc='x86_64-w64-mingw32-gcc' +fi + +prbdir="$dir/.." +if [ ! -e "$prbdir/libprb.a" ] ; then + $prbdir/build.sh +fi + +cflags='-g -Wall -std=c99' +include="-I$prbdir" +lflags="-L$prbdir" +libs='-lprb -lm' + +compile macros +compile arena +compile sys +compile string + +echorun "cd $cur" -- cgit v1.2.3-70-g09d2