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