
# 
# generic flags
# 
# -DSYSCALL_REENTRANT	activate reentrant syscall handler (not for 000 yet)
# -DVERBOSE_BOOT	include extensive messages
# -DCRYPTO_CODE		include the cryptographic filesystem stuff
# -DSOFT_UNITABLE	loadable unicode tables
# -DBUILTIN_SHELL	include the built-in minimal shell

#
# machine flags
#  
# -DONLY030		build for 68020+
# -DCPU030		build for 68030
# -DCPU040		build for 040/060
# -DMMU040		add 040/060 MMU support instead 030 MMU
# -DMILAN		build Milan kernel
# -DARANYM		build Aranym kernel

# 
# debug flags
# 
# -DDEBUG_INFO		include debugging information
# -DPROFILING		include profiling support
# -DMFP_DEBUG_DIRECT	direct MFP routines to output debug

#
# Flags for building a minimal 68000 kernel
#
# -DONLY68000		disables various code for 68020-60
# -DNO_MMU		disables MMU routines
# -DNO_CPU_CACHES	disables all CPU cache handling
# -DNO_RAMFS		disables the internal ramdisk (/ram)
# -DNO_FAKE_SUPER	disables the extended bus error handler
# -DNO_AKP_KEYBOARD	disables the extended keyboard routines
# -DQUANTUM_SMALLER	changes QUANTUM to 2k, experimental!

# 
# experimental; for developers only
# 
# -DJAR_PRIVATE		make Cookie Jar private for processes
# -DWITHOUT_TOS		exclude TOS dependencies
# 			warning, experimental and work in progress


# mandatory for kernel source now
KERNELDEFAULTDEFS = -D__KERNEL__
KERNELDEFAULTDEFS += -DLANG_ENGLISH

ifneq ($(kernel),000)
KERNELDEFAULTDEFS += -DSYSCALL_REENTRANT
KERNELDEFAULTDEFS += -DVERBOSE_BOOT
KERNELDEFAULTDEFS += -DCRYPTO_CODE
KERNELDEFAULTDEFS += -DSOFT_UNITABLE
KERNELDEFAULTDEFS += -DBUILTIN_SHELL
endif

ifeq ($(kernel),000)
MINT = mint000.prg
CPU  = 000
KERNELDEFS = -DONLY68000 -DNO_MMU -DNO_CPU_CACHE -DNO_RAMFS -DNO_FAKE_SUPER 
KERNELDEFS += #-DDEBUG_INFO
OPTS += -fstrength-reduce
endif

ifeq ($(kernel),030)
MINT = mint030.prg
CPU  = 030
KERNELDEFS = -DONLY030 -DCPU030
endif

ifeq ($(kernel),040)
MINT = mint040.prg
CPU  = 020-60
KERNELDEFS = -DONLY030 -DMMU040 -DCPU040
endif

ifeq ($(kernel),deb)
MINT = mintnp.prg
CPU  = 020-60
KERNELDEFS = -DDEBUG_INFO -DONLY030 -DMMU040 -DCPU040
endif

ifeq ($(kernel),mil)
MINT = mintmil.prg
CPU  = 020-60
KERNELDEFS = -DONLY030 -DMMU040 -DMILAN -DCPU040
endif

ifeq ($(kernel),ara)
MINT = mintara.prg
CPU  = 020-60
KERNELDEFS = -DONLY030 -DMMU040 -DARANYM -DCPU040 -DDEBUG_INFO
endif

ifeq ($(kernel),my1)
MINT = mintnp.prg
CPU  = 020-60
KERNELDEFS = -DDEBUG_INFO -DONLY030 -DMMU040 -DCPU040
endif

ifeq ($(kernel),my2)
MINT = mint040.prg
CPU  = 020-60
KERNELDEFS = -DONLY030 -DMMU040 -DDEBUG_INFO -DCPU040 -DMILAN
KERNELDEFS += -DMFP_DEBUG_DIRECT
#KERNELDEFS += -DPROFILING
#kernel_cflags = -pg
#kernel_nocflags = -fomit-frame-pointer
endif

ifeq ($(kernel),my3)
MINT = mint030.prg
CPU  = 030
KERNELDEFS = -DDEBUG_INFO -DONLY030 -DCPU030
endif

ifeq ($(kernel),my4)
MINT = mintmdbg.prg
CPU = 020-60
KERNELDEFS = -DONLY030 -DMMU040 -DDEBUG_INFO -DCPU040 -DMILAN
endif

#
# all default targets
#
kerneltargets = 000 030 040 deb mil ara my1 my2 my3 my4
cputargets = 000 030 020-60
