ref: 0f595fa896765dfdbe88c760ebd97edd8a1f123b
parent: 2465e0031192cdadbeda5af55c62d4ee921988a7
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Oct 3 18:50:17 EDT 2021
build: Select set of libc targets based in uname The libc depends of the compiler to be able to generate code for different processors, and trying to compile a system without support from the toolchain will make the compilation fail. In order to try to minimize this point, this commits uses uname -m to select the set of confi- gurations that must be build.
--- a/Makefile
+++ b/Makefile
@@ -15,11 +15,26 @@
all:
+@$(MAKE) `$(SCRIPTDIR)/config` toolchain
+ +@$(MAKE) `$(SCRIPTDIR)/config` `uname -m`
+
+x86_64 amd64: FORCE
+@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-linux libc libcrt
+@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-openbsd libc libcrt
+@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-netbsd libc libcrt
+@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-dragonfly libc libcrt
+@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-darwin libc libcrt
+
+i386: FORCE
+ +@$(MAKE) `$(SCRIPTDIR)/config` CONF=i386-linux libc libcrt
+
+ppc: FORCE
+ +@$(MAKE) `$(SCRIPTDIR)/config` CONF=ppc-linux libc libcrt
+
+arm: FORCE
+ +@$(MAKE) `$(SCRIPTDIR)/config` CONF=arm-linux libc libcrt
+
+arm64: FORCE
+ +@$(MAKE) `$(SCRIPTDIR)/config` CONF=arm64-linux libc libcrt
toolchain: dirs src