aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-12-04 16:25:08 +0200
committeraqua <aqua@iserlohn-fortress.net>2022-12-04 17:10:01 +0200
commit16241aafa780ebf188b2ceb96d51bf5af5d6bbe2 (patch)
treec41a990a838eb1bcc369fd6c2efedac6785ec99f /Makefile
parentAdd FILE struct (diff)
downloadkernel-16241aafa780ebf188b2ceb96d51bf5af5d6bbe2.tar.xz
Remove custom include paths in makefiles
Add symlinks target to top-level makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 17 insertions, 2 deletions
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