mkfs: move directory entry manipulation
[minix.git] / common / lib / libc / Makefile.inc
blob4a63d6bfbae55f2f4131e883add7037b5880b576
1 # $NetBSD: Makefile.inc,v 1.10 2008/10/26 07:22:50 mrg Exp $
3 COMMON_DIR:=${.PARSEDIR}
4 .if defined(__MINIX)
5 COMMON_CODEDIRS=atomic gen inet md net quad stdlib string 
6 .else
7 COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
8 .endif
9 COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160
11 .if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
12     exists(${COMMON_DIR}/arch/${COMMON_MACHINE_ARCH})
13 COMMON_ARCHSUBDIR=      ${COMMON_MACHINE_ARCH}
14 .elif defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
15     exists(${KERNDIR}/arch/${LIBKERN_ARCH})
16 COMMON_ARCHSUBDIR=      ${LIBKERN_ARCH}
17 .elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
18 COMMON_ARCHSUBDIR=      ${MACHINE_ARCH}
19 .elif exists(${COMMON_DIR}/arch/${MACHINE_CPU})
20 COMMON_ARCHSUBDIR=      ${MACHINE_CPU}
21 .endif
23 COMMON_ARCHDIR=${COMMON_DIR}/arch/${COMMON_ARCHSUBDIR}
25 .for i in ${COMMON_CODEDIRS}
26 .if exists(${COMMON_DIR}/$i)
27 .PATH.c: ${COMMON_DIR}/$i
28 .endif
29 .if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
30 .include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
31 .endif
32 .if exists(${COMMON_ARCHDIR}/$i)
33 .PATH.c: ${COMMON_ARCHDIR}/$i
34 .PATH.S: ${COMMON_ARCHDIR}/$i
35 .endif
36 .endfor
38 CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string
39 .if defined(COMMON_ARCHSUBDIR)
40 CPPFLAGS+=-I${COMMON_ARCHDIR}/string
41 .endif