Makefile revision 1.27
1#	$NetBSD: Makefile,v 1.27 1996/05/10 21:27:32 scottr Exp $
2
3LIB=	kern
4NOPIC=
5
6DIR=	${KERNREL}${KERNDIR}
7
8CPPFLAGS=	-I${DIR}/arch/${MACHINE_ARCH} \
9		${KERNCPPFLAGS:S@-I.@-I${KERNREL}.@g}
10
11.if exists (${DIR}/arch/${MACHINE_ARCH}/Makefile.inc)
12.PATH:	${DIR}/arch/${MACHINE_ARCH}
13.include "${DIR}/arch/${MACHINE_ARCH}/Makefile.inc"
14.endif
15
16.PATH: ${DIR}
17
18.if (${MACHINE_ARCH} != "alpha")
19# Quad support
20SRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
21	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
22	subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
23.endif
24
25# Other stuff
26SRCS+=	
27
28# Files to clean up
29CLEANFILES+= lib${LIB}.o lib${LIB}.po
30
31# mcount cannot be compiled with profiling
32mcount.po: mcount.o
33	cp mcount.o mcount.po
34
35install:
36
37.include <bsd.lib.mk>
38
39lib${LIB}.o:: ${OBJS}
40	@echo building standard ${LIB} library
41	@rm -f lib${LIB}.o
42	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
43
44POBJS+=	${OBJS:.o=.po} mcount.po
45lib${LIB}.po:: ${POBJS}
46	@echo building profiled ${LIB} library
47	@rm -f lib${LIB}.po
48	@${LD} -r -o lib${LIB}.po `lorder ${POBJS} | tsort`
49