diff --git a/Kernel.defconfig b/Kernel.defconfig new file mode 100644 index 0000000..f50daea --- /dev/null +++ b/Kernel.defconfig @@ -0,0 +1,4 @@ +# vi: ft=make : +ENABLE_UNIX=0 +ENABLE_NET=0 +ENABLE_VESA=0 diff --git a/Makefile b/Makefile index 07e908d..df635dd 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,16 @@ export CC=$(CROSS_COMPILE)gcc export O?=build -all: mkdirs $(O)/kernel +all: chkconfig mkdirs $(O)/kernel + +chkconfig: + @[ -f Kernel.config ] || { \ + echo "Kernel.config is not present. Run 'make defconfig' to make one" >&2; \ + exit 1; \ + } + +defconfig: Kernel.defconfig + cp $< Kernel.config clean: rm -rf $(O) diff --git a/etc/KernelOptions.makefile b/etc/KernelOptions.makefile index 17b364b..e014b25 100644 --- a/etc/KernelOptions.makefile +++ b/etc/KernelOptions.makefile @@ -1,4 +1,6 @@ +ifneq (,$(wildcard ./Kernel.config)) include Kernel.config +endif ifeq ($(ENABLE_UNIX),1) KERNEL_DEF+=-DENABLE_UNIX=1