matter.c

Cross-platform minimalist libc
git clone git://git.finwo.net/lib/matter.c
Log | Files | Refs | README | LICENSE

commit 088fc3afdcb26c9901daa9a26fb4b203dc262f40
parent 034c23833588c5d0aeadb5e526254338ebbf699a
Author: Yersa Nordman <finwo@pm.me>
Date:   Sun, 17 May 2020 20:17:42 +0200

Allow chaning AR based on target

Diffstat:
MMakefile | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -1,11 +1,17 @@ TARGET ?= wasm32 +AR_wasm=llvm-ar +AR_wasm32=${AR_wasm} +AR_wasm64=${AR_wasm} + +AR=${AR_${TARGET}} + SRC=$(shell find -L src/arch/$(TARGET) -type f -name *.c) OBJ=$(SRC:.c=.o) libmatter.a: $(OBJ) - ar -cvq libmatter.a $(OBJ) + $(AR) -cvq libmatter.a $(OBJ) %.o: %.c clang -Os -S -emit-llvm $(CFLAGS) --target=$(TARGET) -nostdinc -fno-builtin -Iinclude -c $< -o $(@:.o=.ll)