]> Zhao Yanbai Git Server - minix.git/commitdiff
Convert kernel over to bsdmake
authorArun Thomas <arun@minix3.org>
Thu, 1 Apr 2010 22:22:33 +0000 (22:22 +0000)
committerArun Thomas <arun@minix3.org>
Thu, 1 Apr 2010 22:22:33 +0000 (22:22 +0000)
103 files changed:
Makefile
drivers/memory/memory_driver/Makefile
drivers/memory/memory_driver/memory.c
drivers/orinoco/Makefile
drivers/orinoco/orinoco.c
drivers/random/Makefile
drivers/random/random.c
drivers/rtl8139/Makefile
drivers/rtl8139/rtl8139.h
drivers/rtl8169/Makefile
drivers/rtl8169/rtl8169.c
drivers/tty/Makefile
drivers/tty/keyboard.c
etc/mk/minix.own.mk
kernel/Makefile
kernel/arch/i386/Makefile [deleted file]
kernel/arch/i386/Makefile.inc [new file with mode: 0644]
kernel/arch/i386/apic.c
kernel/arch/i386/apic.h
kernel/arch/i386/apic_asm.h
kernel/arch/i386/arch_clock.c [moved from kernel/arch/i386/clock.c with 97% similarity]
kernel/arch/i386/arch_do_vmctl.c
kernel/arch/i386/arch_system.c [moved from kernel/arch/i386/system.c with 99% similarity]
kernel/arch/i386/arch_watchdog.c [moved from kernel/arch/i386/watchdog.c with 98% similarity]
kernel/arch/i386/breakpoints.c
kernel/arch/i386/do_int86.c
kernel/arch/i386/do_iopenable.c
kernel/arch/i386/do_readbios.c
kernel/arch/i386/do_sdevio.c
kernel/arch/i386/exception.c
kernel/arch/i386/i8259.c
kernel/arch/i386/include/arch_clock.h [moved from kernel/arch/i386/clock.h with 100% similarity]
kernel/arch/i386/include/arch_watchdog.h [moved from kernel/arch/i386/watchdog.h with 93% similarity]
kernel/arch/i386/include/hw_intr.h [moved from kernel/arch/i386/hw_intr.h with 92% similarity]
kernel/arch/i386/klib.S [moved from kernel/arch/i386/klib386.S with 99% similarity]
kernel/arch/i386/memory.c
kernel/arch/i386/mpx.S [moved from kernel/arch/i386/mpx386.S with 98% similarity]
kernel/arch/i386/protect.c
kernel/arch/i386/proto.h
kernel/arch/i386/sconst.h
kernel/clock.h
kernel/interrupt.c
kernel/system/Makefile [deleted file]
kernel/system/Makefile.inc [new file with mode: 0644]
kernel/system/do_abort.c
kernel/system/do_clear.c
kernel/system/do_copy.c
kernel/system/do_cprofile.c
kernel/system/do_devio.c
kernel/system/do_endksig.c
kernel/system/do_exec.c
kernel/system/do_exit.c
kernel/system/do_fork.c
kernel/system/do_getinfo.c
kernel/system/do_getksig.c
kernel/system/do_irqctl.c
kernel/system/do_kill.c
kernel/system/do_mcontext.c
kernel/system/do_memset.c
kernel/system/do_newmap.c
kernel/system/do_nice.c
kernel/system/do_privctl.c
kernel/system/do_profbuf.c
kernel/system/do_runctl.c
kernel/system/do_safecopy.c
kernel/system/do_safemap.c
kernel/system/do_schedctl.c
kernel/system/do_schedule.c
kernel/system/do_segctl.c
kernel/system/do_setalarm.c
kernel/system/do_setgrant.c
kernel/system/do_sigreturn.c
kernel/system/do_sigsend.c
kernel/system/do_sprofile.c
kernel/system/do_stime.c
kernel/system/do_sysctl.c
kernel/system/do_times.c
kernel/system/do_trace.c
kernel/system/do_umap.c
kernel/system/do_unused.c
kernel/system/do_update.c
kernel/system/do_vdevio.c
kernel/system/do_vmctl.c
kernel/system/do_vtimer.c
kernel/watchdog.h
servers/is/Makefile
servers/is/dmp_kernel.c
servers/is/dmp_rs.c
servers/is/dmp_vm.c
servers/pm/Makefile
servers/pm/main.c
servers/pm/misc.c
servers/pm/schedule.c
servers/pm/utility.c
servers/rs/Makefile
servers/rs/inc.h
servers/rs/main.c
servers/rs/memory.c
servers/vm/Makefile
servers/vm/arch/i386/Makefile.inc [new file with mode: 0644]
servers/vm/main.c
servers/vm/sanitycheck.h
servers/vm/utility.c

index a036544b511d2b044ab37535965a406ddd8fd5a3..9e407d91c29d0dcc169500758577b89690197a4b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,6 @@ commands:
        cd commands && $(MAKE) all
 
 depend::
-       mkdep kernel
        cd kernel && $(MAKE) $@
        cd servers && $(MAKE) $@
        cd drivers && $(MAKE) $@
index b1492546518000e6536c5206143615d15f8db515..e31fd4e521f458dbd53097a374751c91733c5ba0 100644 (file)
@@ -11,7 +11,8 @@ MAN=
 
 BINDIR?= /usr/sbin
 
-CPPFLAGS.imgrd.c += -I${.CURDIR}/../ramdisk -T /usr/tmp
+CPPFLAGS.memory.c+=    -I${MINIXSRCDIR}
+CPPFLAGS.imgrd.c+=     -I${.CURDIR}/../ramdisk -T /usr/tmp
 
 .include <minix.prog.mk>
 .include <minix.subdir.mk>
index 92c4822ee80494e049a426c826e9561bfbfd4a04..513af8cc1c39694a69c0af645c61444ffd99ebf9 100644 (file)
@@ -21,9 +21,9 @@
 #include <minix/ds.h>
 #include <minix/vm.h>
 #include <sys/mman.h>
-#include "../../../kernel/const.h"
-#include "../../../kernel/config.h"
-#include "../../../kernel/type.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/type.h"
 
 #include <machine/vm.h>
 
index 3833e819a972423c150f6aa5d509bb288027f952..54fd98b7f613ce45486d8dc0d3daf106ac28601d 100644 (file)
@@ -9,4 +9,6 @@ MAN=
 
 BINDIR?= /usr/sbin
 
+CPPFLAGS.orinoco.c+=   -I${MINIXSRCDIR}
+
 .include <minix.prog.mk>
index 3d0f44bbe472ed7b5d61d4715678783cfe943160..c0394df41a05f3efe1bb0feadb5bcad5fac8c2f4 100644 (file)
@@ -62,9 +62,9 @@
 #include       <machine/pci.h>
 #include       <minix/ds.h>
 #include       <minix/endpoint.h>
-#include       "../../kernel/const.h"
-#include       "../../kernel/config.h"
-#include       "../../kernel/type.h"
+#include       "kernel/const.h"
+#include       "kernel/config.h"
+#include       "kernel/type.h"
 
 #define                VERBOSE         1       /* display message during init */
 
index 6287c5878025ccd370ce1c7343d82d4723cd228b..a6f474146a4cfc62c6a54c868952a15385daa65d 100644 (file)
@@ -11,5 +11,7 @@ MAN=
 
 BINDIR?= /usr/sbin
 
