matter.c

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

commit 871aae90da645f7dc441b661c339623827f65838
parent 3d9d5493a6b905c4abf9b881d97c06b14598cf50
Author: Yersa Nordman <finwo@pm.me>
Date:   Wed, 17 Jun 2020 11:56:37 +0200

Separate cflags and includes from the compilation step

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

diff --git a/Makefile b/Makefile @@ -6,12 +6,19 @@ SRC=$(shell find -L arch/$(TARGET)/src -type f -name \*.c) SRC+=$(shell find -L src -type f -name \*.c) OBJ=$(SRC:.c=.o) +INCLUDES?= +INCLUDES+=-Iarch/$(TARGET)/include +INCLUDES+=-Iinclude + +CFLAGS?= +CFLAGS+=-fno-builtin -nostdinc + libmatter.a: $(OBJ) rm -f $@ $(AR) -cvq $@ $(OBJ) %.o: %.c - $(LLE) -Ofast -S $(CFLAGS) -nostdinc -fno-builtin -Iarch/$(TARGET)/include -Iinclude -c $< -o $(@:.o=.ll) + $(LLE) -Ofast -S $(CFLAGS) $(INCLUDES) -c $< -o $(@:.o=.ll) $(LLC) -filetype=obj -O3 $(@:.o=.ll) .PHONY: clean