diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-02-17 19:51:31 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-02-17 19:51:31 +0000 |
commit | f73311f5c118a9972c5e8f88d901e2b0b7e9350b (patch) | |
tree | ea93b961450c093d99f1c421674890039a050201 | |
parent | efb2a3bb49742ce700d6b9dbc0246aa86ed55366 (diff) |
Split boot/Makefile in case we need to build several boot.${VENDOR} compiled
from the same sources with different CFLAGS; the need for this has not arisen
yet but I fear it will hit the fan soon enough; no functional change in the
meantime.
-rw-r--r-- | sys/arch/loongson/stand/boot/Makefile | 42 | ||||
-rw-r--r-- | sys/arch/loongson/stand/boot/Makefile.inc | 42 |
2 files changed, 44 insertions, 40 deletions
diff --git a/sys/arch/loongson/stand/boot/Makefile b/sys/arch/loongson/stand/boot/Makefile index 0fec43e523f..0dbc764a1d6 100644 --- a/sys/arch/loongson/stand/boot/Makefile +++ b/sys/arch/loongson/stand/boot/Makefile @@ -1,49 +1,11 @@ -# $OpenBSD: Makefile,v 1.1 2010/02/14 22:39:33 miod Exp $ - -.include "${.CURDIR}/../Makefile.inc" +# $OpenBSD: Makefile,v 1.2 2010/02/17 19:51:30 miod Exp $ NOMAN= #MAN= boot.8 #MLINKS= boot.8 boot.conf.5 - .if ${MACHINE} == "loongson" PROG= boot - -S= ${.CURDIR}/../../../.. - -CPPFLAGS+= ${SAABI} -mno-abicalls -D_NO_ABICALLS \ - -nostdinc -D__loongson__ \ - -I${S} -I${S}/lib/libsa \ - -I${.OBJDIR} -I${.CURDIR} - -LDSCRIPT= ${.CURDIR}/ld.script -LDFLAGS+= ${SALDFLAGS} -T ${LDSCRIPT} -e __start - -AFLAGS+= ${SAABI} - -SRCS= start.S -SRCS+= conf.c cons.c dev.c devopen.c exec.c machdep.c -.PATH: ${S}/arch/loongson/loongson -SRCS+= pmon.c pmon32.S - -#### MI boot code -.PATH: ${S}/stand/boot -SRCS+= boot.c cmd.c vars.c - -#### libkern -.PATH: ${S}/lib/libkern/arch/mips64 ${S}/lib/libkern -SRCS+= strlcat.c strlcpy.c strlen.c -SRCS+= udivdi3.c qdivrem.c - -.if !make(obj) -.BEGIN: - @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) - @([ -h mips64 ] || ln -s ${.CURDIR}/../../../mips64/include mips64) -CLEANFILES+= machine mips64 -.endif - -${PROG}: ${OBJS} ${LIBSA} - ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} -L${LIBSADIR} ${LIBSA} +.include "${.CURDIR}/../boot/Makefile.inc" .else NOPROG= .endif diff --git a/sys/arch/loongson/stand/boot/Makefile.inc b/sys/arch/loongson/stand/boot/Makefile.inc new file mode 100644 index 00000000000..751bf25a1df --- /dev/null +++ b/sys/arch/loongson/stand/boot/Makefile.inc @@ -0,0 +1,42 @@ +# $OpenBSD: Makefile.inc,v 1.1 2010/02/17 19:51:30 miod Exp $ + +.include "${.CURDIR}/../Makefile.inc" + +NOMAN= +S= ${.CURDIR}/../../../.. +BOOTDIR= ${S}/arch/loongson/stand/boot + +CPPFLAGS+= ${SAABI} -mno-abicalls -D_NO_ABICALLS \ + -nostdinc -D__loongson__ \ + -I${S} -I${S}/lib/libsa \ + -I${.OBJDIR} -I${BOOTDIR} + +LDSCRIPT= ${.CURDIR}/ld.script +LDFLAGS+= ${SALDFLAGS} -T ${LDSCRIPT} -e __start + +AFLAGS+= ${SAABI} + +.PATH: ${BOOTDIR} +SRCS= start.S +SRCS+= conf.c cons.c dev.c devopen.c exec.c machdep.c +.PATH: ${S}/arch/loongson/loongson +SRCS+= pmon.c pmon32.S + +#### MI boot code +.PATH: ${S}/stand/boot +SRCS+= boot.c cmd.c vars.c + +#### libkern +.PATH: ${S}/lib/libkern/arch/mips64 ${S}/lib/libkern +SRCS+= strlcat.c strlcpy.c strlen.c +SRCS+= udivdi3.c qdivrem.c + +.if !make(obj) +.BEGIN: + @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) + @([ -h mips64 ] || ln -s ${.CURDIR}/../../../mips64/include mips64) +CLEANFILES+= machine mips64 +.endif + +${PROG}: ${OBJS} ${LIBSA} + ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} -L${LIBSADIR} ${LIBSA} |