2 include $(TOP)/config/make.cfg
4 FUNCS := getcpucount getcpunumber
5 FILES := startup kernel_debug platform_init ictl kernel_cpu traps utils smp
6 AFILES := core_interrupts reboot
9 USER_INCLUDES := $(PRIV_KERNEL_INCLUDES) -I$(SRCDIR)/arch/all-native/kernel \
10 -isystem $(SRCDIR)/arch/all-native/bootconsole/include
11 USER_AFLAGS := -isystem $(GENINCDIR)
14 mainmmake=kernel-kernel maindir=$(MAINDIR) \
15 arch=pc-i386 files="$(FILES) $(FUNCS)" asmfiles=$(AFILES)
17 # Build smpboot.bin.o in $(GENDIR)/$(MAINDIR)/arch, where it will be picked up
18 # by the linker automatically (make.tmpl macros link in everything that is found there)
19 # However we don't want our intermediate files to be picked up, so we put them in
22 OUTDIR := $(GENDIR)/$(MAINDIR)/arch
23 OBJDIR := $(GENDIR)/$(CURDIR)
25 kernel-kernel-pc-i386 :: $(OUTDIR)/smpboot.bin.o
26 kernel-kernel-pc-i386-quick :: $(OUTDIR)/smpboot.bin.o
27 kernel-kernel-pc-i386-kobj :: $(OUTDIR)/smpboot.bin.o
28 kernel-kernel-pc-i386-kobj-quick :: $(OUTDIR)/smpboot.bin.o
30 %rule_assemble_multi basenames=smpbootstrap targetdir=$(OBJDIR)
31 %rule_link_binary file=$(OUTDIR)/smpboot.bin.o name=smpbootstrap objs=$(OBJDIR)/smpbootstrap.o ldflags="-m elf_i386"
33 $(OBJDIR)/smpbootstrap.o : | $(OBJDIR)
35 GLOB_MKDIRS += $(OUTDIR) $(OBJDIR)