newbuild: Add new build system (#20) #24
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new build system, which removes the need to compile box dependencies inside of
prescripts. This change is made with the hope of makingumbox buildrun on all platforms, not just our chosen version of Linux. In the future this can be used to change umbox to build locally instead of distributing pre-built binaries.At the moment umbox will use whichever compiler is in the
CCenv var, orccby default. Since not all machines ship with a compiler, it might be beneficial to ship umbox with a copy of tcc. This way builds will work on any machine, even if result is a bit slower.The new build specification can look like this:
{ "name": "test", "version": "v0.1.0", "author": "", "license": "", "description": "", "readme": "README.md", "dependencies": [ "umka_api" ], "include": [ ], "build": { "include": ["test.um"], "targets": { "test.umi": { "sources": "test.c", "cflags": "-Wall", "ldflags": { "windows": "-luser32" } } } } }The box can be built using
umbox newbuild. By default it will output intoout/directory. This can be overridden using--output/-owith a name of another directory or a tar file.