#
# global definitions
#
include $(top_srcdir)/../RULES

#
# private definitions
#

#
# global CFLAGS and ASFLAGS
#
INCLUDES = -I$(top_srcdir)
DEFINITIONS = 
MODEL = -m68$(CPU)
CFLAGS = $(INCLUDES) $(DEFINITIONS) $(MODEL) $(GENERAL) $(OPTS) $(WARN)
ASFLAGS = $(INCLUDES) $(DEFINITIONS) $(GENERAL) -m68030

#
# libkern target
#
LIBKERNTARGET = libkern$(CPU).a
LIBKERNSTMP = $(top_srcdir)/libkern/libkern$(CPU).a
LIBKERN = -L$(top_srcdir)/libkern -lkern$(CPU)

#
# generic kernel target
#
compile_dir = .compile_$(kernel)
compile_all_dirs = .compile_*
ifneq ($(kernel),)
kerneltarget = _stmp_$(kernel)
realtarget = $(kerneltarget)
else
kerneltarget =
realtarget = help
endif

kernel: $(realtarget)

$(kerneltarget): $(compile_dir)
	cd $(compile_dir); $(MAKE)

$(compile_dir):
	$(MKDIR) $@
	$(CP) Makefile.objs $@/Makefile