+CPPFLAGS.random.c+=    -I${MINIXSRCDIR}
+
 .include <minix.prog.mk>
 
index bab0d330776836eeca6db592401629cbecc0fc70..9e74ea4f7142d727b13a64f872be2214f230ea12 100644 (file)
@@ -8,7 +8,7 @@ that data into a seed for a psuedo random number generator.
 */
 
 #include <minix/drivers.h>
-#include "../../kernel/const.h"
+#include "kernel/const.h"
 #include "assert.h"
 
 #include "random.h"
index b83e12dc681e11731cddbb3e7c69166b39a860d3..0eb6dd3a97a79322372c9eefbffcc4446d4b3336 100644 (file)
@@ -9,4 +9,6 @@ MAN=
 
 BINDIR?= /usr/sbin
 
+CPPFLAGS+=     -I${MINIXSRCDIR}
+
 .include <minix.prog.mk>
index c8a299a89c66c7e6b78256e60a02ae498e35e8cf..4ad1543aa24aa4b173c1a2b56330a42751ce027c 100644 (file)
@@ -28,9 +28,9 @@ Created:      Aug 2003 by Philip Homburg <philip@cs.vu.nl>
 #include <assert.h>
 #include <unistd.h>
 #include <sys/ioc_memory.h>
-#include "../../kernel/const.h"
-#include "../../kernel/config.h"
-#include "../../kernel/type.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/type.h"
 
 #define        RL_IDR          0x00    /* Ethernet address
                                 * Note: RL_9346CR_EEM_CONFIG mode is
index dc1a68361d6c274659ea87f35f6820dcdaf92604..6174e3a83cab801e8e1d6803944cfe8a765891a0 100644 (file)
@@ -9,4 +9,6 @@ MAN=
 
 BINDIR?= /usr/sbin
 
+CPPFLAGS+=     -I${MINIXSRCDIR}
+
 .include <minix.prog.mk>
index 0c537841e7c0beb9e147d23145bb53d8d78d5f0b..0db59fed53dc0513c0f86c8bc80f67b66be9c41e 100644 (file)
@@ -26,9 +26,9 @@
 #include <sys/types.h>
 #include <assert.h>
 #include <unistd.h>
-#include "../../kernel/const.h"
-#include "../../kernel/config.h"
-#include "../../kernel/type.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/type.h"
 
 #define debug                  1
 #define printW()               ((void)0)
index 468c7eefb1c89db62e75b813b89e2d830929fe1e..78ebca49eb817fc34f55bd885a2f46758aa3186e 100644 (file)
@@ -15,7 +15,7 @@ BINDIR?= /sbin
 SUBDIR= keymaps
 
 # Needs kernel/const.h, etc
-CPPFLAGS+=      -I ../..
+CPPFLAGS+=     -I${MINIXSRCDIR}
 
 .include <minix.prog.mk>
 .include <minix.subdir.mk>
index bdf2e40d59349876331cd8fbf25a276c7760d0cb..56295cdf70b886b1b912be4abbb75c295fd3143a 100644 (file)
 #include <minix/com.h>
 #include <minix/keymap.h>
 #include "tty.h"
-#include <kernel/const.h>
-#include <kernel/config.h>
-#include <kernel/type.h>
-#include <kernel/proc.h>
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/type.h"
+#include "kernel/proc.h"
 
 PRIVATE u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
 #include "keymaps/us-std.src"
index 642ff0940b2248aaa7272a1ed227d74654b10975..ed303a8690eaac0327e7606a9c49481e315cc261 100644 (file)
@@ -73,6 +73,41 @@ PRINTOBJDIR= ${MAKE} -V .OBJDIR
 PRINTOBJDIR=   echo # prevent infinite recursion
 .endif
 
+
+
+#
+# Determine if running in the MINIX source tree by checking for the
+# existence of boot/ and tools/ in the current or a parent directory,
+# and setting _MSRC_TOP_ to the result.
+#
+.if !defined(_MSRC_TOP_)               # {
+_MSRC_TOP_!= cd ${.CURDIR}; while :; do \
+               here=`pwd`; \
+               [ -d boot  ] && [ -d tools ] && { echo $$here; break; }; \
+               case $$here in /) echo ""; break;; esac; \
+               cd ..; done
+
+.MAKEOVERRIDES+=       _MSRC_TOP_
+
+.endif                                 # }
+
+#
+# If _MSRC_TOP_ != "", we're within the MINIX source tree, so set
+# defaults for MINIXSRCDIR and _MSRC_TOP_OBJ_.
+#
+.if (${_MSRC_TOP_} != "")              # {
+
+MINIXSRCDIR?=  ${_MSRC_TOP_}
+
+.if !defined(_MSRC_TOP_OBJ_)
+_MSRC_TOP_OBJ_!=       cd ${_MSRC_TOP_} && ${PRINTOBJDIR}
+.MAKEOVERRIDES+=       _MSRC_TOP_OBJ_
+.endif
+
+.endif # _MSRC_TOP_ != ""              # }
+
+
+
 #
 # Determine if running in the NetBSD source tree by checking for the
 # existence of build.sh and tools/ in the current or a parent directory,
index 55f4094d40b197c166552c0b8c61425a7d60defb..44093da0f963c8fa1bb87211a38800b540dcffc1 100644 (file)
@@ -1,52 +1,28 @@
 # Makefile for kernel
+.include <minix.own.mk>
 
-include /etc/make.conf
-
-# Directories
-u = /usr
-i = $u/include
-l = $u/lib
-s = system
-a = arch/$(ARCH)
-
-# Programs, flags, etc.
-CC =   exec cc
-CPP =  $l/cpp
-LD =   $(CC) -.o
-CPPFLAGS=-I$i -I$a/include -I$a
-CFLAGS=$(CPROFILE) $(CPPFLAGS) $(EXTRA_OPTS)
-LDFLAGS=-i 
+PROG=  kernel
 
 # first-stage, arch-dependent startup code
-HEAD = $a/mpx386.o
-
-OBJS = start.o table.o main.o proc.o \
-       system.o clock.o utility.o debug.o profile.o interrupt.o \
-       watchdog.o
-SYSTEM = system.a
-ARCHLIB = $a/$(ARCH).a
-LIBS = -ltimers -lsys
+SRCS=  mpx.S
+SRCS+= start.c table.c main.c proc.c \
+       system.c clock.c utility.c debug.c profile.c interrupt.c \
+       watchdog.c
 
-# What to make.
-all: build 
-kernel build install: $(OBJS) 
-       cd system && $(MAKE) $@
-       cd $a && $(MAKE) $@
-       $(LD) $(CFLAGS) $(LDFLAGS) -o kernel $(HEAD) $(OBJS) \
-               $(SYSTEM) $(ARCHLIB) $(LIBS)
-       install -S 0 kernel
+DPADD+=        ${LIBTIMERS} ${LIBSYS}
+LDADD+=        -ltimers -lsys
 
-clean:
-       cd system && $(MAKE) -$(MAKEFLAGS) $@
-       cd $a && $(MAKE) -$(MAKEFLAGS) $@
-       rm -f *.a *.o *~ *.bak kernel
+LDFLAGS+=      -.o
+CPPFLAGS+=     -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
+AFLAGS+=       -I${.CURDIR}/arch/${ARCH}/include -I${MINIXSRCDIR}
 
