Home | History | Annotate | Line # | Download | only in libkern
Makefile revision 1.50
      1 #	$NetBSD: Makefile,v 1.50 1999/03/04 19:46:09 drochner Exp $
      2 
      3 LIB=	kern
      4 MKPIC=	no
      5 
      6 ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/}
      7 M= ${.CURDIR}/arch/${ARCHSUBDIR}
      8 
      9 CPPFLAGS=	-I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}
     10 
     11 .if exists ($M/Makefile.inc)
     12 .PATH:	$M
     13 .include "$M/Makefile.inc"
     14 .endif
     15 
     16 .if (${MACHINE_ARCH} != "alpha")
     17 # Quad support
     18 SRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
     19 	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
     20 	subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
     21 .endif
     22 
     23 # Other stuff
     24 SRCS+=	md5c.c sha1.c pmatch.c
     25 
     26 # Files to clean up
     27 CLEANFILES+= lib${LIB}.o lib${LIB}.po
     28 
     29 #
     30 # Special rules for certain objects
     31 #
     32 
     33 # mcount cannot be compiled with profiling
     34 mcount.po: mcount.o
     35 	cp mcount.o mcount.po
     36 
     37 # XXX these stub builds should be cleaned up even further.
     38 
     39 # if no machine specific memcpy(3), build one out of bcopy(3) based stub.
     40 .if empty(SRCS:Mmemcpy.S)
     41 SRCS+=	memcpy.c
     42 .endif
     43 
     44 # if no machine specific memmove(3), build one out of bcopy(3) based stub.
     45 .if empty(SRCS:Mmemmove.S)
     46 SRCS+=	memmove.c
     47 .endif
     48 
     49 # if no machine specific strchr(3), build one out of index(3) based stub.
     50 .if empty(SRCS:Mstrchr.S)
     51 SRCS+=	strchr.c
     52 .endif
     53 
     54 # if no machine specific strrchr(3), build one out of rindex(3) based stub.
     55 .if empty(SRCS:Mstrrchr.S)
     56 SRCS+=	strrchr.c
     57 .endif
     58 
     59 POBJS+=	mcount.po
     60 
     61 # only needed during build
     62 libinstall::
     63 
     64 .include <bsd.lib.mk>
     65 
     66 lib${LIB}.o:: ${OBJS}
     67 	@echo building standard ${LIB} library
     68 	@rm -f lib${LIB}.o
     69 	@${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}`
     70 
     71 lib${LIB}.po:: ${POBJS}
     72 	@echo building profiled ${LIB} library
     73 	@rm -f lib${LIB}.po
     74 	@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
     75