Use <bsd.klinks.mk>
This commit is contained in:
parent
f71ef68b03
commit
61ef18cf91
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.12 2011/10/30 20:42:09 phx Exp $
|
||||
# $NetBSD: Makefile,v 1.13 2013/08/21 06:44:02 matt Exp $
|
||||
|
||||
S= ${.CURDIR}/../../../..
|
||||
|
||||
|
@ -19,6 +19,7 @@ CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S}
|
|||
DBG= -Os
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.klinks.mk>
|
||||
|
||||
# XXX SHOULD NOT NEED TO DEFINE THESE!
|
||||
LIBCRT0=
|
||||
|
@ -32,14 +33,6 @@ BINMODE= 444
|
|||
RELOC= 1000000
|
||||
ENTRY= _start
|
||||
|
||||
.if !make(obj) && !make(clean) && !make(cleandir)
|
||||
.BEGIN:
|
||||
@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
|
||||
@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
|
||||
.NOPATH: machine powerpc
|
||||
.endif
|
||||
CLEANFILES+= machine powerpc
|
||||
|
||||
### find out what to use for libkern
|
||||
KERN_AS= library
|
||||
.include "${S}/lib/libkern/Makefile.inc"
|
||||
|
@ -62,6 +55,7 @@ vers.c: version
|
|||
${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "sandpoint"
|
||||
|
||||
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
||||
${_MKTARGET_LINK}
|
||||
${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
|
||||
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
||||
${OBJCOPY} -S -O binary ${PROG} ${PROG}.bin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.13 2010/02/13 23:38:17 eeh Exp $
|
||||
# $NetBSD: Makefile,v 1.14 2013/08/21 06:41:52 matt Exp $
|
||||
|
||||
CURDIR= ${.CURDIR}
|
||||
S= ${CURDIR}/../../../..
|
||||
|
@ -10,7 +10,7 @@ S= ${CURDIR}/../../../..
|
|||
PROG= bootblk
|
||||
SRCS= bootblk.fth
|
||||
OBJS=
|
||||
CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp machine sparc \
|
||||
CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \
|
||||
bootblk bootblk.text bootblk.text.tmp
|
||||
|
||||
NOMAN= # defined
|
||||
|
@ -21,17 +21,6 @@ USE_GENASSYM?= no
|
|||
INCLUDES= -I. -I$S/arch -I$S -I${S}/../common/include -nostdinc
|
||||
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM -D_KERNEL
|
||||
|
||||
#all:: bootblk.text bootblk
|
||||
|
||||
#clean::
|
||||
# rm assym.fth.h bootblk.text machine bootblk
|
||||
|
||||
sparc:
|
||||
ln -s ${.CURDIR}/../../../sparc/include sparc
|
||||
|
||||
machine:
|
||||
ln -s ${.CURDIR}/../../../${MACHINE}/include machine
|
||||
|
||||
ffs.fth.h: genfth.cf machine sparc
|
||||
${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
|
||||
<${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \
|
||||
|
@ -61,4 +50,5 @@ fake: bootblk bootblk.text
|
|||
../fakeboot/fakeboot -elf32 <bootblk >/bootblk
|
||||
../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
|
||||
|
||||
.include <bsd.klinks.mk>
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.29 2011/05/21 15:50:42 tsutsui Exp $
|
||||
# $NetBSD: Makefile,v 1.30 2013/08/21 06:41:52 matt Exp $
|
||||
|
||||
CURDIR= ${.CURDIR}
|
||||
S= ${CURDIR}/../../../..
|
||||
|
@ -8,6 +8,7 @@ S= ${CURDIR}/../../../..
|
|||
#
|
||||
|
||||
WARNS?= 2
|
||||
KLINK_MACHINE= sparc64
|
||||
|
||||
PROG?= ofwboot
|
||||
SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c
|
||||
|
@ -78,21 +79,8 @@ SAMISCCPPFLAGS+= -DCOMPAT_SOLARIS_UFS
|
|||
.include "${S}/lib/libsa/Makefile.inc"
|
||||
LIBSA= ${SALIB}
|
||||
|
||||
.if !make(obj) && !make(clean) && !make(cleandir)
|
||||
.BEGIN:
|
||||
@([ -h machine ] || ln -s ${S}/arch/sparc64/include machine)
|
||||
@([ -h sparc64 ] || ln -s ${S}/arch/sparc64/include sparc64)
|
||||
@([ -h sparc ] || ln -s ${S}/arch/sparc/include sparc)
|
||||
.NOPATH: machine sparc64 sparc
|
||||
.endif
|
||||
CLEANFILES+= machine sparc64 sparc
|
||||
|
||||
cleandir distclean: .WAIT cleanlibdir
|
||||
|
||||
cleanlibdir:
|
||||
-rm -rf lib
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.klinks.mk>
|
||||
|
||||
vers.c: version
|
||||
${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
|
||||
|
@ -102,10 +90,12 @@ CLEANFILES+= vers.c
|
|||
|
||||
.if CROSS
|
||||
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
||||
${_MKTARGET_LINK}
|
||||
${LD} -N -p -Ttext ${RELOC} -e ${ENTRY} >lderr -o ${PROG} \
|
||||
${OBJS} -L${SADST} -lsa -L${ZDST} -lz -L${KERNDST} -lkern # solaris linker
|
||||
.else
|
||||
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
||||
${_MKTARGET_LINK}
|
||||
${LD} -X -N -Ttext ${RELOC} -e ${ENTRY} -o ${PROG} \
|
||||
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} # native linker
|
||||
.endif
|
||||
|
|
Loading…
Reference in New Issue