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