kernel: neater arch-dependent split in Makefiles
. files in kernel/ references in kernel/Makefile, but in kernel/arch/i386/ in kernel/arch/i386/Makefile.inc
This commit is contained in:
parent
cd47780252
commit
3803c55856
|
|
@ -3,15 +3,8 @@
|
||||||
|
|
||||||
PROG= kernel
|
PROG= kernel
|
||||||
|
|
||||||
# first-stage, arch-dependent startup code
|
SRCS= clock.c cpulocals.c interrupt.c main.c proc.c start.c system.c \
|
||||||
SRCS= mpx.S
|
table.c utility.c
|
||||||
SRCS+= start.c table.c main.c proc.c \
|
|
||||||
system.c clock.c utility.c interrupt.c \
|
|
||||||
cpulocals.c
|
|
||||||
|
|
||||||
.ifdef CONFIG_SMP
|
|
||||||
SRCS += smp.c
|
|
||||||
.endif
|
|
||||||
|
|
||||||
DPADD+= ${LIBTIMERS} ${LIBSYS} ${LIBEXEC}
|
DPADD+= ${LIBTIMERS} ${LIBSYS} ${LIBEXEC}
|
||||||
LDADD+= -ltimers -lsys -lexec
|
LDADD+= -ltimers -lsys -lexec
|
||||||
|
|
@ -38,36 +31,29 @@ MAN=
|
||||||
.include "system/Makefile.inc"
|
.include "system/Makefile.inc"
|
||||||
.include "arch/${ARCH}/Makefile.inc"
|
.include "arch/${ARCH}/Makefile.inc"
|
||||||
|
|
||||||
|
.ifdef CONFIG_SMP
|
||||||
|
SRCS+= smp.c
|
||||||
|
.endif
|
||||||
|
|
||||||
.if ${USE_WATCHDOG} != "no"
|
.if ${USE_WATCHDOG} != "no"
|
||||||
SRCS+= watchdog.c arch_watchdog.c
|
SRCS+= watchdog.c
|
||||||
CPPFLAGS+= -DUSE_WATCHDOG
|
CPPFLAGS+= -DUSE_WATCHDOG
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.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_MCONTEXT} != "no"
|
.if ${USE_MCONTEXT} != "no"
|
||||||
SRCS+= do_mcontext.c
|
SRCS+= do_mcontext.c
|
||||||
CPPFLAGS+= -DUSE_MCONTEXT
|
CPPFLAGS+= -DUSE_MCONTEXT
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${USE_DEBUGREG} != "no"
|
|
||||||
SRCS+= breakpoints.c debugreg.S
|
|
||||||
.endif
|
|
||||||
|
|
||||||
# Extra debugging routines
|
# Extra debugging routines
|
||||||
.if ${USE_SYSDEBUG} != "no"
|
.if ${USE_SYSDEBUG} != "no"
|
||||||
SRCS+= debug.c
|
SRCS+= debug.c
|
||||||
CPPFLAGS+= -DUSE_SYSDEBUG
|
CPPFLAGS+= -DUSE_SYSDEBUG
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
# These come last, so the profiling buffer is at the end of the data segment
|
||||||
|
SRCS+= profile.c do_sprofile.c
|
||||||
|
|
||||||
.if ${USE_LIVEUPDATE} != "no"
|
.if ${USE_LIVEUPDATE} != "no"
|
||||||
CPPFLAGS+= -DUSE_UPDATE
|
CPPFLAGS+= -DUSE_UPDATE
|
||||||
.endif
|
.endif
|
||||||
|
|
@ -80,13 +66,6 @@ CPPFLAGS+= -DUSE_STATECTL
|
||||||
CPPFLAGS+= -DUSE_TRACE
|
CPPFLAGS+= -DUSE_TRACE
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${USE_BOOTPARAM} != "no"
|
|
||||||
CPPFLAGS+= -DUSE_BOOTPARAM
|
|
||||||
.endif
|
|
||||||
|
|
||||||
# These come last, so the profiling buffer is at the end of the data segment
|
|
||||||
SRCS+= profile.c do_sprofile.c
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
|
||||||
debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
|
debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
|
||||||
|
|
|
||||||
|
|
@ -4,28 +4,29 @@
|
||||||
|
|
||||||
HERE=${.CURDIR}/arch/${ARCH}
|
HERE=${.CURDIR}/arch/${ARCH}
|
||||||
.PATH: ${HERE}
|
.PATH: ${HERE}
|
||||||
SRCS+= arch_do_vmctl.c \
|
SRCS+= arch_clock.c arch_do_vmctl.c arch_system.c \
|
||||||
arch_clock.c \
|
do_iopenable.c do_readbios.c do_sdevio.c exception.c i8259.c io_inb.S \
|
||||||
do_iopenable.c \
|
io_inl.S io_intr.S io_inw.S io_outb.S io_outl.S io_outw.S klib.S klib16.S memory.c mpx.S multiboot.S \
|
||||||
do_readbios.c \
|
oxpcie.c pre_init.c protect.c
|
||||||
do_sdevio.c \
|
|
||||||
exception.c \
|
.if ${USE_ACPI} != "no"
|
||||||
i8259.c \
|
SRCS+= acpi.c
|
||||||
io_inb.S \
|
CPPFLAGS+= -DUSE_ACPI
|
||||||
io_inl.S \
|
.endif
|
||||||
io_intr.S \
|
|
||||||
io_inw.S \
|
.if ${USE_APIC} != "no"
|
||||||
io_outb.S \
|
SRCS+= apic.c apic_asm.S
|
||||||
io_outl.S \
|
CPPFLAGS+= -DUSE_APIC
|
||||||
io_outw.S \
|
.endif
|
||||||
klib.S \
|
|
||||||
klib16.S \
|
.if ${USE_DEBUGREG} != "no"
|
||||||
multiboot.S \
|
SRCS+= breakpoints.c debugreg.S
|
||||||
memory.c \
|
.endif
|
||||||
oxpcie.c \
|
|
||||||
protect.c \
|
.if ${USE_WATCHDOG} != "no"
|
||||||
arch_system.c \
|
SRCS+= arch_watchdog.c
|
||||||
pre_init.c
|
CPPFLAGS+= -DUSE_WATCHDOG
|
||||||
|
.endif
|
||||||
|
|
||||||
apic_asm.d klib.d mpx.d: procoffsets.h
|
apic_asm.d klib.d mpx.d: procoffsets.h
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user