Use <bsd.klinks.mk> to create symlinks to MD system header directories.

This commit is contained in:
tsutsui 2009-03-15 06:04:02 +00:00
parent 7f79f861d8
commit 2ba9ae83e1
5 changed files with 12 additions and 62 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.buildboot,v 1.27 2008/07/16 13:44:51 tsutsui Exp $
# $NetBSD: Makefile.buildboot,v 1.28 2009/03/15 06:10:03 tsutsui Exp $
# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
RELOC= FFF00000
@ -62,7 +62,7 @@ DRIVERSOURCE= apci.c ct.c dca.c dcm.c dnkbd.c fhpib.c hil.c \
nhpib.c rd.c scsi.c sd.c
.include <bsd.own.mk>
.include <bsd.klinks.mk>
.include <bsd.prog.mk>
### find out what to use for libkern

View File

@ -1,22 +1,7 @@
# $NetBSD: Makefile.inc,v 1.15 2008/06/24 13:02:25 matt Exp $
# $NetBSD: Makefile.inc,v 1.16 2009/03/15 06:10:03 tsutsui Exp $
BINDIR= /usr/mdec
release:
S?= ${.CURDIR}/../../../..
.PHONY: machine-links
beforedepend: machine-links
# ${MACHINE} then ${MACHINE_ARCH}
machine-links:
-rm -f machine && \
ln -s $S/arch/hp300/include machine
-rm -f hp300 && \
ln -s $S/arch/hp300/include hp300
-rm -f m68k && \
ln -s $S/arch/m68k/include m68k
CLEANFILES+=machine hp300 m68k
realall: machine-links .WAIT ${PROG}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.25 2008/01/11 09:26:26 tsutsui Exp $
# $NetBSD: Makefile,v 1.26 2009/03/15 06:04:02 tsutsui Exp $
NOMAN= # defined
@ -27,28 +27,16 @@ CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S}
CPPFLAGS+= -D__daddr_t=int32_t
AFLAGS= -D_LOCORE
CLEANFILES+= ${PROG}.sym machine m68k
CLEANFILES+= ${PROG}.sym
L= ${COMMONOBJ}/lib
LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
.if !make(obj) && !make(clean) && !make(cleandir)
.NOPATH: machine m68k
.BEGIN: machine m68k
machine::
-rm -f $@
ln -s ${S}/arch/${MACHINE}/include $@
m68k::
-rm -f $@
ln -s ${S}/arch/m68k/include $@
.endif
${PROG}: ${OBJS} ${LIBS}
${_MKTARGET_LINK}
${LD} ${LINKFLAGS} -o ${.TARGET}.sym ${OBJS} ${LIBS}
-${SIZE} ${.TARGET}.sym
${OBJCOPY} -O binary ${.TARGET}.sym ${.TARGET}
.include <bsd.klinks.mk>
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.18 2008/01/11 09:26:26 tsutsui Exp $
# $NetBSD: Makefile,v 1.19 2009/03/15 06:04:02 tsutsui Exp $
NOMAN= # defined
@ -29,28 +29,16 @@ CPPFLAGS+= -D_STANDALONE # -DBOOTXX_DEBUG
CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S}
AFLAGS= -D_LOCORE
CLEANFILES+= machine m68k ${PROG}.sym
CLEANFILES+= ${PROG}.sym
L= ${COMMONOBJ}/lib
LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine m68k
.NOPATH: machine m68k
machine::
-rm -f $@
ln -s ${S}/arch/${MACHINE}/include $@
m68k::
-rm -f $@
ln -s ${S}/arch/m68k/include $@
.endif
${PROG}: ${OBJS} ${LIBS}
${_MKTARGET_LINK}
${LD} ${LINKFLAGS} -o ${.TARGET}.sym ${OBJS} ${LIBS}
${SIZE} ${.TARGET}.sym
${OBJCOPY} -O binary ${.TARGET}.sym ${.TARGET}
.include <bsd.klinks.mk>
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2009/01/12 06:50:31 tsutsui Exp $
# $NetBSD: Makefile,v 1.11 2009/03/15 06:04:02 tsutsui Exp $
S= ${.CURDIR}/../../../..
@ -13,18 +13,7 @@ CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} -I.
CPPFLAGS+= -D__daddr_t=int32_t
AFLAGS= -D_LOCORE
CLEANFILES+= machine m68k
.if !make(obj) && !make(clean) && !make(cleandir)
.PHONY: machine-links
beforedepend: machine-links
machine-links:
-rm -f machine
ln -s ${S}/arch/${MACHINE}/include machine
-rm -f ${MACHINE_ARCH}
ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
.endif
.include <bsd.klinks.mk>
.include <bsd.prog.mk>
### find out what to use for libkern
@ -45,7 +34,7 @@ LIBSA= ${SALIB}
LIBS= ${LIBSA} ${LIBZ} ${LIBKERN}
realall: machine-links ${LIBS}
realall: ${LIBS}
cleandir distclean: cleanlibdir