Makefile revision 1.52
11.52Sdrochner#	$NetBSD: Makefile,v 1.52 1999/05/07 14:28:50 drochner Exp $
21.1Scgd
31.1ScgdLIB=	kern
41.47SlukemMKPIC=	no
51.9Sderaadt
61.50SdrochnerARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/}
71.52SdrochnerM= ${KERNDIR}/arch/${ARCHSUBDIR}
81.20Schristos
91.32ScgdCPPFLAGS=	-I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}
101.29Smycroft
111.52Sdrochner.PATH.c: ${KERNDIR}
121.29Smycroft.if exists ($M/Makefile.inc)
131.52Sdrochner.PATH.c: $M
141.52Sdrochner.PATH.S: $M
151.29Smycroft.include "$M/Makefile.inc"
161.1Scgd.endif
171.5Scgd
181.19Scgd.if (${MACHINE_ARCH} != "alpha")
191.5Scgd# Quad support
201.5ScgdSRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
211.5Scgd	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
221.5Scgd	subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
231.19Scgd.endif
241.8Scgd
251.8Scgd# Other stuff
261.51SgwrSRCS+=	inet_addr.c md5c.c sha1.c pmatch.c
271.27Sscottr
281.27Sscottr# Files to clean up
291.27SscottrCLEANFILES+= lib${LIB}.o lib${LIB}.po
301.5Scgd
311.38Scgd#
321.38Scgd# Special rules for certain objects
331.38Scgd#
341.38Scgd
351.11Scgd# mcount cannot be compiled with profiling
361.11Scgdmcount.po: mcount.o
371.11Scgd	cp mcount.o mcount.po
381.40Smycroft
391.46Sperry# XXX these stub builds should be cleaned up even further.
401.46Sperry
411.46Sperry# if no machine specific memcpy(3), build one out of bcopy(3) based stub.
421.40Smycroft.if empty(SRCS:Mmemcpy.S)
431.46SperrySRCS+=	memcpy.c
441.44Sperry.endif
451.44Sperry
461.46Sperry# if no machine specific memmove(3), build one out of bcopy(3) based stub.
471.44Sperry.if empty(SRCS:Mmemmove.S)
481.46SperrySRCS+=	memmove.c
491.40Smycroft.endif
501.38Scgd
511.46Sperry# if no machine specific strchr(3), build one out of index(3) based stub.
521.38Scgd.if empty(SRCS:Mstrchr.S)
531.46SperrySRCS+=	strchr.c
541.38Scgd.endif
551.38Scgd
561.46Sperry# if no machine specific strrchr(3), build one out of rindex(3) based stub.
571.38Scgd.if empty(SRCS:Mstrrchr.S)
581.46SperrySRCS+=	strrchr.c
591.38Scgd.endif
601.36Scjs
611.48SchsPOBJS+=	mcount.po
621.43Sdrochner
631.36Scjs# only needed during build
641.36Scjslibinstall::
651.1Scgd
661.1Scgd.include <bsd.lib.mk>
671.23Smycroft
681.23Smycroftlib${LIB}.o:: ${OBJS}
691.23Smycroft	@echo building standard ${LIB} library
701.23Smycroft	@rm -f lib${LIB}.o
711.37Sgwr	@${LD} -r -o lib${LIB}.o `NM=${NM} ${LORDER} ${OBJS} | ${TSORT}`
721.23Smycroft
731.23Smycroftlib${LIB}.po:: ${POBJS}
741.23Smycroft	@echo building profiled ${LIB} library
751.23Smycroft	@rm -f lib${LIB}.po
761.37Sgwr	@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
77