From a79657062fc78ec4be8ccbd513a20bf4a3376f0a Mon Sep 17 00:00:00 2001 From: Cory Smith Date: Fri, 26 Aug 2022 22:20:11 -0500 Subject: [PATCH] Added build.bas. --- source/utilities/build.bas | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 source/utilities/build.bas diff --git a/source/utilities/build.bas b/source/utilities/build.bas new file mode 100644 index 000000000..400991154 --- /dev/null +++ b/source/utilities/build.bas @@ -0,0 +1,23 @@ +''' Removes all the temporary build files. +''' (Various .o, .a, and ./internal/temp, etc.) +SUB PurgeTemporaryBuildFiles (os AS STRING, mac AS LONG) + make$ = GetMakeExecutable$ + IF os = "WIN" THEN + SHELL _HIDE "cmd /c " + make$ + " OS=win clean" + ELSEIF os = "LNX" THEN + IF mac THEN + SHELL _HIDE make$ + " OS=osx clean" + ELSE + SHELL _HIDE make$ + " OS=lnx clean" + END IF + END IF +END SUB + +''' Returns the make executable to use, with path if necessary. +FUNCTION GetMakeExecutable$ () + IF os$ = "WIN" THEN + GetMakeExecutable$ = "internal\c\c_compiler\bin\mingw32-make.exe" + ELSE + GetMakeExecutable$ = "make" + END IF +END FUNCTION