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