Skip to content

Commit

Permalink
make-build.tscript: Lets see if we can make a simpler build script wi…
Browse files Browse the repository at this point in the history
…th minitscript / 4
  • Loading branch information
andreasdr committed Jan 7, 2025
1 parent 88ea7fd commit 2b67756
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions make-build.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ function: buildExecutables($ldFlags, $files)
$includes = "-Isrc -Iext -I. -Iext/reactphysics3d/include/ -Iext/vhacd/include/ -Iext/cpp-spline/src -Iext/zlib -Iext/minitscript/src -Iext/yannet/src -I/usr/include/freetype2"
$cxxFlags = "-fPIC -g -O3 -pipe -MMD -MP -DNDEBUG -std=c++2a -DRAPIDJSON_HAS_STDSTRING"

# compile each compilation units
# compile each executable
$commands = []
forEach($file in $files)
$fileObjectPath = filesystem.getPathName($file)

Expand All @@ -163,15 +164,15 @@ function: buildExecutables($ldFlags, $files)
" " +
$ldFlags
console.printLine($command)

# execute
$exitCode = $$.application::EXITCODE_SUCCESS
$error = null
application.execute($command, $exitCode, $error)
if ($exitCode != $$.application::EXITCODE_SUCCESS)
console.printLine($cxx + " exited with exit code " + $exitCode + ", see error: " + $error)
end

#
$commands[] = $command
end

# execute commands
if (application.executeMultiple($commands, integer(concurrency.getHardwareThreadCount() / 1.5)) == false)
console.printLine("Not all files have been compiled. Stopping")
end
catch ($exception)
console.printLine("An error occurred: " + $exception)
end
Expand Down Expand Up @@ -920,7 +921,7 @@ function: main()

buildLibrary(
"libopengles2renderer",
"-L/usr/lib64 -lGLEW -lGL -lglfw -Llib -ltdme",
"-L/usr/lib64 -lGLESv2 -lEGL -lglfw -Llib -ltdme",
[
"src/tdme/engine/subsystems/renderer/EngineGLES2Renderer.cpp",
"src/tdme/engine/subsystems/renderer/GLES2Renderer.cpp"
Expand Down

0 comments on commit 2b67756

Please sign in to comment.