From: Arun Thomas Date: Thu, 1 Apr 2010 22:22:33 +0000 (+0000) Subject: Convert kernel over to bsdmake X-Git-Tag: v3.1.7~181 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=4ed3a0cf3a0f43e43170dfe6525bd44e5a0142e5;p=minix.git Convert kernel over to bsdmake --- diff --git a/Makefile b/Makefile index a036544b5..9e407d91c 100644 --- 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) $@ diff --git a/drivers/memory/memory_driver/Makefile b/drivers/memory/memory_driver/Makefile index b14925465..e31fd4e52 100644 --- a/drivers/memory/memory_driver/Makefile +++ b/drivers/memory/memory_driver/Makefile @@ -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 .include diff --git a/drivers/memory/memory_driver/memory.c b/drivers/memory/memory_driver/memory.c index 92c4822ee..513af8cc1 100644 --- a/drivers/memory/memory_driver/memory.c +++ b/drivers/memory/memory_driver/memory.c @@ -21,9 +21,9 @@ #include #include #include -#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 diff --git a/drivers/orinoco/Makefile b/drivers/orinoco/Makefile index 3833e819a..54fd98b7f 100644 --- a/drivers/orinoco/Makefile +++ b/drivers/orinoco/Makefile @@ -9,4 +9,6 @@ MAN= BINDIR?= /usr/sbin +CPPFLAGS.orinoco.c+= -I${MINIXSRCDIR} + .include diff --git a/drivers/orinoco/orinoco.c b/drivers/orinoco/orinoco.c index 3d0f44bbe..c0394df41 100644 --- a/drivers/orinoco/orinoco.c +++ b/drivers/orinoco/orinoco.c @@ -62,9 +62,9 @@ #include #include #include -#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 */ diff --git a/drivers/random/Makefile b/drivers/random/Makefile index 6287c5878..a6f474146 100644 --- a/drivers/random/Makefile +++ b/drivers/random/Makefile @@ -11,5 +11,7 @@ MAN= BINDIR?= /usr/sbin +CPPFLAGS.random.c+= -I${MINIXSRCDIR} + .include diff --git a/drivers/random/random.c b/drivers/random/random.c index bab0d3307..9e74ea4f7 100644 --- a/drivers/random/random.c +++ b/drivers/random/random.c @@ -8,7 +8,7 @@ that data into a seed for a psuedo random number generator. */ #include -#include "../../kernel/const.h" +#include "kernel/const.h" #include "assert.h" #include "random.h" diff --git a/drivers/rtl8139/Makefile b/drivers/rtl8139/Makefile index b83e12dc6..0eb6dd3a9 100644 --- a/drivers/rtl8139/Makefile +++ b/drivers/rtl8139/Makefile @@ -9,4 +9,6 @@ MAN= BINDIR?= /usr/sbin +CPPFLAGS+= -I${MINIXSRCDIR} + .include diff --git a/drivers/rtl8139/rtl8139.h b/drivers/rtl8139/rtl8139.h index c8a299a89..4ad1543aa 100644 --- a/drivers/rtl8139/rtl8139.h +++ b/drivers/rtl8139/rtl8139.h @@ -28,9 +28,9 @@ Created: Aug 2003 by Philip Homburg #include #include #include -#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 diff --git a/drivers/rtl8169/Makefile b/drivers/rtl8169/Makefile index dc1a68361..6174e3a83 100644 --- a/drivers/rtl8169/Makefile +++ b/drivers/rtl8169/Makefile @@ -9,4 +9,6 @@ MAN= BINDIR?= /usr/sbin +CPPFLAGS+= -I${MINIXSRCDIR} + .include diff --git a/drivers/rtl8169/rtl8169.c b/drivers/rtl8169/rtl8169.c index 0c537841e..0db59fed5 100644 --- a/drivers/rtl8169/rtl8169.c +++ b/drivers/rtl8169/rtl8169.c @@ -26,9 +26,9 @@ #include #include #include -#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) diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile index 468c7eefb..78ebca49e 100644 --- a/drivers/tty/Makefile +++ b/drivers/tty/Makefile @@ -15,7 +15,7 @@ BINDIR?= /sbin SUBDIR= keymaps # Needs kernel/const.h, etc -CPPFLAGS+= -I ../.. +CPPFLAGS+= -I${MINIXSRCDIR} .include .include diff --git a/drivers/tty/keyboard.c b/drivers/tty/keyboard.c index bdf2e40d5..56295cdf7 100644 --- a/drivers/tty/keyboard.c +++ b/drivers/tty/keyboard.c @@ -19,10 +19,10 @@ #include #include #include "tty.h" -#include -#include -#include -#include +#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" diff --git a/etc/mk/minix.own.mk b/etc/mk/minix.own.mk index 642ff0940..ed303a869 100644 --- a/etc/mk/minix.own.mk +++ b/etc/mk/minix.own.mk @@ -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, diff --git a/kernel/Makefile b/kernel/Makefile index 55f4094d4..44093da0f 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,52 +1,28 @@ # Makefile for kernel +.include -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 diff --git a/kernel/arch/i386/Makefile b/kernel/arch/i386/Makefile deleted file mode 100644 index d4a10b566..000000000 --- a/kernel/arch/i386/Makefile +++ /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 index 000000000..5f4a96aa0 --- /dev/null +++ b/kernel/arch/i386/Makefile.inc @@ -0,0 +1,21 @@ +# Makefile for arch-dependent kernel code +.include + +.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 diff --git a/kernel/arch/i386/apic.c b/kernel/arch/i386/apic.c index 808572a92..bc9233f01 100644 --- a/kernel/arch/i386/apic.c +++ b/kernel/arch/i386/apic.c @@ -1,26 +1,26 @@ /* * APIC handling routines. APIC is a requirement for SMP */ -#include "../../kernel.h" +#include "kernel/kernel.h" #include #include #include -#include "../../proc.h" -#include "../..//glo.h" +#include "kernel/proc.h" +#include "kernel/glo.h" #include "proto.h" #include #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 diff --git a/kernel/arch/i386/apic.h b/kernel/arch/i386/apic.h index 4167390ac..96bf27aa1 100644 --- a/kernel/arch/i386/apic.h +++ b/kernel/arch/i386/apic.h @@ -90,7 +90,7 @@ #ifndef __ASSEMBLY__ -#include "../../kernel.h" +#include "kernel/kernel.h" EXTERN int ioapic_enabled; EXTERN vir_bytes lapic_addr; diff --git a/kernel/arch/i386/apic_asm.h b/kernel/arch/i386/apic_asm.h index f15160679..fdb3eb850 100644 --- a/kernel/arch/i386/apic_asm.h +++ b/kernel/arch/i386/apic_asm.h @@ -3,7 +3,7 @@ #ifndef __ASSEMBLY__ -#include "../../kernel.h" +#include "kernel/kernel.h" _PROTOTYPE( void apic_hwint00, (void) ); _PROTOTYPE( void apic_hwint01, (void) ); diff --git a/kernel/arch/i386/clock.c b/kernel/arch/i386/arch_clock.c similarity index 97% rename from kernel/arch/i386/clock.c rename to kernel/arch/i386/arch_clock.c index 09392c40b..9f1d66e08 100644 --- a/kernel/arch/i386/clock.c +++ b/kernel/arch/i386/arch_clock.c @@ -4,10 +4,10 @@ #include #include -#include "../../kernel.h" +#include "kernel/kernel.h" -#include "../../clock.h" -#include "../../proc.h" +#include "kernel/clock.h" +#include "kernel/proc.h" #include diff --git a/kernel/arch/i386/arch_do_vmctl.c b/kernel/arch/i386/arch_do_vmctl.c index d3b32a855..96ef1eaac 100644 --- a/kernel/arch/i386/arch_do_vmctl.c +++ b/kernel/arch/i386/arch_do_vmctl.c @@ -7,7 +7,7 @@ * SVMCTL_VALUE to this value */ -#include "../../system.h" +#include "kernel/system.h" #include #include "proto.h" diff --git a/kernel/arch/i386/system.c b/kernel/arch/i386/arch_system.c similarity index 99% rename from kernel/arch/i386/system.c rename to kernel/arch/i386/arch_system.c index d8d508509..91bc629a7 100644 --- a/kernel/arch/i386/system.c +++ b/kernel/arch/i386/arch_system.c @@ -1,6 +1,6 @@ /* system dependent functions for use inside the whole kernel. */ -#include "../../kernel.h" +#include "kernel/kernel.h" #include #include @@ -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" diff --git a/kernel/arch/i386/watchdog.c b/kernel/arch/i386/arch_watchdog.c similarity index 98% rename from kernel/arch/i386/watchdog.c rename to kernel/arch/i386/arch_watchdog.c index 41a876c20..9aaf4c7b3 100644 --- a/kernel/arch/i386/watchdog.c +++ b/kernel/arch/i386/arch_watchdog.c @@ -1,5 +1,5 @@ -#include "../../kernel.h" -#include "../../watchdog.h" +#include "kernel/kernel.h" +#include "kernel/watchdog.h" #include "proto.h" #include diff --git a/kernel/arch/i386/breakpoints.c b/kernel/arch/i386/breakpoints.c index eaf54ee5c..189cb26c3 100644 --- a/kernel/arch/i386/breakpoints.c +++ b/kernel/arch/i386/breakpoints.c @@ -1,4 +1,4 @@ -#include "../../kernel.h" +#include "kernel/kernel.h" #include "proto.h" #include "debugreg.h" diff --git a/kernel/arch/i386/do_int86.c b/kernel/arch/i386/do_int86.c index d8f4d830b..261875786 100644 --- a/kernel/arch/i386/do_int86.c +++ b/kernel/arch/i386/do_int86.c @@ -5,7 +5,7 @@ * m1_p1: INT86_REG86 */ -#include "../../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/arch/i386/do_iopenable.c b/kernel/arch/i386/do_iopenable.c index fdc762e5a..ae79c68b2 100644 --- a/kernel/arch/i386/do_iopenable.c +++ b/kernel/arch/i386/do_iopenable.c @@ -8,8 +8,8 @@ * Jorrit N. Herder */ -#include "../../system.h" -#include "../../kernel.h" +#include "kernel/system.h" +#include "kernel/kernel.h" #include #include "proto.h" diff --git a/kernel/arch/i386/do_readbios.c b/kernel/arch/i386/do_readbios.c index 0250326ab..552716be6 100644 --- a/kernel/arch/i386/do_readbios.c +++ b/kernel/arch/i386/do_readbios.c @@ -7,7 +7,7 @@ * m2_p1: RDB_BUF buffer address in requesting process */ -#include "../../system.h" +#include "kernel/system.h" #include /*===========================================================================* diff --git a/kernel/arch/i386/do_sdevio.c b/kernel/arch/i386/do_sdevio.c index 517d0651a..77e3d962d 100644 --- a/kernel/arch/i386/do_sdevio.c +++ b/kernel/arch/i386/do_sdevio.c @@ -10,7 +10,7 @@ * m2_i1: DIO_OFFSET (offset into the grant) */ -#include "../../system.h" +#include "kernel/system.h" #include #include diff --git a/kernel/arch/i386/exception.c b/kernel/arch/i386/exception.c index 541add43b..7267008a2 100644 --- a/kernel/arch/i386/exception.c +++ b/kernel/arch/i386/exception.c @@ -3,13 +3,13 @@ * a panic. */ -#include "../../kernel.h" +#include "kernel/kernel.h" #include "proto.h" #include #include #include -#include "../../proc.h" -#include "../../proto.h" +#include "kernel/proc.h" +#include "kernel/proto.h" extern int catch_pagefaults; diff --git a/kernel/arch/i386/i8259.c b/kernel/arch/i386/i8259.c index 4f99bed12..cc0bc419e 100644 --- a/kernel/arch/i386/i8259.c +++ b/kernel/arch/i386/i8259.c @@ -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 #include diff --git a/kernel/arch/i386/clock.h b/kernel/arch/i386/include/arch_clock.h similarity index 100% rename from kernel/arch/i386/clock.h rename to kernel/arch/i386/include/arch_clock.h diff --git a/kernel/arch/i386/watchdog.h b/kernel/arch/i386/include/arch_watchdog.h similarity index 93% rename from kernel/arch/i386/watchdog.h rename to kernel/arch/i386/include/arch_watchdog.h index 4d30ec537..c205094e1 100644 --- a/kernel/arch/i386/watchdog.h +++ b/kernel/arch/i386/include/arch_watchdog.h @@ -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; diff --git a/kernel/arch/i386/hw_intr.h b/kernel/arch/i386/include/hw_intr.h similarity index 92% rename from kernel/arch/i386/hw_intr.h rename to kernel/arch/i386/include/hw_intr.h index 1665b7818..6f70495c9 100644 --- a/kernel/arch/i386/hw_intr.h +++ b/kernel/arch/i386/include/hw_intr.h @@ -1,7 +1,7 @@ #ifndef __HW_INTR_X86_H__ #define __HW_INTR_X86_H__ -#include "../..//kernel.h" +#include "kernel/kernel.h" /* legacy PIC */ diff --git a/kernel/arch/i386/klib386.S b/kernel/arch/i386/klib.S similarity index 99% rename from kernel/arch/i386/klib386.S rename to kernel/arch/i386/klib.S index a4b09c005..446690fc1 100644 --- a/kernel/arch/i386/klib386.S +++ b/kernel/arch/i386/klib.S @@ -5,7 +5,7 @@ #include #include #include "archconst.h" -#include "../../const.h" +#include "kernel/const.h" #include "sconst.h" /* diff --git a/kernel/arch/i386/memory.c b/kernel/arch/i386/memory.c index b197091b9..c68b6bebb 100644 --- a/kernel/arch/i386/memory.c +++ b/kernel/arch/i386/memory.c @@ -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 @@ -16,14 +16,13 @@ #include #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 diff --git a/kernel/arch/i386/mpx386.S b/kernel/arch/i386/mpx.S similarity index 98% rename from kernel/arch/i386/mpx386.S rename to kernel/arch/i386/mpx.S index fd46183ca..4a98d84bf 100644 --- a/kernel/arch/i386/mpx386.S +++ b/kernel/arch/i386/mpx.S @@ -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 #include #include "archconst.h" -#include "../../const.h" -#include "../../proc.h" +#include "kernel/const.h" +#include "kernel/proc.h" #include "sconst.h" /* Selected 386 tss offsets. */ diff --git a/kernel/arch/i386/protect.c b/kernel/arch/i386/protect.c index 7681cae61..c009986e9 100644 --- a/kernel/arch/i386/protect.c +++ b/kernel/arch/i386/protect.c @@ -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" diff --git a/kernel/arch/i386/proto.h b/kernel/arch/i386/proto.h index 5e7c55f3d..ee25a003b 100644 --- a/kernel/arch/i386/proto.h +++ b/kernel/arch/i386/proto.h @@ -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 diff --git a/kernel/arch/i386/sconst.h b/kernel/arch/i386/sconst.h index c5d32752b..2a5e3b667 100644 --- a/kernel/arch/i386/sconst.h +++ b/kernel/arch/i386/sconst.h @@ -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. */ diff --git a/kernel/clock.h b/kernel/clock.h index b5936d315..b4ccab3d0 100644 --- a/kernel/clock.h +++ b/kernel/clock.h @@ -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)); diff --git a/kernel/interrupt.c b/kernel/interrupt.c index 6482d8e32..00d0310da 100644 --- a/kernel/interrupt.c +++ b/kernel/interrupt.c @@ -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 index a8183368c..000000000 --- a/kernel/system/Makefile +++ /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 index 000000000..5addba866 --- /dev/null +++ b/kernel/system/Makefile.inc @@ -0,0 +1,44 @@ +# Makefile for system library implementation +.include + +.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 diff --git a/kernel/system/do_abort.c b/kernel/system/do_abort.c index 60676515b..c38d4c6c5 100644 --- a/kernel/system/do_abort.c +++ b/kernel/system/do_abort.c @@ -8,7 +8,7 @@ * m1_p1: ABRT_MON_ADDR (virtual address of params) */ -#include "../system.h" +#include "kernel/system.h" #include #if USE_ABORT diff --git a/kernel/system/do_clear.c b/kernel/system/do_clear.c index 0e85a764d..58819aa5c 100644 --- a/kernel/system/do_clear.c +++ b/kernel/system/do_clear.c @@ -5,7 +5,7 @@ * m1_i1: PR_ENDPT (endpoint of process to clean up) */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_copy.c b/kernel/system/do_copy.c index d4a0816d9..736a65502 100644 --- a/kernel/system/do_copy.c +++ b/kernel/system/do_copy.c @@ -11,7 +11,7 @@ * m5_l3: CP_NR_BYTES number of bytes to copy */ -#include "../system.h" +#include "kernel/system.h" #include #if (USE_VIRCOPY || USE_PHYSCOPY) diff --git a/kernel/system/do_cprofile.c b/kernel/system/do_cprofile.c index 5b2c2661d..c01d39133 100644 --- a/kernel/system/do_cprofile.c +++ b/kernel/system/do_cprofile.c @@ -12,7 +12,7 @@ * 14 Aug, 2006 Created (Rogier Meurs) */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_devio.c b/kernel/system/do_devio.c index b26ad69d0..8828813a9 100644 --- a/kernel/system/do_devio.c +++ b/kernel/system/do_devio.c @@ -7,7 +7,7 @@ * m2_l2: DIO_VALUE (value to write/ return value read) */ -#include "../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/system/do_endksig.c b/kernel/system/do_endksig.c index cd1acaf62..4ee185d3e 100644 --- a/kernel/system/do_endksig.c +++ b/kernel/system/do_endksig.c @@ -5,7 +5,7 @@ * m2_i1: SIG_ENDPT # process for which PM is done */ -#include "../system.h" +#include "kernel/system.h" #if USE_ENDKSIG diff --git a/kernel/system/do_exec.c b/kernel/system/do_exec.c index ca0e976f5..0e9e473c9 100644 --- a/kernel/system/do_exec.c +++ b/kernel/system/do_exec.c @@ -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 #include diff --git a/kernel/system/do_exit.c b/kernel/system/do_exit.c index 2970a7eb5..b344017f9 100644 --- a/kernel/system/do_exit.c +++ b/kernel/system/do_exit.c @@ -2,7 +2,7 @@ * m_type: SYS_EXIT */ -#include "../system.h" +#include "kernel/system.h" #include #include diff --git a/kernel/system/do_fork.c b/kernel/system/do_fork.c index 1066473dd..d66f6fcde 100644 --- a/kernel/system/do_fork.c +++ b/kernel/system/do_fork.c @@ -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 #include #include diff --git a/kernel/system/do_getinfo.c b/kernel/system/do_getinfo.c index 5aa6cdf65..7d29fb9f3 100644 --- a/kernel/system/do_getinfo.c +++ b/kernel/system/do_getinfo.c @@ -12,7 +12,7 @@ #include #include -#include "../system.h" +#include "kernel/system.h" #if USE_GETINFO diff --git a/kernel/system/do_getksig.c b/kernel/system/do_getksig.c index 1416113db..c93cf7ab5 100644 --- a/kernel/system/do_getksig.c +++ b/kernel/system/do_getksig.c @@ -6,7 +6,7 @@ * m2_l1: SIG_MAP # bit map with pending signals */ -#include "../system.h" +#include "kernel/system.h" #include #include diff --git a/kernel/system/do_irqctl.c b/kernel/system/do_irqctl.c index 67d414802..2e14eedb3 100644 --- a/kernel/system/do_irqctl.c +++ b/kernel/system/do_irqctl.c @@ -9,7 +9,7 @@ * ,, ,, (returns index of irq hook assigned at kernel) */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_kill.c b/kernel/system/do_kill.c index c6ace6842..5e72f9689 100644 --- a/kernel/system/do_kill.c +++ b/kernel/system/do_kill.c @@ -6,7 +6,7 @@ * m2_i2: SIG_NUMBER # signal number to send to process */ -#include "../system.h" +#include "kernel/system.h" #include #if USE_KILL diff --git a/kernel/system/do_mcontext.c b/kernel/system/do_mcontext.c index 9dd322f80..0dd86b83d 100644 --- a/kernel/system/do_mcontext.c +++ b/kernel/system/do_mcontext.c @@ -8,7 +8,7 @@ * */ -#include "../system.h" +#include "kernel/system.h" #include #include diff --git a/kernel/system/do_memset.c b/kernel/system/do_memset.c index 8fcfae1de..dd8a06a51 100644 --- a/kernel/system/do_memset.c +++ b/kernel/system/do_memset.c @@ -7,7 +7,7 @@ * m2_l2: MEM_PATTERN (pattern byte to be written) */ -#include "../system.h" +#include "kernel/system.h" #if USE_MEMSET diff --git a/kernel/system/do_newmap.c b/kernel/system/do_newmap.c index 97f474b83..016a0f90f 100644 --- a/kernel/system/do_newmap.c +++ b/kernel/system/do_newmap.c @@ -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 #if USE_NEWMAP diff --git a/kernel/system/do_nice.c b/kernel/system/do_nice.c index 3fb29736a..72366e82e 100644 --- a/kernel/system/do_nice.c +++ b/kernel/system/do_nice.c @@ -6,7 +6,7 @@ * m1_i2: PR_PRIORITY the new priority */ -#include "../system.h" +#include "kernel/system.h" #include #if USE_NICE diff --git a/kernel/system/do_privctl.c b/kernel/system/do_privctl.c index 0fcdaba67..21544862d 100644 --- a/kernel/system/do_privctl.c +++ b/kernel/system/do_privctl.c @@ -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 #include #include diff --git a/kernel/system/do_profbuf.c b/kernel/system/do_profbuf.c index 3d77757f4..3600f26fc 100644 --- a/kernel/system/do_profbuf.c +++ b/kernel/system/do_profbuf.c @@ -9,7 +9,7 @@ * 14 Aug, 2006 Created (Rogier Meurs) */ -#include "../system.h" +#include "kernel/system.h" /*===========================================================================* * do_profbuf * diff --git a/kernel/system/do_runctl.c b/kernel/system/do_runctl.c index e1da8b5d8..f5b243f63 100644 --- a/kernel/system/do_runctl.c +++ b/kernel/system/do_runctl.c @@ -7,7 +7,7 @@ * m1_i3: RC_FLAGS request flags */ -#include "../system.h" +#include "kernel/system.h" #if USE_RUNCTL diff --git a/kernel/system/do_safecopy.c b/kernel/system/do_safecopy.c index 688ce223d..6cf85397a 100644 --- a/kernel/system/do_safecopy.c +++ b/kernel/system/do_safecopy.c @@ -17,7 +17,7 @@ #include #include -#include "../system.h" +#include "kernel/system.h" #define MAX_INDIRECT_DEPTH 5 /* up to how many indirect grants to follow? */ diff --git a/kernel/system/do_safemap.c b/kernel/system/do_safemap.c index 32dc2ebe9..33649b76e 100644 --- a/kernel/system/do_safemap.c +++ b/kernel/system/do_safemap.c @@ -17,7 +17,7 @@ #include #include -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_schedctl.c b/kernel/system/do_schedctl.c index 12029f5e4..592b7d4f2 100644 --- a/kernel/system/do_schedctl.c +++ b/kernel/system/do_schedctl.c @@ -1,4 +1,4 @@ -#include "../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/system/do_schedule.c b/kernel/system/do_schedule.c index 04421f423..f9c37e4db 100644 --- a/kernel/system/do_schedule.c +++ b/kernel/system/do_schedule.c @@ -1,4 +1,4 @@ -#include "../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/system/do_segctl.c b/kernel/system/do_segctl.c index ccf85bea2..d7fa2c80b 100644 --- a/kernel/system/do_segctl.c +++ b/kernel/system/do_segctl.c @@ -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 diff --git a/kernel/system/do_setalarm.c b/kernel/system/do_setalarm.c index 84f5f069a..bd2d2a35f 100644 --- a/kernel/system/do_setalarm.c +++ b/kernel/system/do_setalarm.c @@ -7,7 +7,7 @@ * m2_l1: ALRM_TIME_LEFT (return seconds left of previous) */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_setgrant.c b/kernel/system/do_setgrant.c index f2584323f..e7f6e76c9 100644 --- a/kernel/system/do_setgrant.c +++ b/kernel/system/do_setgrant.c @@ -6,7 +6,7 @@ * SG_SIZE number of entries */ -#include "../system.h" +#include "kernel/system.h" #include /*===========================================================================* diff --git a/kernel/system/do_sigreturn.c b/kernel/system/do_sigreturn.c index fe083635e..5224de2a6 100644 --- a/kernel/system/do_sigreturn.c +++ b/kernel/system/do_sigreturn.c @@ -7,7 +7,7 @@ * */ -#include "../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/system/do_sigsend.c b/kernel/system/do_sigsend.c index d728fcf61..53b872fe9 100644 --- a/kernel/system/do_sigsend.c +++ b/kernel/system/do_sigsend.c @@ -8,7 +8,7 @@ * */ -#include "../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/system/do_sprofile.c b/kernel/system/do_sprofile.c index 27646cb11..629ee1dff 100644 --- a/kernel/system/do_sprofile.c +++ b/kernel/system/do_sprofile.c @@ -13,7 +13,7 @@ * 14 Aug, 2006 Created (Rogier Meurs) */ -#include "../system.h" +#include "kernel/system.h" #if SPROFILE diff --git a/kernel/system/do_stime.c b/kernel/system/do_stime.c index 8b1194faa..2e73be8b5 100644 --- a/kernel/system/do_stime.c +++ b/kernel/system/do_stime.c @@ -5,7 +5,7 @@ * m4_l3: T_BOOTTIME */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_sysctl.c b/kernel/system/do_sysctl.c index 0bb925795..5866f3671 100644 --- a/kernel/system/do_sysctl.c +++ b/kernel/system/do_sysctl.c @@ -6,7 +6,7 @@ * and then request-specific arguments in SYSCTL_ARG1 and SYSCTL_ARG2. */ -#include "../system.h" +#include "kernel/system.h" /*===========================================================================* diff --git a/kernel/system/do_times.c b/kernel/system/do_times.c index 93284bb4c..dd6d7e4c4 100644 --- a/kernel/system/do_times.c +++ b/kernel/system/do_times.c @@ -9,7 +9,7 @@ * m4_l5: T_BOOT_TICKS */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_trace.c b/kernel/system/do_trace.c index fe10eb658..f27dc4e34 100644 --- a/kernel/system/do_trace.c +++ b/kernel/system/do_trace.c @@ -8,7 +8,7 @@ * m2_l2: CTL_DATA data to be written or returned here */ -#include "../system.h" +#include "kernel/system.h" #include #if USE_TRACE diff --git a/kernel/system/do_umap.c b/kernel/system/do_umap.c index 6a4d66a5a..c35934810 100644 --- a/kernel/system/do_umap.c +++ b/kernel/system/do_umap.c @@ -9,7 +9,7 @@ * m5_l3: CP_NR_BYTES (size of datastructure) */ -#include "../system.h" +#include "kernel/system.h" #include diff --git a/kernel/system/do_unused.c b/kernel/system/do_unused.c index d174699b6..155968ba5 100644 --- a/kernel/system/do_unused.c +++ b/kernel/system/do_unused.c @@ -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 * diff --git a/kernel/system/do_update.c b/kernel/system/do_update.c index f38f7205d..2e52ef460 100644 --- a/kernel/system/do_update.c +++ b/kernel/system/do_update.c @@ -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 #if USE_UPDATE diff --git a/kernel/system/do_vdevio.c b/kernel/system/do_vdevio.c index d4ca807ec..d3be18e67 100644 --- a/kernel/system/do_vdevio.c +++ b/kernel/system/do_vdevio.c @@ -7,7 +7,7 @@ * m2_i2: DIO_VEC_SIZE (number of ports to read or write) */ -#include "../system.h" +#include "kernel/system.h" #include #include #include diff --git a/kernel/system/do_vmctl.c b/kernel/system/do_vmctl.c index 5d091d402..b18cbde6e 100644 --- a/kernel/system/do_vmctl.c +++ b/kernel/system/do_vmctl.c @@ -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 #include diff --git a/kernel/system/do_vtimer.c b/kernel/system/do_vtimer.c index a85cf3b5a..d7cacf6e3 100644 --- a/kernel/system/do_vtimer.c +++ b/kernel/system/do_vtimer.c @@ -8,7 +8,7 @@ * m2_l2: VT_ENDPT (process to which the timer belongs) */ -#include "../system.h" +#include "kernel/system.h" #include #include diff --git a/kernel/watchdog.h b/kernel/watchdog.h index 9dd36ddc0..04cc0987b 100644 --- a/kernel/watchdog.h +++ b/kernel/watchdog.h @@ -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? */ diff --git a/servers/is/Makefile b/servers/is/Makefile index d6ce20a29..ee9a1ed89 100644 --- a/servers/is/Makefile +++ b/servers/is/Makefile @@ -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 diff --git a/servers/is/dmp_kernel.c b/servers/is/dmp_kernel.c index 3a370cdf8..aceb7778a 100644 --- a/servers/is/dmp_kernel.c +++ b/servers/is/dmp_kernel.c @@ -6,12 +6,12 @@ #include #include #include -#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 diff --git a/servers/is/dmp_rs.c b/servers/is/dmp_rs.c index 60e8ec317..70c94a478 100644 --- a/servers/is/dmp_rs.c +++ b/servers/is/dmp_rs.c @@ -10,7 +10,7 @@ #include "inc.h" #include #include -#include "../../kernel/priv.h" +#include "kernel/priv.h" #include "../rs/const.h" #include "../rs/type.h" diff --git a/servers/is/dmp_vm.c b/servers/is/dmp_vm.c index 47c742ff3..6cda9d5fb 100644 --- a/servers/is/dmp_vm.c +++ b/servers/is/dmp_vm.c @@ -4,7 +4,7 @@ #include #include #include -#include "../../kernel/proc.h" +#include "kernel/proc.h" #define LINES 24 diff --git a/servers/pm/Makefile b/servers/pm/Makefile index 33b8ba0ab..8f1eb5970 100644 --- a/servers/pm/Makefile +++ b/servers/pm/Makefile @@ -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 diff --git a/servers/pm/main.c b/servers/pm/main.c index 0a0212e2a..47d3ee5ea 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -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]; diff --git a/servers/pm/misc.c b/servers/pm/misc.c index 06bf30535..ec7f8ab7d 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -29,7 +29,7 @@ #include #include "mproc.h" #include "param.h" -#include "../../kernel/proc.h" +#include "kernel/proc.h" PUBLIC struct utsname uts_val = { "Minix", /* system name */ diff --git a/servers/pm/schedule.c b/servers/pm/schedule.c index 77e84a815..15f8150c0 100644 --- a/servers/pm/schedule.c +++ b/servers/pm/schedule.c @@ -7,7 +7,7 @@ #include #include #include "mproc.h" -#include "../../kernel/proc.h" /* for MIN_USER_Q */ +#include "kernel/proc.h" /* for MIN_USER_Q */ PRIVATE timer_t sched_timer; diff --git a/servers/pm/utility.c b/servers/pm/utility.c index 0825d4b08..66ee1fac0 100644 --- a/servers/pm/utility.c +++ b/servers/pm/utility.c @@ -23,10 +23,10 @@ #include #include #include -#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 diff --git a/servers/rs/Makefile b/servers/rs/Makefile index 841692f93..635ed9f5a 100644 --- a/servers/rs/Makefile +++ b/servers/rs/Makefile @@ -12,6 +12,8 @@ MAN= BINDIR?= /usr/sbin INSTALLFLAGS+= -S 850k +CPPFLAGS= -I${MINIXSRCDIR} + SUBDIR= service .include diff --git a/servers/rs/inc.h b/servers/rs/inc.h index 5c8e9d858..4bf15e4e6 100644 --- a/servers/rs/inc.h +++ b/servers/rs/inc.h @@ -38,8 +38,8 @@ #include #include /* For priv.h */ -#include "../../kernel/priv.h" -#include "../../kernel/ipc.h" +#include "kernel/priv.h" +#include "kernel/ipc.h" #include #include diff --git a/servers/rs/main.c b/servers/rs/main.c index 3630b338d..69a9dff53 100644 --- a/servers/rs/main.c +++ b/servers/rs/main.c @@ -12,9 +12,9 @@ #include #include #include -#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. */ diff --git a/servers/rs/memory.c b/servers/rs/memory.c index 539480278..9604fec2c 100644 --- a/servers/rs/memory.c +++ b/servers/rs/memory.c @@ -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; diff --git a/servers/vm/Makefile b/servers/vm/Makefile index 587d92d6d..e6e435b80 100644 --- a/servers/vm/Makefile +++ b/servers/vm/Makefile @@ -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 diff --git a/servers/vm/arch/i386/Makefile.inc b/servers/vm/arch/i386/Makefile.inc new file mode 100644 index 000000000..c047ac56d --- /dev/null +++ b/servers/vm/arch/i386/Makefile.inc @@ -0,0 +1,5 @@ +.include + +#Arch-specific sources +.PATH: ${.CURDIR}/arch/${ARCH} +SRCS+= vm.c pagetable.c arch_pagefaults.c util.S diff --git a/servers/vm/main.c b/servers/vm/main.c index 2ee3b0491..e3c312af5 100644 --- a/servers/vm/main.c +++ b/servers/vm/main.c @@ -37,9 +37,9 @@ extern int missing_spares; #include -#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 diff --git a/servers/vm/sanitycheck.h b/servers/vm/sanitycheck.h index 13a4f2327..ef98da8ce 100644 --- a/servers/vm/sanitycheck.h +++ b/servers/vm/sanitycheck.h @@ -33,7 +33,7 @@ incheck = 0; \ } -#include "../../kernel/proc.h" +#include "kernel/proc.h" #define USE(obj, code) do { \ slabunlock(obj, sizeof(*obj)); \ diff --git a/servers/vm/utility.c b/servers/vm/utility.c index a4bbb8d0f..dfe77c264 100644 --- a/servers/vm/utility.c +++ b/servers/vm/utility.c @@ -30,10 +30,10 @@ #include "util.h" #include -#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 *