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