xref: /netbsd-src/sys/lib/libkern/Makefile (revision 76dfffe33547c37f8bdd446e3e4ab0f3c16cea4b)
1#	$NetBSD: Makefile,v 1.31 1996/08/10 04:01:31 mycroft Exp $
2
3LIB=	kern
4NOPIC=
5
6M=	${.CURDIR}/arch/${MACHINE_ARCH}
7
8CPPFLAGS=	-I$M ${KERNCPPFLAGS}
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
17SRCS+=	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
23SRCS+=
24
25# Files to clean up
26CLEANFILES+= lib${LIB}.o lib${LIB}.po
27
28# mcount cannot be compiled with profiling
29mcount.po: mcount.o
30	cp mcount.o mcount.po
31
32install:
33
34.include <bsd.lib.mk>
35
36lib${LIB}.o:: ${OBJS}
37	@echo building standard ${LIB} library
38	@rm -f lib${LIB}.o
39	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
40
41POBJS+=	${OBJS:.o=.po} mcount.po
42lib${LIB}.po:: ${POBJS}
43	@echo building profiled ${LIB} library
44	@rm -f lib${LIB}.po
45	@${LD} -r -o lib${LIB}.po `lorder ${POBJS} | tsort`
46