]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: neater arch-dependent split in Makefiles
authorBen Gras <ben@minix3.org>
Fri, 4 May 2012 16:45:54 +0000 (18:45 +0200)
committerBen Gras <ben@minix3.org>
Wed, 30 May 2012 23:06:19 +0000 (01:06 +0200)
. files in kernel/ references in kernel/Makefile, but
  in kernel/arch/i386/ in kernel/arch/i386/Makefile.inc

kernel/Makefile
kernel/arch/i386/Makefile.inc

index 8b54d2c565b3e0a17bc87a533932fbe1562e6082..8cc59213d1e7f905f20681f01e6db4bf0abfbf95 100644 (file)
@@ -3,15 +3,8 @@
 
 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
@@ -38,19 +31,13 @@ MAN=
 .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"
@@ -58,16 +45,15 @@ SRCS+= do_mcontext.c
 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
@@ -80,13 +66,6 @@ CPPFLAGS+= -DUSE_STATECTL
 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
index 2e13ff8859209ae38689abdf8cf0d69bcdc26f64..a53824aab855738e8fa2f5e74b2d7e1ae12e7dfd 100644 (file)
@@ -4,28 +4,29 @@
 
 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