1 1.22 ws # $NetBSD: Makefile.inc,v 1.22 1996/09/30 15:54:35 ws Exp $ 2 1.1 cgd # 3 1.1 cgd # NOTE: $S must correspond to the top of the 'sys' tree 4 1.1 cgd 5 1.1 cgd KERNDIR= $S/lib/libkern 6 1.1 cgd 7 1.16 mycroft KERNDST?= ${.OBJDIR}/lib/kern 8 1.22 ws KERN_AS?= obj 9 1.22 ws 10 1.22 ws .if (${KERN_AS} == "library") 11 1.22 ws KERNLIB= ${KERNDST}/libkern.a 12 1.22 ws KERNLIB_PROF= ${KERNDST}/libkern_p.a 13 1.22 ws .else 14 1.16 mycroft KERNLIB= ${KERNDST}/libkern.o 15 1.12 mycroft KERNLIB_PROF= ${KERNDST}/libkern.po 16 1.22 ws .endif 17 1.1 cgd 18 1.13 mycroft KERNMAKE= \ 19 1.16 mycroft cd ${KERNDIR} && MAKEOBJDIR=${KERNDST} ${MAKE} \ 20 1.15 mrg CC='${CC}' CFLAGS='${CFLAGS}' \ 21 1.15 mrg AS='${AS}' AFLAGS='${AFLAGS}' \ 22 1.20 mycroft LD='${LD}' STRIP='${STRIP}' \ 23 1.15 mrg MACHINE='${MACHINE}' MACHINE_ARCH='${MACHINE_ARCH}' \ 24 1.21 ghudson KERNCPPFLAGS='${CPPFLAGS:S@^-I. (at) -I../../.@g}' 25 1.13 mycroft 26 1.10 christos ${KERNLIB}: .NOTMAIN __always_make_kernlib 27 1.1 cgd @echo making sure the kern library is up to date... 28 1.22 ws .if (${KERN_AS} == "library") 29 1.22 ws @${KERNMAKE} libkern.a 30 1.22 ws .else 31 1.13 mycroft @${KERNMAKE} libkern.o 32 1.22 ws .endif 33 1.1 cgd 34 1.10 christos ${KERNLIB_PROF}: .NOTMAIN __always_make_kernlib 35 1.1 cgd @echo making sure the profiled kern library is up to date... 36 1.22 ws .if (${KERN_AS} == "library") 37 1.22 ws @${KERNMAKE} libkern_p.a 38 1.22 ws .else 39 1.13 mycroft @${KERNMAKE} libkern.po 40 1.22 ws .endif 41 1.10 christos 42 1.10 christos clean:: .NOTMAIN __always_make_kernlib 43 1.10 christos @echo cleaning the kern library objects 44 1.13 mycroft @${KERNMAKE} clean 45 1.14 mycroft 46 1.14 mycroft depend:: .NOTMAIN __always_make_kernlib 47 1.14 mycroft @echo depending the kern library objects 48 1.14 mycroft @${KERNMAKE} depend 49 1.1 cgd 50 1.2 cgd __always_make_kernlib: .NOTMAIN 51 1.13 mycroft @mkdir -p ${KERNDST} 52