Source-Changes-HG archive

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

[src/trunk]: src/lib/libkern Make libkern.a for standalone problems and insta...



details:   https://anonhg.NetBSD.org/src/rev/08504ac2475d
branches:  trunk
changeset: 789490:08504ac2475d
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Aug 20 17:35:41 2013 +0000

description:
Make libkern.a for standalone problems and install it into ./usr/lib

diffstat:

 lib/libkern/Makefile |  71 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 71 insertions(+), 0 deletions(-)

diffs (75 lines):

diff -r a5eebb06a96a -r 08504ac2475d lib/libkern/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libkern/Makefile      Tue Aug 20 17:35:41 2013 +0000
@@ -0,0 +1,71 @@
+#      $NetBSD: Makefile,v 1.1 2013/08/20 17:35:41 matt Exp $
+
+WITHOUT_MAN=true  # defined
+
+.include <bsd.obj.mk>          # Pull in OBJDIR name rules.
+.include <bsd.own.mk>
+
+LIB=   kern
+DBG=   -Os
+
+MKDEBUGLIB:=    no
+MKLINT:=        no
+MKPICINSTALL:=  no
+MKPIC:=         no
+MKPROFILE:=     no
+
+S= ${NETBSDSRCDIR}/sys
+CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} -I${S}/arch
+
+CPPFLAGS+= -D_STANDALONE
+
+COPTS+=        -ffreestanding
+COPTS+=        -fno-stack-protector
+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
+CLEANFILES+= ${MACHINE_CPU} machine
+
+machine::
+       -rm -f ${MACHINE_CPU} machine
+       ln -s ${S}/arch/${MACHINE}/include machine
+       ln -s ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU}
+
+${OBJS}: machine
+
+### find out what to use for libkern
+KERN_AS=       library
+KERNDIR=       ${S}/lib/libkern
+
+.include "${S}/lib/libkern/Makefile.libkern"
+.ifndef ARCHSUBDIR
+.BEGIN:
+       @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
+       @false
+.endif
+
+cleandir distclean: .WAIT cleanlibdir
+
+cleanlibdir:
+       -rm -rf lib
+
+.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}



Home | Main Index | Thread Index | Old Index