From 16241aafa780ebf188b2ceb96d51bf5af5d6bbe2 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 4 Dec 2022 16:25:08 +0200 Subject: Remove custom include paths in makefiles Add symlinks target to top-level makefile --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ca2f48d..5f6fbd7 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ MAKE = make MAKEFLAGS += --no-print-directory +SRC_ROOT := $(shell pwd) include Makefile.config @@ -28,8 +29,10 @@ info: @echo " ${LDFLAGS}" test: - grep -r 'asm' devices lib src - make -C lib test + @echo Looking for inline assembly + @grep -rn 'asm' devices lib src + @echo Running tests + @make -C lib test FORCE: @@ -41,6 +44,18 @@ Makefile.config: .config @echo -e '\n# toolchain.mk' >> Makefile.config @cat $$(sed -nE "s/CONFIG_ARCH_(.+)=y/\1/p" .config)/toolchain.mk >> Makefile.config +symlinks: + mkdir -p src/include + ln -sTf $(SRC_ROOT)/grub src/include/grub + ln -sTf $(SRC_ROOT)/${ARCH} src/include/arch + ln -sTf $(SRC_ROOT)/${ARCH}/sys src/include/sys + ln -sTf $(SRC_ROOT)/devices src/include/devices + ln -sTf $(SRC_ROOT)/lib src/include/lib + mkdir -p devices/include + ln -sTf $(SRC_ROOT)/${ARCH}/sys devices/include/sys + mkdir -p i686/include + ln -sTf $(SRC_ROOT)/grub i686/include/grub + lib/libk.a: FORCE @${MAKE} -C lib libk.a i686/arch.a: FORCE -- cgit v1.2.1