-depend: 
-       cd system && $(MAKE) -$(MAKEFLAGS) $@
-       cd $a && $(MAKE) $@
-       mkdep "$(CC) -E $(CPPFLAGS)" *.c > .depend
+#Tell ASMCONV to prepend underscores to symbols
+ASMCONVFLAGS+= -u
 
-# How to build it
-.c.o:
-       $(CC) $(CFLAGS) -c -o $@ $<
+INSTALLFLAGS+= -S 0
+BINDIR=        /usr/sbin
+MAN=
 
+.include "system/Makefile.inc"
+.include "arch/${ARCH}/Makefile.inc"
+.include <minix.prog.mk>
diff --git a/kernel/arch/i386/Makefile b/kernel/arch/i386/Makefile
deleted file mode 100644 (file)
index d4a10b5..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# Makefile for kernel
-
-include /etc/make.conf
-
-ARCHAR=$(ARCH).a
-
-# objects, excluding first-stage code, which is $(HEAD).
-# the HEAD variable is passed as an argument to this Makefile
-# by an upper level Makefile.
-
-OBJS=  arch_do_vmctl.o \
-       breakpoints.o \
-       clock.o \
-       debugreg.o \
-       do_int86.o \
-       do_iopenable.o \
-       do_readbios.o \
-       do_sdevio.o \
-       exception.o \
-       i8259.o \
-       klib386.o \
-       memory.o \
-       mpx386.o \
-       protect.o \
-       system.o \
-       apic.o \
-       apic_asm.o \
-       watchdog.o
-
-CPPFLAGS=-Iinclude
-CFLAGS=-Iinclude -Wall $(CPROFILE)
-
-build: $(HEAD) $(ARCHAR)
-
-$(ARCHAR): $(ARCHAR)($(OBJS))
-       aal cr $@ $(OBJS)
-#      ar cru $(.TARGET) $(.OODATE)
-
-depend: 
-       mkdep "$(CC) -E $(CPPFLAGS)" *.c *.S > .depend
-
-clean:
-       rm -f *.a *.o *~ *.tmp *.s
-
-# How to build it
-klib386.o: klib386.S
-       $(CC) $(CFLAGS)  -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack -u $@.tmp $@.s
-       $(CC) $(CFLAGS) -c -o $@ $@.s
-
-mpx386.o: mpx386.S
-       $(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack -u $@.tmp $@.s
-       $(CC) $(CFLAGS) -c -o $@ $@.s
-
-apic_asm.o: apic_asm.S
-       $(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack -u $@.tmp $@.s
-       $(CC) $(CFLAGS) -c -o $@ $@.s
-
-debugreg.o: debugreg.S
-       $(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack -u $@.tmp $@.s
-       $(CC) $(CFLAGS) -c -o $@ $@.s
-
-$(HEAD): mpx386.o
-       cp $< $@
-
diff --git a/kernel/arch/i386/Makefile.inc b/kernel/arch/i386/Makefile.inc
new file mode 100644 (file)
index 0000000..5f4a96a
--- /dev/null
@@ -0,0 +1,21 @@
+# Makefile for arch-dependent kernel code
+.include <minix.own.mk>
+
+.PATH: ${.CURDIR}/arch/${ARCH}
+SRCS+= arch_do_vmctl.c \
+       breakpoints.c \
+       arch_clock.c \
+       debugreg.S \
+       do_int86.c \
+       do_iopenable.c \
+       do_readbios.c \
+       do_sdevio.c \
+       exception.c \
+       i8259.c \
+       klib.S \
+       memory.c \
+       protect.c \
+       arch_system.c \
+       apic.c \
+       apic_asm.S \
+       arch_watchdog.c
index 808572a92a0626d2c879c22a1668151ab3527ef3..bc9233f017ebe7a6d6c8f3117361ab2a87d9af68 100644 (file)
@@ -1,26 +1,26 @@
 /*
  * APIC handling routines. APIC is a requirement for SMP
  */
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 
 #include <unistd.h>
 #include <minix/portio.h>
 
 #include <minix/syslib.h>
 
-#include "../../proc.h"
-#include "../..//glo.h"
+#include "kernel/proc.h"
+#include "kernel/glo.h"
 #include "proto.h"
 
 #include <minix/u64.h>
 
 #include "apic.h"
 #include "apic_asm.h"
-#include "../../clock.h"
+#include "kernel/clock.h"
 #include "glo.h"
 
 #ifdef CONFIG_WATCHDOG
-#include "../../watchdog.h"
+#include "kernel/watchdog.h"
 #endif
 
 #define IA32_APIC_BASE 0x1b
index 4167390ac8ff14c646ef33c20e5cbcb5d00f95f8..96bf27aa10751636c6d60c1a43b3822e14623ad2 100644 (file)
@@ -90,7 +90,7 @@
 
 #ifndef __ASSEMBLY__
 
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 
 EXTERN int ioapic_enabled;
 EXTERN vir_bytes lapic_addr;
index f151606790a5d38aba420a4d23802d8be36f4043..fdb3eb8503a2c9aa3bd55a581ff6bedb5871b2f7 100644 (file)
@@ -3,7 +3,7 @@
 
 
 #ifndef __ASSEMBLY__
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 
 _PROTOTYPE( void apic_hwint00, (void) );
 _PROTOTYPE( void apic_hwint01, (void) );
similarity index 97%
rename from kernel/arch/i386/clock.c
rename to kernel/arch/i386/arch_clock.c
index 09392c40b61f7c3090235da7d234b15b9132f5db..9f1d66e086c17e3a8b6b1be6eb82bedd9cf43a49 100644 (file)
@@ -4,10 +4,10 @@
 #include <machine/ports.h>
 #include <minix/portio.h>
 
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 
-#include "../../clock.h"
-#include "../../proc.h"
+#include "kernel/clock.h"
+#include "kernel/proc.h"
 #include <minix/u64.h>
 
 
index d3b32a855f2a6d10f43087ebe159f58b16041190..96ef1eaac94b19ffd020af6288f356265366f5e3 100644 (file)
@@ -7,7 +7,7 @@
  *     SVMCTL_VALUE    to this value
  */
 
-#include "../../system.h"
+#include "kernel/system.h"
 #include <minix/type.h>
 
 #include "proto.h"
similarity index 99%
rename from kernel/arch/i386/system.c
rename to kernel/arch/i386/arch_system.c
index d8d5085091e3c0d692ee797e29f13d9844da4a33..91bc629a7337e03a94a8af6ee1ee7dd32003f4f7 100644 (file)
@@ -1,6 +1,6 @@
 /* system dependent functions for use inside the whole kernel. */
 
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 
 #include <unistd.h>
 #include <ctype.h>
@@ -13,8 +13,8 @@
 
 #include "archconst.h"
 #include "proto.h"
-#include "../../proc.h"
-#include "../../debug.h"
+#include "kernel/proc.h"
+#include "kernel/debug.h"
 
 #ifdef CONFIG_APIC
 #include "apic.h"
similarity index 98%
rename from kernel/arch/i386/watchdog.c
rename to kernel/arch/i386/arch_watchdog.c
index 41a876c20b347c9942f5f1dfc9f4b3149264c56f..9aaf4c7b3cfcb76fd12bab50185292f0b8967087 100644 (file)
@@ -1,5 +1,5 @@
-#include "../../kernel.h"
-#include "../../watchdog.h"
+#include "kernel/kernel.h"
+#include "kernel/watchdog.h"
 #include "proto.h"
 #include <minix/minlib.h>
 
index eaf54ee5c826a26acb31c353dbf6caa42cde6eaf..189cb26c3fb47d5cf6b50268243cf5324785de32 100644 (file)
@@ -1,4 +1,4 @@
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 #include "proto.h"
 
 #include "debugreg.h"
index d8f4d830b10cbf0ec0fe8074dff3524a292e5554..261875786ff63eb67f9e5ccb3f67ede792e917ca 100644 (file)
@@ -5,7 +5,7 @@
  *    m1_p1:   INT86_REG86     
  */
 
-#include "../../system.h"
+#include "kernel/system.h"
 #include <minix/type.h>
 #include <minix/endpoint.h>
 #include <machine/int86.h>
index fdc762e5a4357bfff7f39949ed9a0e72a9223160..ae79c68b225f04e4bb2d190f5189d33c0f4c62eb 100644 (file)
@@ -8,8 +8,8 @@
  *    Jorrit N. Herder <jnherder@cs.vu.nl>
  */
 
-#include "../../system.h"
-#include "../../kernel.h"
+#include "kernel/system.h"
+#include "kernel/kernel.h"
 #include <minix/endpoint.h>
 
 #include "proto.h"
index 0250326ab85020eb7a84e2898781c14b99cd0f47..552716be67aa41a4bb6d565344df161b84582abc 100644 (file)
@@ -7,7 +7,7 @@
  *    m2_p1:   RDB_BUF                 buffer address in requesting process
  */
 
-#include "../../system.h"
+#include "kernel/system.h"
 #include <minix/type.h>
 
 /*===========================================================================*
index 517d0651a46bdc0e0fd3c784ba184e6f465ba57a..77e3d962ddff2bdd6396b291a31e5ffade480c1d 100644 (file)
@@ -10,7 +10,7 @@
  *    m2_i1:   DIO_OFFSET      (offset into the grant)
  */
 
-#include "../../system.h"
+#include "kernel/system.h"
 #include <minix/devio.h>
 #include <minix/endpoint.h>
 
index 541add43b6536dc48a8a991920075063da6e41ed..7267008a28267bab84c21085184453e5dbf3620e 100644 (file)
@@ -3,13 +3,13 @@
  * a panic.
  */
 
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 #include "proto.h"
 #include <signal.h>
 #include <string.h>
 #include <assert.h>
-#include "../../proc.h"
-#include "../../proto.h"
+#include "kernel/proc.h"
+#include "kernel/proto.h"
 
 extern int catch_pagefaults;
 
index 4f99bed12f897b9482d9f910b27ec26ca16ae1d0..cc0bc419edf42dceb39a85c6a53e7e0033aeb60c 100644 (file)
@@ -5,8 +5,8 @@
  *     intr_init:      initialize the interrupt controller(s)
  */
 
-#include "../../kernel.h"
-#include "../../proc.h"
+#include "kernel/kernel.h"
+#include "kernel/proc.h"
 #include "proto.h"
 #include <minix/portio.h>
 #include <machine/cpu.h>
similarity index 93%
rename from kernel/arch/i386/watchdog.h
rename to kernel/arch/i386/include/arch_watchdog.h
index 4d30ec537486693d054ebf6eb39c6a8f93de1cfd..c205094e1fd89aa3321b0a8822fa14935ddc80ae 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __I386_WATCHDOG_H__
 #define __I386_WATCHDOG_H__
 
-#include "../../kernel.h"
+#include "kernel/kernel.h"
 
 struct nmi_frame {
        reg_t   eax;
similarity index 92%
rename from kernel/arch/i386/hw_intr.h
rename to kernel/arch/i386/include/hw_intr.h
index 1665b7818c6731955bb83eef4046824eace2e6d5..6f70495c9a01e2aa9a3a46c5923f25380f2337d3 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __HW_INTR_X86_H__
 #define __HW_INTR_X86_H__
 
-#include "../..//kernel.h"
+#include "kernel/kernel.h"
 
 /* legacy PIC */
 
similarity index 99%
rename from kernel/arch/i386/klib386.S
rename to kernel/arch/i386/klib.S
index a4b09c005671a9119d4d49d9aa324dc8b3814b31..446690fc1322e25aaf9957dfe4e161dc90b103ca 100644 (file)
@@ -5,7 +5,7 @@
 #include <minix/const.h>
 #include <machine/interrupt.h>
 #include "archconst.h"
-#include "../../const.h"
+#include "kernel/const.h"
 #include "sconst.h"
 
 /*
index b197091b9814f28b816e3ad358168ae5cbd327c9..c68b6bebbacd0ef4999ce4e46f68d40734baabad 100644 (file)
@@ -1,8 +1,8 @@
 
 
-#include "../../kernel.h"
-#include "../../proc.h"
-#include "../../vm.h"
+#include "kernel/kernel.h"
+#include "kernel/proc.h"
+#include "kernel/vm.h"
 
 #include <machine/vm.h>
 
 #include <machine/vm.h>
 
 #include "proto.h"
-#include "../../proto.h"
-#include "../../proto.h"
-#include "../../debug.h"
+#include "kernel/proto.h"
+#include "kernel/debug.h"
 
 #ifdef CONFIG_APIC
 #include "apic.h"
 #ifdef CONFIG_WATCHDOG
-#include "../../watchdog.h"
+#include "kernel/watchdog.h"
 #endif
 #endif
 
similarity index 98%
rename from kernel/arch/i386/mpx386.S
rename to kernel/arch/i386/mpx.S
index fd46183caf604493105c8d508b9b23fa6dc4795e..4a98d84bf73be1691e37711e67d6187e06a937a3 100644 (file)
@@ -1,7 +1,4 @@
 /*
- * This file, mpx386.s, is included by mpx.s when Minix is compiled for  
- * 32-bit Intel CPUs. The alternative mpx88.s is compiled for 16-bit CPUs. 
- *
  * This file is part of the lowest layer of the MINIX kernel.  (The other part 
  * is "proc.c".)  The lowest layer does process switching and message handling. 
  * Furthermore it contains the assembler startup code for Minix and the 32-bit 
@@ -42,7 +39,7 @@
  * and modified by the boot monitor before the kernel starts.
  */
 
-#include "../../kernel.h" /* configures the kernel */
+#include "kernel/kernel.h" /* configures the kernel */
 
 /* sections */
 
@@ -69,8 +66,8 @@ begbss:
 #include <minix/com.h>
 #include <machine/interrupt.h>
 #include "archconst.h"
-#include "../../const.h"
-#include "../../proc.h"
+#include "kernel/const.h"
+#include "kernel/proc.h"
 #include "sconst.h"
 
 /* Selected 386 tss offsets. */
index 7681cae6177e33790ddb8190e283ae9edde08815..c009986e951f4b38cbe60311181e25d329762644 100644 (file)
@@ -3,8 +3,8 @@
  * for local descriptors in the process table.
  */
 
-#include "../../kernel.h"
-#include "../../proc.h"
+#include "kernel/kernel.h"
+#include "kernel/proc.h"
 #include "archconst.h"
 
 #include "proto.h"
index 5e7c55f3d18847d6e61ff6f70081074be7b4ab4f..ee25a003b5249bd61a1e87e63b68e0b833eadefd 100644 (file)
@@ -174,6 +174,6 @@ _PROTOTYPE(void __user_copy_msg_pointer_failure, (void));
 _PROTOTYPE(int breakpoint_set, (phys_bytes linaddr, int index, int flags));
 
 /* functions defined in architecture-independent kernel source. */
-#include "../../proto.h"
+#include "kernel/proto.h"
 
 #endif
index c5d32752bc79346e048983f53bdbfbf973ba3c37..2a5e3b667319afa359c97227880c0b06094cd9b5 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SCONST_H__
 #define __SCONST_H__
 
-#include "../../const.h"
+#include "kernel/const.h"
 
 /* Miscellaneous constants used in assembler code. */
        W = _WORD_SIZE  /* Machine word size. */
index b5936d315b282d97b7194fcd527d385cecaf009c..b4ccab3d0e1f10cb442cca8a5a55d279d82af283 100644 (file)
@@ -2,7 +2,7 @@
 #define __CLOCK_H__
 
 #include "kernel.h"
-#include "arch/i386/clock.h"
+#include "arch_clock.h"
 
 _PROTOTYPE(int boot_cpu_init_timer, (unsigned freq));
 
index 6482d8e3241cca904da6081d45a14113b5463b5e..00d0310da06dfefdf65111658041e13d914c91bc 100644 (file)
@@ -18,8 +18,7 @@
 #include "kernel.h"
 #include "proc.h"
 #include "archconst.h"
-
-#include "arch/i386/hw_intr.h"
+#include "hw_intr.h"
 
 /* number of lists of IRQ hooks, one list per supported line. */
 PUBLIC irq_hook_t* irq_handlers[NR_IRQ_VECTORS] = {0};
diff --git a/kernel/system/Makefile b/kernel/system/Makefile
deleted file mode 100644 (file)
index a818336..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Makefile for system library implementation
-
-include /etc/make.conf
-
-# Directories
-u = /usr
-i = $u/include
-a = ../arch
-
-# Programs, flags, etc.
-#CC =  exec cc $(CFLAGS) -c
-CC =   exec cc
-#CCNOPROF =      exec cc $(CFLAGSNOPROF) -c      # no call profiling for these
-CPP =  $l/cpp
-LD =   $(CC) -.o
-CFLAGS = -I$i $(CPROFILE) -I$a/$(ARCH)/include
-#CFLAGSNOPROF = -I$i
-LDFLAGS = -i
-
-SYSTEM = ../system.a
-
-# What to make.
-all build install: $(SYSTEM)
-
-OBJECTS        = \
-       do_unused.o \
-       do_fork.o \
-       do_exec.o \
-       do_newmap.o \
-       do_clear.o \
-       do_exit.o \
-       do_trace.o \
-       do_runctl.o \
-       do_update.o \
-       do_times.o \
-       do_setalarm.o \
-       do_stime.o \
-       do_vtimer.o \
-       do_irqctl.o \
-       do_devio.o \
-       do_vdevio.o \
-       do_copy.o \
-       do_umap.o \
-       do_memset.o \
-       do_setgrant.o \
-       do_privctl.o \
-       do_segctl.o \
-       do_safecopy.o \
-       do_safemap.o \
-       do_sysctl.o \
-       do_getksig.o \
-       do_endksig.o \
-       do_kill.o \
-       do_sigsend.o \
-       do_sigreturn.o \
-       do_abort.o \
-       do_getinfo.o \
-       do_sprofile.o \
-       do_cprofile.o \
-       do_profbuf.o \
-       do_vmctl.o \
-       do_mcontext.o \
-       do_schedule.o \
-       do_schedctl.o
-
-build $(SYSTEM):       $(SYSTEM)($(OBJECTS))
-       aal cr $@ *.o
-#      aal cr $@ $(OBJECTS)
-#      ar cru $(.TARGET) $(.OODATE)
-
-clean:
-       rm -f $(SYSTEM) *.o *~ *.bak 
-
-depend: 
-       mkdep "$(CC) $(CFLAGS) -E" *.c > .depend
diff --git a/kernel/system/Makefile.inc b/kernel/system/Makefile.inc
new file mode 100644 (file)
index 0000000..5addba8
--- /dev/null
@@ -0,0 +1,44 @@
+# Makefile for system library implementation
+.include <minix.own.mk>
+
+.PATH: ${.CURDIR}/system
+SRCS+=         \
+       do_unused.c \
+       do_fork.c \
+       do_exec.c \
+       do_newmap.c \
+       do_clear.c \
+       do_exit.c \
+       do_trace.c \
+       do_runctl.c \
+       do_update.c \
+       do_times.c \
+       do_setalarm.c \
+       do_stime.c \
+       do_vtimer.c \
+       do_irqctl.c \
+       do_devio.c \
+       do_vdevio.c \
+       do_copy.c \
+       do_umap.c \
+       do_memset.c \
+       do_setgrant.c \
+       do_privctl.c \
+       do_segctl.c \
+       do_safecopy.c \
+       do_safemap.c \
+       do_sysctl.c \
+       do_getksig.c \
+       do_endksig.c \
+       do_kill.c \
+       do_sigsend.c \
+       do_sigreturn.c \
+       do_abort.c \
+       do_getinfo.c \
+       do_sprofile.c \
+       do_cprofile.c \
+       do_profbuf.c \
+       do_vmctl.c \
+       do_mcontext.c \
+       do_schedule.c \
+       do_schedctl.c
index 60676515b5b13d1034a8042600487a485c32c72c..c38d4c6c56d0f7c72485170951bdd980b44db072 100644 (file)
@@ -8,7 +8,7 @@
  *    m1_p1:   ABRT_MON_ADDR   (virtual address of params)     
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <unistd.h>
 
 #if USE_ABORT
index 0e85a764d8db955d2a856f78bf9f4868b903e39b..58819aa5c5a5357f875e0a70df6bf422ac2d9121 100644 (file)
@@ -5,7 +5,7 @@
  *    m1_i1:   PR_ENDPT                (endpoint of process to clean up)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 
index d4a0816d979fe378aed0c206873a6277bb5c2df5..736a655026d90f18ecbce3dae6249cf70379c797 100644 (file)
@@ -11,7 +11,7 @@
  *    m5_l3:   CP_NR_BYTES             number of bytes to copy
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <minix/type.h>
 
 #if (USE_VIRCOPY || USE_PHYSCOPY)
index 5b2c2661dd090a89f6cc480c087bf4ed744d4849..c01d39133e2e5bf5ede01be5a3ff96452df4b107 100644 (file)
@@ -12,7 +12,7 @@
  *   14 Aug, 2006   Created (Rogier Meurs)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <string.h>
 
index b26ad69d0aed5f862bf299e9f9896c3428ea17b5..8828813a955433015bede7be17b03e0168bb9ce8 100644 (file)
@@ -7,7 +7,7 @@
  *   m2_l2:    DIO_VALUE       (value to write/ return value read)     
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <minix/devio.h>
 #include <minix/endpoint.h>
 #include <minix/portio.h>
index cd1acaf62e92edb04a833fbcebe5df6a16cf61cb..4ee185d3e04fe470eeaba606df33f4a234167509 100644 (file)
@@ -5,7 +5,7 @@
  *     m2_i1:  SIG_ENDPT       # process for which PM is done
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #if USE_ENDKSIG 
 
index ca0e976f55dad47e149f96df99dd97abbc0ac5fe..0e9e473c9c73ac2006c8917967d4f72aae42203d 100644 (file)
@@ -7,7 +7,7 @@
  *    m1_p2:   PR_NAME_PTR             (pointer to program name)
  *    m1_p3:   PR_IP_PTR               (new instruction pointer)
  */
-#include "../system.h"
+#include "kernel/system.h"
 #include <string.h>
 #include <minix/endpoint.h>
 
index 2970a7eb53df9e129e71a9aab00eb69ba3447181..b344017f9bd7a0820a7511410fcc29f952f1f91e 100644 (file)
@@ -2,7 +2,7 @@
  *   m_type:   SYS_EXIT
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 #include <signal.h>
index 1066473ddb473c48f39f66c59cf30824ed88a15d..d66f6fcde18ae2a799b7bcbf7286689bae429269 100644 (file)
@@ -8,8 +8,8 @@
  *    m1_i3:   PR_FORK_FLAGS   (fork flags)
  */
 
-#include "../system.h"
-#include "../vm.h"
+#include "kernel/system.h"
+#include "kernel/vm.h"
 #include <signal.h>
 #include <string.h>
 #include <assert.h>
index 5aa6cdf65b43a691e5b47cb2162aed6e77facb23..7d29fb9f31603a385c206ffaf74dcdb49870be58 100644 (file)
@@ -12,7 +12,7 @@
 #include <string.h>
 #include <minix/endpoint.h>
 
-#include "../system.h"
+#include "kernel/system.h"
 
 
 #if USE_GETINFO
index 1416113dbd9c47634a13078b02ab70d6440be69d..c93cf7ab5b9e958062d47684ff347088e142b89e 100644 (file)
@@ -6,7 +6,7 @@
  *     m2_l1:  SIG_MAP         # bit map with pending signals
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <signal.h>
 #include <minix/endpoint.h>
 
index 67d414802910854a34f949d01add64cdbea76bbd..2e14eedb3a2cb308ca26900e146f7d205e988717 100644 (file)
@@ -9,7 +9,7 @@
  *      ,,          ,,          (returns index of irq hook assigned at kernel)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 
index c6ace6842f877fddd75f86bb3cdf2a1eb197ccf6..5e72f9689f740e1b95416569b411a3e5fdf4da3c 100644 (file)
@@ -6,7 +6,7 @@
  *     m2_i2:  SIG_NUMBER      # signal number to send to process
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <signal.h>
 
 #if USE_KILL
index 9dd322f80b8ec0903a4dd5d730d459cc558ac190..0dd86b83df6468f1841cac757f57df2a50af18e5 100644 (file)
@@ -8,7 +8,7 @@
  *
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <string.h>
 #include <machine/mcontext.h>
 
index 8fcfae1ded3b9335aea33d3d10e776a762008c9e..dd8a06a5101d153f8f0144dd036fcb49519e165b 100644 (file)
@@ -7,7 +7,7 @@
  *    m2_l2:   MEM_PATTERN     (pattern byte to be written)    
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #if USE_MEMSET
 
index 97f474b8350c5511419a3400c4de9cd44899e840..016a0f90fa0f1e266f3bdddaa34c520ed0d0613b 100644 (file)
@@ -5,7 +5,7 @@
  *    m1_i1:   PR_ENDPT                (install new map for this process)
  *    m1_p1:   PR_MEM_PTR              (pointer to the new memory map)
  */
-#include "../system.h"
+#include "kernel/system.h"
 #include <minix/endpoint.h>
 
 #if USE_NEWMAP
index 3fb29736aac36366bc4ba0fb668449d30839292c..72366e82e2b4fcb445b45ec8e24f2c8c15a38735 100644 (file)
@@ -6,7 +6,7 @@
  *    m1_i2:   PR_PRIORITY     the new priority
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <sys/resource.h>
 
 #if USE_NICE
index 0fcdaba674f261c879d398f2e7dd6f41309583f7..21544862da5a71464e563cbff3832a4d4824e021 100644 (file)
@@ -7,8 +7,8 @@
  *    m2_p1:   CTL_ARG_PTR     (pointer to request data)
  */
 
-#include "../system.h"
-#include "../ipc.h"
+#include "kernel/system.h"
+#include "kernel/ipc.h"
 #include <signal.h>
 #include <string.h>
 #include <minix/endpoint.h>
index 3d77757f437f17cdbaadc030bbe941ad37bb2d68..3600f26fc7a83a43fc7c65585315a5508dfb62ef 100644 (file)
@@ -9,7 +9,7 @@
  *   14 Aug, 2006   Created (Rogier Meurs)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 /*===========================================================================*
  *                             do_profbuf                                   *
index e1da8b5d8722e8832109c3244aefe7298e95999a..f5b243f63988152a136f1f2f08c49284aac4a804 100644 (file)
@@ -7,7 +7,7 @@
  *    m1_i3:   RC_FLAGS        request flags
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #if USE_RUNCTL
 
index 688ce223dafdc805bd0122f7e0d8dea9209f8e83..6cf85397a99879dc0eaf425a493f7a33fde1e2cf 100644 (file)
@@ -17,7 +17,7 @@
 #include <minix/type.h>
 #include <minix/safecopies.h>
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #define MAX_INDIRECT_DEPTH 5   /* up to how many indirect grants to follow? */
 
index 32dc2ebe91ef2833c334281520754c9cb874ce63..33649b76ec3faa492a207d3ddc88bb78ecc2e024 100644 (file)
@@ -17,7 +17,7 @@
 #include <minix/type.h>
 #include <minix/safecopies.h>
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <signal.h>
 
index 12029f5e4c1d6530dc23242133964bdaa70819a0..592b7d4f245a002b2c61e1c6a0afc961a4a360fd 100644 (file)
@@ -1,4 +1,4 @@
-#include "../system.h"
+#include "kernel/system.h"
 #include <signal.h>
 #include <sys/sigcontext.h>
 #include <minix/endpoint.h>
index 04421f423bb523cb9a055fb30d6b05c1a07318d7..f9c37e4db7104e3343a22e45c8e7a549e7549620 100644 (file)
@@ -1,4 +1,4 @@
-#include "../system.h"
+#include "kernel/system.h"
 #include <signal.h>
 #include <sys/sigcontext.h>
 #include <minix/endpoint.h>
index ccf85bea2e6837ddb8e19fc08b7c49828555257e..d7fa2c80b7191487432a03ae86d72a89d8dd7215 100644 (file)
@@ -8,7 +8,7 @@
  *    m4_l2:   SEG_OFFSET      (return offset within segment here)
  *    m4_l5:   SEG_INDEX       (return index into remote memory map here)
  */
-#include "../system.h"
+#include "kernel/system.h"
 
 #if USE_SEGCTL
 
index 84f5f069a721ac56ed6bd70098f3d50f3a393955..bd2d2a35f8ee27f7f4d4426a036ec02b69ecee6c 100644 (file)
@@ -7,7 +7,7 @@
  *    m2_l1:   ALRM_TIME_LEFT          (return seconds left of previous)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 
index f2584323fb714396584cda94412a2e43164b2f67..e7f6e76c993b6f7bc5f42670ae61e37f0938d1ef 100644 (file)
@@ -6,7 +6,7 @@
  *     SG_SIZE number of entries
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <minix/safecopies.h>
 
 /*===========================================================================*
index fe083635ef4eb4c457c298a36c5c43b652cbcc25..5224de2a6fafa071a989ef2fe2d7fdcd7907171a 100644 (file)
@@ -7,7 +7,7 @@
  *
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <string.h>
 #include <machine/cpu.h>
 #include <sys/sigcontext.h>
index d728fcf6145272aaf4bc3464b73256c46e0bd30b..53b872fe9e433bf98f9cdad181f744f1f711227c 100644 (file)
@@ -8,7 +8,7 @@
  *
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <signal.h>
 #include <string.h>
 #include <sys/sigcontext.h>
index 27646cb11115a5a49d7a5a8f5daaee05d1de1f05..629ee1dff910c138efe54b0965cf05ece62dc319 100644 (file)
@@ -13,7 +13,7 @@
  *   14 Aug, 2006   Created (Rogier Meurs)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #if SPROFILE
 
index 8b1194faa5aef573e48caa8af5ba6957d37508e4..2e73be8b5d9480e4ba1837b18c82e79f82e04d9b 100644 (file)
@@ -5,7 +5,7 @@
  *    m4_l3:   T_BOOTTIME
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 
index 0bb92579554fcee7d51ecbb0d80b34994a683d7e..5866f3671c182eea0de4900f76a7c8706c7eeba5 100644 (file)
@@ -6,7 +6,7 @@
  * and then request-specific arguments in SYSCTL_ARG1 and SYSCTL_ARG2.
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 
 /*===========================================================================*
index 93284bb4cccb072c88edf654cd24084befc234c9..dd6d7e4c47fb0096237c90b85fe3b06e829fa963 100644 (file)
@@ -9,7 +9,7 @@
  *    m4_l5:   T_BOOT_TICKS    
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 
index fe10eb6589e5cc406c92130fa2ffa800ce26cde9..f27dc4e34d05b6433f9955f17d9e849a49636230 100644 (file)
@@ -8,7 +8,7 @@
  *    m2_l2:    CTL_DATA        data to be written or returned here
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <sys/ptrace.h>
 
 #if USE_TRACE
index 6a4d66a5ab486428e197291c5019a879ca65f8d8..c3593481087d86601153873bb7ac4b370bf8f8e7 100644 (file)
@@ -9,7 +9,7 @@
  *    m5_l3:   CP_NR_BYTES     (size of datastructure)         
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <minix/endpoint.h>
 
index d174699b6d0ee439760723207a76dffc4648ee29..155968ba5704915b3b90554c949b2dada56a9f92 100644 (file)
@@ -2,7 +2,7 @@
  * call may be unused when it is not defined or when it is disabled in the
  * kernel's configuration.
  */
-#include "../system.h"
+#include "kernel/system.h"
 
 /*===========================================================================*
  *                               do_unused                                  *
index f38f7205dc403ec369817587468126a6a80f25e0..2e52ef460853d03e827b11ce53b6ce5679551ba5 100644 (file)
@@ -6,8 +6,8 @@
  *    m2_i2:   SYS_UPD_DST_ENDPT       (destination process endpoint)
  */
 
-#include "../system.h"
-#include "../ipc.h"
+#include "kernel/system.h"
+#include "kernel/ipc.h"
 #include <string.h>
 
 #if USE_UPDATE
index d4ca807ec634011f319556b9f5f347d9ec3d6013..d3be18e67a4725361bef774cf46797ce82147b56 100644 (file)
@@ -7,7 +7,7 @@
  *    m2_i2:   DIO_VEC_SIZE    (number of ports to read or write) 
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 #include <minix/devio.h>
 #include <minix/endpoint.h>
 #include <minix/portio.h>
index 5d091d402ed456e57d2d3e08a71d1e31c378b02b..b18cbde6e39477b9d909931d180aa3682ebc1dcb 100644 (file)
@@ -7,9 +7,9 @@
  *     SVMCTL_VALUE    to this value
  */
 
-#include "../system.h"
-#include "../vm.h"
-#include "../debug.h"
+#include "kernel/system.h"
+#include "kernel/vm.h"
+#include "kernel/debug.h"
 #include <assert.h>
 #include <minix/type.h>
 
index a85cf3b5aba7c0fbf72b850bc2b7c5dc6ed6ba23..d7cacf6e3ad95f50f01e692a8e844808cb573db0 100644 (file)
@@ -8,7 +8,7 @@
  *    m2_l2:   VT_ENDPT                (process to which the timer belongs)
  */
 
-#include "../system.h"
+#include "kernel/system.h"
 
 #include <signal.h>
 #include <minix/endpoint.h>
index 9dd36ddc0f6852196039f7e2ccbbae06eb2d338e..04cc0987b6456f702c58e6a80a3a355ed9f8bc22 100644 (file)
@@ -2,7 +2,7 @@
 #define __WATCHDOG_H__
 
 #include "kernel.h"
-#include "arch/i386/watchdog.h"
+#include "arch_watchdog.h"
 
 extern int watchdog_enabled; /* if set to non-zero the watch dog is enabled */
 extern unsigned watchdog_local_timer_ticks; /* is timer still ticking? */
index d6ce20a296232aad2c448508d70a08bb780ec0e5..ee9a1ed89438ae81c1a30fecffba3dd891c07ab6 100644 (file)
@@ -9,4 +9,8 @@ MAN=
 
 BINDIR?= /sbin
 
+CPPFLAGS.dmp_kernel.c+=        -I${MINIXSRCDIR}
+CPPFLAGS.dmp_rs.c+=    -I${MINIXSRCDIR}
+CPPFLAGS.dmp_vm.c+=    -I${MINIXSRCDIR}
+
 .include <minix.prog.mk>
index 3a370cdf860a8e45858ca9db76fe5a763412d018..aceb7778a450ebcd3b8adedcab696e07c92d5093 100644 (file)
@@ -6,12 +6,12 @@
 #include <minix/endpoint.h>
 #include <minix/sysutil.h>
 #include <minix/sys_config.h>
-#include "../../kernel/const.h"
-#include "../../kernel/config.h"
-#include "../../kernel/debug.h"
-#include "../../kernel/type.h"
-#include "../../kernel/proc.h"
-#include "../../kernel/ipc.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/debug.h"
+#include "kernel/type.h"
+#include "kernel/proc.h"
+#include "kernel/ipc.h"
 
 #define LINES 22
 
index 60e8ec3175542683de64ba85fc5c216095a44a6d..70c94a47899bf5e49bc300e8c7a34fdba1bfdcef 100644 (file)
@@ -10,7 +10,7 @@
 #include "inc.h"
 #include <timers.h>
 #include <minix/rs.h>
-#include "../../kernel/priv.h"
+#include "kernel/priv.h"
 #include "../rs/const.h"
 #include "../rs/type.h"
 
index 47c742ff3228f1350f35fe11533671c7c607aa47..6cda9d5fb5b838433e4ac8dec0e34438c490792b 100644 (file)
@@ -4,7 +4,7 @@
 #include <sys/mman.h>
 #include <minix/vm.h>
 #include <timers.h>
-#include "../../kernel/proc.h"
+#include "kernel/proc.h"
 
 #define LINES 24
 
index 33b8ba0ab89afffacc431776a1ca745b8df02fa3..8f1eb5970cbdeaf0e36b53ee90807ba15f21e395 100644 (file)
@@ -12,4 +12,9 @@ MAN=
 BINDIR?= /usr/sbin
 INSTALLFLAGS+= -S 32k
 
+CPPFLAGS.main.c+=      -I${MINIXSRCDIR}
+CPPFLAGS.misc.c+=      -I${MINIXSRCDIR}
+CPPFLAGS.schedule.c+=  -I${MINIXSRCDIR}
+CPPFLAGS.utility.c+=   -I${MINIXSRCDIR}
+
 .include <minix.prog.mk>
index 0a0212e2abfb8b3063292f2efeb657495f58c012..47d3ee5eaaa2aff5dbfad98ab89cb0c976ab121c 100644 (file)
@@ -31,9 +31,9 @@
 #include "mproc.h"
 #include "param.h"
 
-#include "../../kernel/const.h"
-#include "../../kernel/config.h"
-#include "../../kernel/proc.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/proc.h"
 
 #if ENABLE_SYSCALL_STATS
 EXTERN unsigned long calls_stats[NCALLS];
index 06bf30535b67da5408b38d016dd8914fd20ca114..ec7f8ab7d87e8cafa9651b0b585991ed33113a21 100644 (file)
@@ -29,7 +29,7 @@
 #include <assert.h>
 #include "mproc.h"
 #include "param.h"
-#include "../../kernel/proc.h"
+#include "kernel/proc.h"
 
 PUBLIC struct utsname uts_val = {
   "Minix",             /* system name */
index 77e84a815e7fda3c9b5c74ed5a2e06aac97e7cea..15f8150c04275a0229f48c917c7abd5f82303eb9 100644 (file)
@@ -7,7 +7,7 @@
 #include <machine/archtypes.h>
 #include <lib.h>
 #include "mproc.h"
-#include "../../kernel/proc.h" /* for MIN_USER_Q */
+#include "kernel/proc.h" /* for MIN_USER_Q */
 
 PRIVATE timer_t sched_timer;
 
index 0825d4b086be11050c2af80a97df9ebbcb3e01a1..66ee1fac0a81d4540f85f94e88388215add57931 100644 (file)
 #include <timers.h>
 #include <string.h>
 #include <machine/archtypes.h>
-#include "../../kernel/const.h"
-#include "../../kernel/config.h"
-#include "../../kernel/type.h"
-#include "../../kernel/proc.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/type.h"
+#include "kernel/proc.h"
 
 #define munmap _munmap
 #define munmap_text _munmap_text
index 841692f93000d95e5c9beffd11c4d290a022888f..635ed9f5af017f670a9c19f52915b49d63200baa 100644 (file)
@@ -12,6 +12,8 @@ MAN=
 BINDIR?= /usr/sbin
 INSTALLFLAGS+= -S 850k
 
+CPPFLAGS=      -I${MINIXSRCDIR}
+
 SUBDIR= service
 
 .include <minix.prog.mk>
index 5c8e9d858a0979f706754e2403c24961ffbe20fd..4bf15e4e62953fec8ebf1f6174a4aba064435eac 100644 (file)
@@ -38,8 +38,8 @@
 
 #include <machine/archtypes.h>
 #include <timers.h>                            /* For priv.h */
-#include "../../kernel/priv.h"
-#include "../../kernel/ipc.h"
+#include "kernel/priv.h"
+#include "kernel/ipc.h"
 
 #include <stdlib.h>
 #include <stdio.h>
index 3630b338d459a010f29b4a0dd935a2bd66b890ac..69a9dff53b5d28e855ce80bff11162eed2e08a9a 100644 (file)
@@ -12,9 +12,9 @@
 #include <fcntl.h>
 #include <a.out.h>
 #include <minix/crtso.h>
-#include "../../kernel/const.h"
-#include "../../kernel/type.h"
-#include "../../kernel/proc.h"
+#include "kernel/const.h"
+#include "kernel/type.h"
+#include "kernel/proc.h"
 #include "../pm/mproc.h"
 
 /* Declare some local functions. */
index 53948027865d556a153fec383568061ad812197b..9604fec2c711d2684b49d4f23fff7c779ddde9f3 100644 (file)
@@ -5,9 +5,9 @@
  */
 
 #include "inc.h"
-#include "../../kernel/const.h"
-#include "../../kernel/type.h"
-#include "../../kernel/proc.h"
+#include "kernel/const.h"
+#include "kernel/type.h"
+#include "kernel/proc.h"
 
 EXTERN char *_brksize;
 
index 587d92d6dfd4e8d7dd6aad47d76892a66efade6f..e6e435b804468ce34f065cbcc1682824bbb11b7d 100644 (file)
@@ -6,10 +6,6 @@ SRCS=  main.c alloc.c utility.c exec.c exit.c fork.c break.c \
        signal.c mmap.c slaballoc.c region.c pagefaults.c addravl.c \
        physravl.c rs.c queryexit.c map_mem.c
 
-#Arch-specific sources
-.PATH: ${.CURDIR}/arch/${ARCH}
-SRCS+= vm.c pagetable.c arch_pagefaults.c util.S
-
 DPADD+=        ${LIBSYS}
 LDADD+=        -lsys
 
@@ -18,5 +14,7 @@ MAN=
 BINDIR?= /usr/sbin
 
 CPPFLAGS+= -I${.CURDIR} -Iarch/${ARCH}
+CPPFLAGS+=     -I${MINIXSRCDIR}
 
+.include "arch/${ARCH}/Makefile.inc"
 .include <minix.prog.mk>
diff --git a/servers/vm/arch/i386/Makefile.inc b/servers/vm/arch/i386/Makefile.inc
new file mode 100644 (file)
index 0000000..c047ac5
--- /dev/null
@@ -0,0 +1,5 @@
+.include <minix.own.mk>
+
+#Arch-specific sources
+.PATH: ${.CURDIR}/arch/${ARCH}
+SRCS+= vm.c pagetable.c arch_pagefaults.c util.S
index 2ee3b0491fd3d6bccc8737f3a747907d3fb0ee6d..e3c312af50d8083366c9bd7f4bd86c9ec89deade 100644 (file)
@@ -37,9 +37,9 @@
 extern int missing_spares;
 
 #include <machine/archtypes.h>
-#include "../../kernel/const.h"
-#include "../../kernel/config.h" 
-#include "../../kernel/proc.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/proc.h"
 
 #include <signal.h>
 
index 13a4f23271d55f1f8b134217d4afdd523e525e3a..ef98da8ce841e7a51522cee4ba6da6c952963d99 100644 (file)
@@ -33,7 +33,7 @@
        incheck = 0;            \
        } 
 
-#include "../../kernel/proc.h"
+#include "kernel/proc.h"
 
 #define USE(obj, code) do {            \
        slabunlock(obj, sizeof(*obj));  \
index a4bbb8d0f1aa92640aaa0562b6ee5f132c48aaa0..dfe77c264fa0fece9259f449c85a4fa65553e3dc 100644 (file)
 #include "util.h"
 
 #include <machine/archtypes.h>
-#include "../../kernel/const.h"
-#include "../../kernel/config.h"
-#include "../../kernel/type.h"
-#include "../../kernel/proc.h"
+#include "kernel/const.h"
+#include "kernel/config.h"
+#include "kernel/type.h"
+#include "kernel/proc.h"
 
 /*===========================================================================*
  *                              get_mem_map                                  *