Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/newsmips/stand Move common objects and libraries to...



details:   https://anonhg.NetBSD.org/src/rev/890474f89b53
branches:  trunk
changeset: 479658:890474f89b53
user:      tsubai <tsubai%NetBSD.org@localhost>
date:      Fri Dec 17 07:40:09 1999 +0000

description:
Move common objects and libraries to common/.

diffstat:

 sys/arch/newsmips/stand/Makefile        |   4 +-
 sys/arch/newsmips/stand/boot/Makefile   |  48 +++++++++-----------------------
 sys/arch/newsmips/stand/bootxx/Makefile |  15 ++++++----
 sys/arch/newsmips/stand/common/Makefile |  37 +++++++++++++++++++++++++
 4 files changed, 62 insertions(+), 42 deletions(-)

diffs (161 lines):

diff -r a0a7c36429c1 -r 890474f89b53 sys/arch/newsmips/stand/Makefile
--- a/sys/arch/newsmips/stand/Makefile  Fri Dec 17 07:33:21 1999 +0000
+++ b/sys/arch/newsmips/stand/Makefile  Fri Dec 17 07:40:09 1999 +0000
@@ -1,5 +1,5 @@
-#      $NetBSD: Makefile,v 1.1 1999/07/08 11:48:03 tsubai Exp $
+#      $NetBSD: Makefile,v 1.2 1999/12/17 07:40:09 tsubai Exp $
 
-SUBDIR= boot bootxx installboot
+SUBDIR= common boot bootxx installboot
 
 .include <bsd.subdir.mk>
diff -r a0a7c36429c1 -r 890474f89b53 sys/arch/newsmips/stand/boot/Makefile
--- a/sys/arch/newsmips/stand/boot/Makefile     Fri Dec 17 07:33:21 1999 +0000
+++ b/sys/arch/newsmips/stand/boot/Makefile     Fri Dec 17 07:40:09 1999 +0000
@@ -1,11 +1,9 @@
-#      $NetBSD: Makefile,v 1.1 1999/07/08 11:48:05 tsubai Exp $
-
-.PATH: ../bootxx
+#      $NetBSD: Makefile,v 1.2 1999/12/17 07:40:10 tsubai Exp $
 
 S= ${.CURDIR}/../../../..
 
 PROG= boot
-SRCS= locore.S romcalls.S boot.c devopen.c
+SRCS= locore.S boot.c devopen.c
 MKMAN= no
 STRIPFLAG=
 BINMODE= 444
@@ -14,45 +12,27 @@
 SIZE?= size
 STRIP?= strip
 
+COMMON!=  cd ${.CURDIR}/../common && ${MAKE} print-objdir
+
 CLEANFILES+= ${PROG}.elf ${PROG}.tmp
-CLEANFILES+= ${.OBJDIR}/machine ${.OBJDIR}/mips
 
-LDFLAGS= -x -N -Ttext a0700000
+LDFLAGS= -x -N -Ttext a0700000 -e _start
 CFLAGS= -Os -G 0 -mno-abicalls -Wall
 
 CPPFLAGS+= -D_STANDALONE #-DBOOT_DEBUG
-CPPFLAGS+= -I. -I../../../..
+CPPFLAGS+= -I${COMMON} -I${S}
 
 AFLAGS= -D_LOCORE
 
-### find out what to use for libkern
-#KERNDST= ${.OBJDIR}/../lib/kern
-KERN_AS= library
-.include "${S}/lib/libkern/Makefile.inc"
-LIBKERN= ${KERNLIB}
-
-### find out what to use for libz
-#ZDST= ${.OBJDIR}/../lib/z
-Z_AS= library
-.include "${S}/lib/libz/Makefile.inc"
-LIBZ= ${ZLIB}
+LIBS = ${COMMON}/romcalls.o
+LIBS+= ${COMMON}/lib/sa/libsa.a
+LIBS+= ${COMMON}/lib/z/libz.a
+LIBS+= ${COMMON}/lib/kern/libkern.a
 
