scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit f7dc4baf7faaa0f70d7f6406c298e97c7323e776
parent 1799a1ccb0dd9a37ef08ac768c495d1b497cd9c0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 16 Oct 2024 16:37:44 +0200

build: Don't use uname to select the arch

Using uname to select the arch make impossible to cross compile,
and currently we are using a config target to autodetect the
host configuration as default configuration.

Diffstat:
MMakefile | 2+-
Mscripts/amd64.mk | 6+++---
Mscripts/arm64.mk | 6+++---
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile @@ -16,7 +16,7 @@ NODEP = 1 all: +@$(MAKE) `$(SCRIPTDIR)/config -c` config +@$(MAKE) `$(SCRIPTDIR)/config -c` toolchain - +@$(MAKE) `$(SCRIPTDIR)/config` `uname -m` + +@$(MAKE) `$(SCRIPTDIR)/config` $(ARCH) config: +@cd include/bits/scc && $(MAKE) diff --git a/scripts/amd64.mk b/scripts/amd64.mk @@ -1,4 +1,4 @@ -x86_64 amd64: +amd64: +@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-linux libc libcrt +@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-openbsd libc libcrt +@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-netbsd libc libcrt @@ -6,8 +6,8 @@ x86_64 amd64: +@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-darwin libc libcrt +@$(MAKE) `$(SCRIPTDIR)/config` CONF=amd64-freebsd libc libcrt -install-x86_64 install-amd64: amd64 +install-amd64: amd64 $(SCRIPTDIR)/install -p $(SCRIPTDIR)/proto.amd64 $(ROOT) -uninstall-x86_64 uninstall-amd64: +uninstall-amd64: $(SCRIPTDIR)/uninstall -p $(SCRIPTDIR)/proto.amd64 $(ROOT) diff --git a/scripts/arm64.mk b/scripts/arm64.mk @@ -1,8 +1,8 @@ -aarch64 arm64: +arm64: +@$(MAKE) `$(SCRIPTDIR)/config` CONF=arm64-linux libc libcrt -install-arm64 install-aarch64: arm64 +install-arm64: arm64 $(SCRIPTDIR)/install -p $(SCRIPTDIR)/proto.arm64 $(ROOT) -uninstall-arm64 uninstall-aarch64: +uninstall-arm64: $(SCRIPTDIR)/uninstall -p $(SCRIPTDIR)/proto.arm64 $(ROOT)