Home | History | Annotate | Line # | Download | only in libc
Makefile.inc revision 1.7
      1 # $NetBSD: Makefile.inc,v 1.7 2007/11/28 15:25:44 ad Exp $
      2 
      3 COMMON_DIR:=${.PARSEDIR}
      4 COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string
      5 COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160
      6 
      7 .if defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
      8     exists(${KERNDIR}/arch/${LIBKERN_ARCH})
      9 COMMON_ARCHSUBDIR=	${LIBKERN_ARCH}
     10 .elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
     11 COMMON_ARCHSUBDIR=	${MACHINE_ARCH}
     12 .elif exists(${COMMON_DIR}/arch/${MACHINE_CPU})
     13 COMMON_ARCHSUBDIR=	${MACHINE_CPU}
     14 .endif
     15 
     16 COMMON_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)
     23 .PATH.c: ${COMMON_ARCHDIR}/$i
     24 .PATH.S: ${COMMON_ARCHDIR}/$i
     25 .endif
     26 .if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
     27 .include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
     28 .endif
     29 .endfor
     30 
     31 CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string
     32 .if defined(COMMON_ARCHSUBDIR)
     33 CPPFLAGS+=-I${COMMON_ARCHDIR}/string
     34 .endif
     35