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