From b235f49f31d11e68019c42f48b6641c37e4c986e Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 22 Aug 2021 20:38:48 +0300 Subject: Integrated libfdt + Added new common/ directory, into which code that should be shared with init and kernel is to be added. Currently string.c and bytes.c. Code in common/ should be marked with __weak, so as to allow the arch to implement a better, more optimised version of the function if possible/required. + Created include/apos/types.h with macros essentially providing the libc limits.h and stdint.h. At the moment I use gcc/clang predefined macros for most things. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cc9f7b2..d7f02c1 100644 --- a/Makefile +++ b/Makefile @@ -15,14 +15,15 @@ CPP := cpp OBJCOPY ?= objcopy OBJCOPY_FLAGS ?= -Obinary -KERNEL_SOURCES := -INIT_SOURCES := +COMMON_SOURCES != echo common/*.c +KERNEL_SOURCES := $(COMMON_SOURCES) +INIT_SOURCES := $(COMMON_SOURCES) CLEANUP := build deps.mk kernel.* init.* apos.bin CLEANUP_CMD := include arch/$(ARCH)/source.mk -INCLUDE_FLAGS := -Iinclude -Iarch/$(ARCH)/include +INCLUDE_FLAGS := -Iinclude -Iarch/$(ARCH)/include $(USE_FDT:y=-Idtc/libfdt) COMPILE = $(CROSS_COMPILE)$(CC) $(CFLAGS) $(DEPFLAGS) $(INCLUDE_FLAGS) GENLINK = $(CROSS_COMPILE)$(CPP) $(DEPFLAGS) $(INCLUDE_FLAGS) -- cgit v1.3