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