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