From 61587abc9ec3d318c8a58916aaa069a0a609f1da Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 29 Mar 2023 03:36:56 +0300 Subject: [PATCH] Add options to disable compilation for kernel, userspace or drivers --- Makefile | 6 ++++++ Makefile.conf | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 5669759d..06096a89 100644 --- a/Makefile +++ b/Makefile @@ -106,19 +106,25 @@ ifeq ($(BOOTLOADER), lynx) endif build_kernel: +ifeq ($(BUILD_KERNEL), 1) make -j$(shell nproc) --quiet -C Kernel build +endif build_userspace: ifeq ($(OSARCH), amd64) +ifeq ($(BUILD_USERSPACE), 1) make --quiet -C Userspace build cp -r Userspace/out/* initrd/ endif +endif build_drivers: ifeq ($(OSARCH), amd64) +ifeq ($(BUILD_DRIVERS), 1) make --quiet -C Drivers build cp Drivers/out/* initrd/system/drivers/ endif +endif build_image: mkdir -p iso_tmp_data diff --git a/Makefile.conf b/Makefile.conf index 17507b83..c79502d9 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -20,6 +20,10 @@ KERNEL_VERSION = pre-alpha-0.0.0.1 # - grub - GRUB BOOTLOADER=limine +BUILD_KERNEL = 1 +BUILD_USERSPACE = 1 +BUILD_DRIVERS = 1 + # The path of the cross-compiler. COMPILER_PATH = tools/cross/bin