Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/bioscall PR/14946: Rafal Boni: Make this work ...



details:   https://anonhg.NetBSD.org/src/rev/074b260fb0f4
branches:  trunk
changeset: 519293:074b260fb0f4
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 14 20:32:23 2001 +0000

description:
PR/14946: Rafal Boni: Make this work again.
Notes:
    - I added bsd.obj.mk and made it work with objdirs.
    - I added an entry point to the linker to fix a warning.
    - I made the backup of biostramp.inc silent.
    - I added missing clean targets.

This needs to be tested further.

diffstat:

 sys/arch/i386/bioscall/Makefile |  23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diffs (59 lines):

diff -r a544090a8fda -r 074b260fb0f4 sys/arch/i386/bioscall/Makefile
--- a/sys/arch/i386/bioscall/Makefile   Fri Dec 14 20:30:10 2001 +0000
+++ b/sys/arch/i386/bioscall/Makefile   Fri Dec 14 20:32:23 2001 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile,v 1.11 2001/09/22 03:34:19 tv Exp $
+#      $NetBSD: Makefile,v 1.12 2001/12/14 20:32:23 christos Exp $
 
 CPPFLAGS=      ${APMCPPFLAGS}
 KSRC=${.CURDIR}/../../..
 ARCHSRC=${.CURDIR}/../..
 I386=${KSRC}/arch/i386
-CFLAGS+= -I${ARCHSRC} -I${KSRC} -D_LKM
+CPPFLAGS+=-I${ARCHSRC} -I${KSRC} -I${.CURDIR} -I${.OBJDIR} -D_LKM
 
 SRCS=  biostramp.S
 OBJS=  biostramp.o
@@ -14,9 +14,12 @@
 all: biostramp.inc
 
 biostramp.inc: biostramp.bin Makefile
-       -mv -f biostramp.inc biostramp.inc.bak
+       @([ -f biostramp.inc ] && mv -f biostramp.inc biostramp.inc.bak; exit 0)
        sh ${.CURDIR}/bin2asm.sh biostramp.bin > biostramp.inc
 
+machine:
+       @rm -f machine && ln -s ${I386}/include machine
+
 .include <bsd.own.mk>
 
 .if ${OBJECT_FMT} == "ELF"
@@ -35,20 +38,22 @@
 .endif
 
 biostramp.obj: ${OBJS} ${DEPS}
-       ${LD} -Bstatic -N -Ttext 0 -o $@ $(OBJS)
+       ${LD} -Bstatic -N -Ttext 0 -e do_bios_call -o $@ $(OBJS)
 
-assym.h: ${KSRC}/kern/genassym.sh genassym.cf
+assym.h: machine ${KSRC}/kern/genassym.sh genassym.cf
        sh ${KSRC}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
-           < genassym.cf > assym.h.tmp && \
+           < ${.CURDIR}/genassym.cf > assym.h.tmp && \
        mv -f assym.h.tmp assym.h
 
 biostramp.S: assym.h
+
 biostramp.o: biostramp.S
-       ${CC} ${CFLAGS} -DASM -D_LOCORE -c biostramp.S
+       ${CC} ${CPPFLAGS} -DASM -D_LOCORE -c ${.IMPSRC}
 
 clean:
-       rm -f *.o biostramp.bin biostramp.sym biostramp.inc assym.h
+       rm -f *.o biostramp.obj biostramp.bin biostramp.sym biostramp.inc \
+           assym.h biostramp.inc.bak machine
 
 .include <bsd.dep.mk>
 .include <bsd.subdir.mk>
-#.include <bsd.prog.mk>
+.include <bsd.obj.mk>



Home | Main Index | Thread Index | Old Index