Makefile revision 1.48
11.48Schs#	$NetBSD: Makefile,v 1.48 1999/02/24 16:22:42 chs Exp $
21.1Scgd
31.1ScgdLIB=	kern
41.47SlukemMKPIC=	no
51.9Sderaadt
61.29SmycroftM=	${.CURDIR}/arch/${MACHINE_ARCH}
71.20Schristos
81.32ScgdCPPFLAGS=	-I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}
91.29Smycroft
101.29Smycroft.if exists ($M/Makefile.inc)
111.29Smycroft.PATH:	$M
121.29Smycroft.include "$M/Makefile.inc"
131.1Scgd.endif
141.5Scgd
151.19Scgd.if (${MACHINE_ARCH} != "alpha")
161.5Scgd# Quad support
171.5ScgdSRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
181.5Scgd	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
191.5Scgd	subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
201.19Scgd.endif
211.8Scgd
221.8Scgd# Other stuff
231.42SchristosSRCS+=	md5c.c sha1.c pmatch.c
241.27Sscottr
251.27Sscottr# Files to clean up
261.27SscottrCLEANFILES+= lib${LIB}.o lib${LIB}.po
271.5Scgd
281.38Scgd#
291.38Scgd# Special rules for certain objects
301.38Scgd#
311.38Scgd
321.11Scgd# mcount cannot be compiled with profiling
331.11Scgdmcount.po: mcount.o
341.11Scgd	cp mcount.o mcount.po
351.40Smycroft
361.46Sperry# XXX these stub builds should be cleaned up even further.
371.46Sperry
381.46Sperry# if no machine specific memcpy(3), build one out of bcopy(3) based stub.
391.40Smycroft.if empty(SRCS:Mmemcpy.S)
401.46SperrySRCS+=	memcpy.c
411.44Sperry.endif
421.44Sperry
431.46Sperry# if no machine specific memmove(3), build one out of bcopy(3) based stub.
441.44Sperry.if empty(SRCS:Mmemmove.S)
451.46SperrySRCS+=	memmove.c
461.40Smycroft.endif
471.38Scgd
481.46Sperry# if no machine specific strchr(3), build one out of index(3) based stub.
491.38Scgd.if empty(SRCS:Mstrchr.S)
501.46SperrySRCS+=	strchr.c
511.38Scgd.endif
521.38Scgd
531.46Sperry# if no machine specific strrchr(3), build one out of rindex(3) based stub.
541.38Scgd.if empty(SRCS:Mstrrchr.S)
551.46SperrySRCS+=	strrchr.c
561.38Scgd.endif
571.36Scjs
581.48SchsPOBJS+=	mcount.po
591.43Sdrochner
601.36Scjs# only needed during build
611.36Scjslibinstall::
621.1Scgd
631.1Scgd.include <bsd.lib.mk>
641.23Smycroft
651.23Smycroftlib${LIB}.o:: ${OBJS}
661.23Smycroft	@echo building standard ${LIB} library
671.23Smycroft	@rm -f lib${LIB}.o
681.37Sgwr	@${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}`
691.23Smycroft
701.23Smycroftlib${LIB}.po:: ${POBJS}
711.23Smycroft	@echo building profiled ${LIB} library
721.23Smycroft	@rm -f lib${LIB}.po
731.37Sgwr	@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
74