PROG= kernel
-# first-stage, arch-dependent startup code
-SRCS= mpx.S
-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
+SRCS= clock.c cpulocals.c interrupt.c main.c proc.c start.c system.c \
+ table.c utility.c
DPADD+= ${LIBTIMERS} ${LIBSYS} ${LIBEXEC}
LDADD+= -ltimers -lsys -lexec
.include "system/Makefile.inc"
.include "arch/${ARCH}/Makefile.inc"
-.if ${USE_WATCHDOG} != "no"
-SRCS+= watchdog.c arch_watchdog.c
-CPPFLAGS+= -DUSE_WATCHDOG
-.endif
-
-.if ${USE_ACPI} != "no"
-SRCS+= acpi.c
-CPPFLAGS+= -DUSE_ACPI
+.ifdef CONFIG_SMP
+SRCS+= smp.c
.endif
-.if ${USE_APIC} != "no"
-SRCS+= apic.c apic_asm.S
-CPPFLAGS+= -DUSE_APIC
+.if ${USE_WATCHDOG} != "no"
+SRCS+= watchdog.c
+CPPFLAGS+= -DUSE_WATCHDOG
.endif
.if ${USE_MCONTEXT} != "no"
CPPFLAGS+= -DUSE_MCONTEXT
.endif
-.if ${USE_DEBUGREG} != "no"
-SRCS+= breakpoints.c debugreg.S
-.endif
-
# Extra debugging routines
.if ${USE_SYSDEBUG} != "no"
SRCS+= debug.c
CPPFLAGS+= -DUSE_SYSDEBUG
.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"
CPPFLAGS+= -DUSE_UPDATE
.endif
CPPFLAGS+= -DUSE_TRACE
.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>
debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h
HERE=${.CURDIR}/arch/${ARCH}
.PATH: ${HERE}
-SRCS+= arch_do_vmctl.c \
- arch_clock.c \
- do_iopenable.c \
- do_readbios.c \
- do_sdevio.c \
- exception.c \
- i8259.c \
- io_inb.S \
- io_inl.S \
- io_intr.S \
- io_inw.S \
- io_outb.S \
- io_outl.S \
- io_outw.S \
- klib.S \
- klib16.S \
- multiboot.S \
- memory.c \
- oxpcie.c \
- protect.c \
- arch_system.c \
- pre_init.c
+SRCS+= arch_clock.c arch_do_vmctl.c arch_system.c \
+ do_iopenable.c do_readbios.c do_sdevio.c exception.c i8259.c io_inb.S \
+ 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 \
+ 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
apic_asm.d klib.d mpx.d: procoffsets.h