Use <bsd.klinks.mk>

This commit is contained in:
matt 2013-08-21 05:45:16 +00:00
parent dcd5cab62d
commit 30d3589ba5
1 changed files with 2 additions and 47 deletions

View File

@ -1,9 +1,10 @@
# $NetBSD: Makefile,v 1.4 2013/08/20 20:54:35 matt Exp $
# $NetBSD: Makefile,v 1.5 2013/08/21 05:45:16 matt Exp $
WITHOUT_MAN=true # defined
.include <bsd.obj.mk> # Pull in OBJDIR name rules.
.include <bsd.own.mk>
.include <bsd.klinks.mk>
LIB= kern
LIBISPRIVATE?= yes
@ -20,39 +21,6 @@ COPTS+= -fno-unwind-tables
CWARNFLAGS+= -Werror
CWARNFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
.if !make(obj) && !make(clean) && !make(cleandir)
.NOPATH: machine
.endif
realdepend realall: machine .WAIT
CLEANFILES+= ${MACHINE_CPU} machine
ARCHDIRS.i386= x86
ARCHDIRS.m68000= m68k
ARCHDIRS.sparc64= sparc
ARCHDIRS.x86_64= x86
MACHDIRS.sun2= sun68k
machine::
.if ${MACHINE_CPU} == "arm"
ln -sf ${S}/arch/${MACHINE_CPU}/include machine
.else
ln -sf ${S}/arch/${MACHINE}/include machine
.endif
.if !empty(ARCHDIRS.${MACHINE_ARCH})
.for d in ${ARCHDIRS.${MACHINE_ARCH}}
ln -sf ${S}/arch/${d}/include ${d}
.endfor
.endif
.if !empty(MACHDIRS.${MACHINE})
.for d in ${MACHDIRS.${MACHINE}}
ln -sf ${S}/arch/${d}/include ${d}
.endfor
.endif
ln -sf ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU}
${OBJS}: machine
### find out what to use for libkern
KERN_AS= library
KERNDIR= ${S}/lib/libkern
@ -65,16 +33,3 @@ KERNDIR= ${S}/lib/libkern
.endif
.include <bsd.lib.mk>
lib${LIB}.o:: ${OBJS}
@echo building standard ${LIB} library
@rm -f lib${LIB}.o
@${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}`
lib${LIB}.po:: ${POBJS}
@echo building profiled ${LIB} library
@rm -f lib${LIB}.po
@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
showsources: ${SRCS}
@echo ${.ALLSRC}