Reformatting and detab
[AROS.git] / rom / kernel / mmakefile.src
blob2c0a6d9f22a54bd7546dc55a5207c7ed7ffd44bc
1 # $Id$
2 include $(TOP)/config/make.cfg
4 # Allow to override include files by placing them in arch-specific directories
5 # Note that kernel_#?.h files must be included using #include <name>, not #include "name"
6 # for this to work.
7 # __AROS_EXEC_LIBRARY__ definition is needed for UNIX-hosted builds. kernel_base.h includes
8 # kernel_cpu.h, which needs host OS includes for some CPU-specific defintions (host OS CPU context).
9 # The code in rom/kernel is plain AROS code, it must not depend on host includes in any way, in order
10 # not to overcomplicate the build. This definition prevents kernel_cpu.h from including host-specific
11 # stuff. The name of this definition is legacy, in ancient times exec.library included some private
12 # kernel's stuff and needed this.
13 USER_INCLUDES := $(PRIV_KERNEL_INCLUDES) -D__AROS_EXEC_LIBRARY__ \
14                 -DAROS_ARCHITECTURE="\"$(AROS_TARGET_PLATFORM)\"" \
16 # Allow to add architecture-specific options
17 -include $(SRCDIR)/arch/all-$(ARCH)/kernel/make.opts
18 -include $(SRCDIR)/arch/$(CPU)-$(ARCH)/kernel/make.opts
19 ifneq ($(AROS_TARGET_VARIANT),)
20 -include $(SRCDIR)/arch/$(CPU)-$(ARCH)/$(AROS_TARGET_VARIANT)/kernel/make.opts
21 endif
23 FUNCS :=     addexceptionhandler addirqhandler bug cause cli createcontext deletecontext    \
24              displayalert dispatch getbootinfo getscheduler issuper mapglobal               \
25              remexceptionhandler remirqhandler schedule setprotection setscheduler sti      \
26              switch unmapglobal virtualtophysical obtaininput releaseinput                  \
27              putchar maygetchar allocpages freepages getsystemattr formatstr                \
28              initmemory statmemory _bug _displayalert getcpucount getcpunumber              \
29              allockernelbase prepareexecbase
30 FILES     := kernel_init cpu_init kernel_cpu kernel_debug kernel_panic kernel_intr \
31              kernel_memory kernel_romtags kernel_scheduler kernel_globals
32 MMU_FILES := kernel_mm
33 # You can replace this with own algorithm
34 ALLOCATOR := mm_linear
36 ifeq ($(USE_MMU),1)
37     FILES += $(MMU_FILES) $(ALLOCATOR)
38 endif
40 %build_module mmake=kernel-kernel \
41   modname=kernel modtype=resource version=$(AROS_TARGET_PLATFORM) \
42   files="$(FILES) $(FUNCS)" uselibs="rom $(USER_LIBS)" nostartup=no
44 %common