#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...

all: kernel.o

O_TARGET := kernel.o
obj-y := process.o traps.o ptrace.o \
	  sys_ckcore.o time.o semaphore.o
obj-y += setup.o ckcore_ksyms.o

export-objs := ckcore_ksyms.o

ifdef CONFIG_PCI
ifndef CONFIG_COLDFIRE
obj-y += bios32.o
endif
endif

head.o: head.S ckcore_defs.h

entry.o: entry.S ckcore_defs.h

setup.o: setup.c ../../../include/asm-ckcorenommu/ckcore.h ../../../include/linux/autoconf.h


ckcore_defs.h: ckcore_defs.c ckcorek_defs.head
	rm -f ckcore_defs.d
	SUNPRO_DEPENDENCIES="ckcore_defs.d ckcore_defs.h" \
	$(CC) $(filter-out -MD,$(CFLAGS)) -S ckcore_defs.c
	cp ckcore_defs.head ckcore_defs.h
	grep '^#define' ckcore_defs.s >> ckcore_defs.h
	rm ckcore_defs.s
-include ckcore_defs.d

include $(TOPDIR)/Rules.make

