Makefile.inc revision 1.9
1# $NetBSD: Makefile.inc,v 1.9 2008/06/15 20:35:11 christos Exp $ 2 3COMMON_DIR:=${.PARSEDIR} 4COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys 5COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160 6 7.if defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \ 8 exists(${KERNDIR}/arch/${LIBKERN_ARCH}) 9COMMON_ARCHSUBDIR= ${LIBKERN_ARCH} 10.elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH}) 11COMMON_ARCHSUBDIR= ${MACHINE_ARCH} 12.elif exists(${COMMON_DIR}/arch/${MACHINE_CPU}) 13COMMON_ARCHSUBDIR= ${MACHINE_CPU} 14.endif 15 16COMMON_ARCHDIR=${COMMON_DIR}/arch/${COMMON_ARCHSUBDIR} 17 18.for i in ${COMMON_CODEDIRS} 19.if exists(${COMMON_DIR}/$i) 20.PATH.c: ${COMMON_DIR}/$i 21.endif 22.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc) 23.include "${COMMON_ARCHDIR}/${i}/Makefile.inc" 24.endif 25.if exists(${COMMON_ARCHDIR}/$i) 26.PATH.c: ${COMMON_ARCHDIR}/$i 27.PATH.S: ${COMMON_ARCHDIR}/$i 28.endif 29.endfor 30 31CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string 32.if defined(COMMON_ARCHSUBDIR) 33CPPFLAGS+=-I${COMMON_ARCHDIR}/string 34.endif 35