mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-01 10:19:01 +00:00
GNUmakefile: split into topic files in make/
The GNUmakefile had 1295 lines and mixed build configuration, LLVM bootstrapping, device generation, four test suites, the smoke tests, release packaging, and lint tools. The smoke tests alone were 500 lines. Move each part into its own file in make/ and include them from GNUmakefile. config.mk must be included first because the other files use its variables in immediate assignments and conditionals. There is no change in behavior. The parsed make database is identical for the default build and for ASSERT=1, STATIC=1, XTENSA=0, STM32=0, WASM=0, and CROSS=aarch64-linux-gnu, except for MAKEFILE_LIST and the .PHONY list, which now also includes targets that were phony but not declared. The Dockerfile copies GNUmakefile alone before it builds LLVM, to keep that layer independent of the source tree. It must copy make/ too.
This commit is contained in:
+5
-2
@@ -30,7 +30,10 @@ on a different system like Mac.
|
||||
|
||||
## Using GNU Make
|
||||
|
||||
The static build of TinyGo is driven by GNUmakefile, which provides a help target for quick reference:
|
||||
The static build of TinyGo is driven by GNUmakefile, which includes the topic
|
||||
files in the `make/` directory (`config.mk`, `llvm.mk`, `gen-device.mk`,
|
||||
`build.mk`, `test.mk`, `smoketest.mk`, `release.mk`, and `tools.mk`).
|
||||
It provides a help target for quick reference:
|
||||
|
||||
% make help
|
||||
clean Remove build directory
|
||||
@@ -64,7 +67,7 @@ while producing binaries that are about as fast.
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
|
||||
The Makefile includes a default configuration that is good for most users. It
|
||||
`make/config.mk` holds a default configuration that is good for most users. It
|
||||
builds a release version of LLVM (optimized, no asserts) and includes all
|
||||
targets supported by TinyGo:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user