-### find out what to use for libsa
-#SADST= ${.OBJDIR}/../lib/sa
-SA_AS= library
-SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
-.include "${S}/lib/libsa/Makefile.inc"
-LIBSA= ${SALIB}
-
-.BEGIN:
-       @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
-       @[ -h mips ] || ln -s ${S}/arch/mips/include mips
-
-${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
-       ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
-       -${SIZE} ${PROG}
-       cp ${PROG} ${PROG}.elf
-       ${STRIP} ${PROG}
+${PROG}: ${OBJS}
+       ${LD} ${LDFLAGS} -o ${PROG}.elf ${OBJS} ${LIBS}
+       -${SIZE} ${PROG}.elf
+       ${STRIP} ${PROG}.elf -o ${PROG}
        tail -c +177 ${PROG} > ${PROG}.tmp
        mv ${PROG}.tmp ${PROG}
 #      ${OBJCOPY} -O binary ${PROG}.elf ${PROG}        # XXX
diff -r a0a7c36429c1 -r 890474f89b53 sys/arch/newsmips/stand/bootxx/Makefile
--- a/sys/arch/newsmips/stand/bootxx/Makefile   Fri Dec 17 07:33:21 1999 +0000
+++ b/sys/arch/newsmips/stand/bootxx/Makefile   Fri Dec 17 07:40:09 1999 +0000
@@ -1,21 +1,24 @@
-#      $NetBSD: Makefile,v 1.1 1999/07/08 11:48:06 tsubai Exp $
+#      $NetBSD: Makefile,v 1.2 1999/12/17 07:40:10 tsubai Exp $
 
 PROG= bootxx
-SRCS= start.S romcalls.S bootxx.c
+SRCS= start.S bootxx.c
 MKMAN= no
 STRIPFLAG=
 BINMODE= 444
 SIZE?= size
 
-LDFLAGS= -x -N -Ttext a0000000
+COMMON!=  cd ${.CURDIR}/../common && ${MAKE} print-objdir
+
+LDFLAGS= -x -N -Ttext a0000000 -e _start
 CFLAGS= -Os -mno-abicalls -G 0 -Wall
 
 CPPFLAGS+= -D_STANDALONE #-DBOOTXX_DEBUG
-CPPFLAGS+= -I../../../..
+CPPFLAGS+= -I${COMMON} -I${.CURDIR}/../../../..
+
 AFLAGS= -D_LOCORE
 
-L= ../boot/lib
-LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a
+LIBS=  ${COMMON}/romcalls.o
+LIBS+= ${COMMON}/lib/sa/libsa.a ${COMMON}/lib/kern/libkern.a
 
 ${PROG}: ${OBJS}
        ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
diff -r a0a7c36429c1 -r 890474f89b53 sys/arch/newsmips/stand/common/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/newsmips/stand/common/Makefile   Fri Dec 17 07:40:09 1999 +0000
@@ -0,0 +1,37 @@
+#      $NetBSD: Makefile,v 1.1 1999/12/17 07:40:11 tsubai Exp $
+
+S= ${.CURDIR}/../../../..
+
+OBJS= romcalls.o
+
+CLEANFILES+= machine mips
+
+CFLAGS= -Os -G 0 -mno-abicalls -Wall
+
+CPPFLAGS+= -D_STANDALONE #-DBOOT_DEBUG
+CPPFLAGS+= -I. -I${S}
+
+AFLAGS= -D_LOCORE
+
+### find out what to use for libkern
+.include "${S}/lib/libkern/Makefile.inc"
+
+### find out what to use for libz
+.include "${S}/lib/libz/Makefile.inc"
+
+### find out what to use for libsa
+SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
+.include "${S}/lib/libsa/Makefile.inc"
+
+.if !make(obj) && !make(clean)
+.BEGIN:
+       @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
+       @[ -h mips ] || ln -s ${S}/arch/mips/include mips
+.endif
+
+all: ${OBJS} ${KERNLIB} ${ZLIB} ${SALIB}
+#      ln -s ${KERNLIB}
+#      ln -s ${ZLIB}
+#      ln -s ${SALIB}
+
+.include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index