# Copyright (C) 2025 Danny Holman # # This file is part of BoxOS, a free and open-source Unix-like operating # system. # # BoxOS is free software; you can redistribute it and/or modify under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # BoxOS is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # BoxOS; if not, see . include $(ROOTDIR)/common.mk ifeq ($(KERNEL_DEBUG),YES) AFLAGS+=-g CFLAGS+=-g endif ifeq ($(KERNEL_PROFILE),YES) CFLAGS+=-fprofile-arcs -ftest-coverage -DKERNEL_PROFILE endif ifeq ($(KERNEL_ASSERT),NO) CFLAGS+=-DNDEBUG endif ifeq ($(KERNEL_WERROR),YES) AFLAGS+=-Werror CFLAGS+=-Werror endif INCLUDE+=-Iinclude CFLAGS+=-ffreestanding -fstack-protector-all $(KERNEL_OPLVL) LDFLAGS+=-nostdlib include $(ARCHDIR)/make.conf BINARY=vmbox CORE_OBJS=core/init.o \ core/interrupt.o \ core/kprintf.o \ core/kthread.o \ core/panic.o \ core/sched.o \ core/stack_protector.o \ core/string.o \ core/vfs.o \ DEBUG_OBJS=debug/assert.o \ debug/llvm_profile.o \ MEM_OBJS=mem/kmalloc.o \ mem/paging.o \ OBJS=$(ARCH_OBJS) \ $(CORE_OBJS) \ $(DEBUG_OBJS) \ $(MEM_OBJS) \ include $(ROOTDIR)/patterns.mk