3 include $(SRCDIR)/config/aros.cfg
6 # Allow to override include files by placing them in arch-specific directories
7 # Note that kernel_#?.h files must be included using #include <name>, not #include "name"
9 # __AROS_EXEC_LIBRARY__ definition is needed for UNIX-hosted builds. kernel_base.h includes
10 # kernel_cpu.h, which needs host OS includes for some CPU-specific defintions (host OS CPU context).
11 # The code in rom/kernel is plain AROS code, it must not depend on host includes in any way, in order
12 # not to overcomplicate the build. This definition prevents kernel_cpu.h from including host-specific
13 # stuff. The name of this definition is legacy, in ancient times exec.library included some private
14 # kernel's stuff and needed this.
15 USER_INCLUDES := $(PRIV_KERNEL_INCLUDES) \
16 -D__AROS_EXEC_LIBRARY__ \
17 -DAROS_ARCHITECTURE="\"$(AROS_TARGET_PLATFORM)\"" \
19 # Allow to add architecture-specific options
20 -include $(SRCDIR)/arch/all-$(ARCH)/kernel/make.opts
21 -include $(SRCDIR)/arch/$(CPU)-$(ARCH)/kernel/make.opts
22 ifneq ($(AROS_TARGET_VARIANT),)
23 -include $(SRCDIR)/arch/$(CPU)-$(ARCH)/$(AROS_TARGET_VARIANT)/kernel/make.opts
26 FUNCS := spininit spinislocked spintrylock spinlock spinunlock addexceptionhandler \
27 addirqhandler bug cause cli createcontext deletecontext \
28 displayalert dispatch getbootinfo getscheduler issuper mapglobal modifyirqhandler \
29 remexceptionhandler remirqhandler schedule setprotection setscheduler sti \
30 switch unmapglobal virtualtophysical obtaininput releaseinput \
31 putchar maygetchar allocpages freepages getsystemattr formatstr \
32 initmemory statmemory _bug _displayalert \
33 getcpucount getcpunumber alloccpumask clearcpumask getcpumask cpuinmask \
34 freecpumask schedulecpu allockernelbase prepareexecbase
35 FILES := kernel_init cpu_init kernel_cpu kernel_debug kernel_panic kernel_intr kernel_interruptcontroller \
36 kernel_memory kernel_romtags kernel_scheduler kernel_globals tlsf
37 MMU_FILES := kernel_mm
38 # You can replace this with own algorithm
39 ALLOCATOR := mm_linear
42 FILES += $(MMU_FILES) $(ALLOCATOR)
45 %build_module mmake=kernel-kernel \
46 modname=kernel modtype=resource version=$(AROS_TARGET_PLATFORM) \
47 files="$(FILES) $(FUNCS)" nostartup=no archspecific=yes