From 505d1684d93eea6b92235dbd4722b6caf854ff18 Mon Sep 17 00:00:00 2001 From: hgn Date: Tue, 9 Aug 2022 11:54:55 +0100 Subject: [PATCH] remove .so --- .gitignore | 2 +- src/tools.sh | 5 ++++ src/vg/vg_gldiag.h | 4 ++- vg_build.sh | 63 +++++++++++++++++++++++++++++++++++----------- 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 7d497ed..3431ab8 100755 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ restricted/ !.gitmodules # Dependencies _____________________ -!*.so +#!*.so !*.a !*.dll diff --git a/src/tools.sh b/src/tools.sh index e5a428a..9c9fc3a 100644 --- a/src/tools.sh +++ b/src/tools.sh @@ -1,3 +1,8 @@ +#!/bin/bash +# Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved +# +# Standard tool scripts +# mkdir $_folder/tools -p _link="-lm" diff --git a/src/vg/vg_gldiag.h b/src/vg/vg_gldiag.h index 29c246d..99a7059 100644 --- a/src/vg/vg_gldiag.h +++ b/src/vg/vg_gldiag.h @@ -11,6 +11,7 @@ static void vg_check_gl_integerv( FILE *log, GLenum name, const char *stringname static int vg_run_gfx_diagnostics(void) { +#if 0 FILE *log = fopen( "gldiag.txt", "w" ); if( log ) { @@ -36,6 +37,7 @@ static int vg_run_gfx_diagnostics(void) fclose( log ); } +#endif return 0; -} \ No newline at end of file +} diff --git a/vg_build.sh b/vg_build.sh index 9ea7867..70913c7 100644 --- a/vg_build.sh +++ b/vg_build.sh @@ -1,8 +1,36 @@ #!/bin/bash # Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved - +# +# Build script utilities +# Usage: +# 1) in your build script, define the function +# +# vg_command(){ +# +# } +# +# it should handle $1 as the switch for different commands +# if you want to run an existing command, use run_command to do it. +# +# +# 2) at the end of the build script, include: +# +# source vg/vg_build.sh +# +# this runs the triggers that are passed in from the invoker +# +# +# 3) targets with standard tool support should run the command: +# +# vg_compile_tools +# +# make sure _compiler _options, and _ext are setup for that target +# these will only invoke the tooling compilers if tools is passed to the +# build script. +# # Util # ============================================================================== + error(){ echo -e "\033[1;31mError:\e[0m $@" exit 1 @@ -40,8 +68,6 @@ if ! [ -x "$( command -v $compiler_cache )" ]; then fi compile_x(){ - mkdir $_folder -p - cmd="$compiler_cache $_compiler $_options $_warnings @@ -70,16 +96,25 @@ vg_compile_tools() { if [ $enable_tools = true ]; then source vg/src/tools.sh; fi } -tools() { - enable_tools=true +run_command(){ + case "$1" in + tools) + enable_tools=true + ;; + "") + return + ;; + *) + vg_command $1 + esac } -$1 -$2 -$3 -$4 -$5 -$6 -$7 -$8 -$9 +run_command $1 +run_command $2 +run_command $3 +run_command $4 +run_command $5 +run_command $6 +run_command $7 +run_command $8 +run_command $9 -- 2.25.1