2010-07-23 16:24:34 +02:00
|
|
|
|
2010-04-02 00:22:33 +02:00
|
|
|
# Makefile for arch-dependent kernel code
|
2010-06-25 20:29:09 +02:00
|
|
|
.include <bsd.own.mk>
|
2010-04-02 00:22:33 +02:00
|
|
|
|
2012-06-06 13:27:00 +02:00
|
|
|
HERE=${.CURDIR}/arch/${MACHINE_ARCH}
|
2012-03-30 18:35:18 +02:00
|
|
|
.PATH: ${HERE}
|
2012-06-01 16:58:00 +02:00
|
|
|
SRCS+= mpx.S arch_clock.c arch_do_vmctl.c arch_system.c \
|
2012-05-04 18:45:54 +02:00
|
|
|
do_iopenable.c do_readbios.c do_sdevio.c exception.c i8259.c io_inb.S \
|
2012-06-01 16:58:00 +02:00
|
|
|
io_inl.S io_intr.S io_inw.S io_outb.S io_outl.S io_outw.S klib.S klib16.S memory.c multiboot.S \
|
2012-05-04 18:45:54 +02:00
|
|
|
oxpcie.c pre_init.c protect.c
|
|
|
|
|
|
|
|
.if ${USE_ACPI} != "no"
|
|
|
|
SRCS+= acpi.c
|
|
|
|
CPPFLAGS+= -DUSE_ACPI
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${USE_APIC} != "no"
|
|
|
|
SRCS+= apic.c apic_asm.S
|
|
|
|
CPPFLAGS+= -DUSE_APIC
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${USE_DEBUGREG} != "no"
|
|
|
|
SRCS+= breakpoints.c debugreg.S
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${USE_WATCHDOG} != "no"
|
|
|
|
SRCS+= arch_watchdog.c
|
|
|
|
CPPFLAGS+= -DUSE_WATCHDOG
|
|
|
|
.endif
|
2010-07-23 16:24:34 +02:00
|
|
|
|
2012-03-30 18:35:18 +02:00
|
|
|
apic_asm.d klib.d mpx.d: procoffsets.h
|
|
|
|
|
|
|
|
# It's OK to hardcode the arch as i386 here as this and procoffsets.cf
|
|
|
|
# are i386-specific.
|
|
|
|
TMP=procoffsets.h.tmp
|
|
|
|
INCLS=../include/arch/i386/include/
|
|
|
|
PROCOFFSETSCF=procoffsets.cf
|
|
|
|
|
|
|
|
procoffsets.h: $(PROCOFFSETSCF) kernel.h proc.h $(INCLS)/stackframe.h $(INCLS)/archtypes.h
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
cat ${HERE}/$(PROCOFFSETSCF) | \
|
|
|
|
${TOOL_GENASSYM} -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} >$TMP && \
|
|
|
|
mv -f $TMP $@
|
|
|
|
|
2010-09-15 16:09:52 +02:00
|
|
|
.ifdef CONFIG_SMP
|
|
|
|
SRCS += arch_smp.c trampoline.S
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|