Add options to disable compilation for kernel, userspace or drivers

This commit is contained in:
Alex 2023-03-29 03:36:56 +03:00
parent dbee38f2ed
commit 61587abc9e
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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