aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-11-01 15:20:17 +0200
committeraqua <aqua@iserlohn-fortress.net>2022-11-01 15:20:17 +0200
commitf944f887470713b737cfe0bd704fd4c97318754b (patch)
tree90325cefa62dab2a77fdb1e8a1b7fae5f47c56c2 /Makefile
parentmakefile: clean target shouldn't depend on OBJS (diff)
downloadkernel-f944f887470713b737cfe0bd704fd4c97318754b.tar.xz
makefile: add Makefile.config
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index aa6965e..ca76f48 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,24 @@
MAKE = make
MAKEFLAGS += --no-print-directory
-ARCH = i686
-include ${ARCH}/toolchain.mk
+
+-include Makefile.config
info:
- @echo "this is the all target"
+ @echo "* Build information *"
@echo " ARCH ${ARCH}"
@echo " MAKE $(shell ${MAKE} --version | head -n1)"
@echo " CC $(shell ${CC} --version | head -n1)"
+ @echo " ${CCFLAGS}"
@echo " LD $(shell ${LD} --version | head -n1)"
+ @echo " ${LDFLAGS}"
+
+.config: Kconfig
+ @alldefconfig
+
+Makefile.config: .config
+ @cp .config Makefile.config
+ @echo -e '\n# toolchain.mk' >> Makefile.config
+ @cat $$(sed -nE "s/CONFIG_ARCH_(.+)=y/\1/p" .config)/toolchain.mk >> Makefile.config
.PHONY: all run clean purge
all: