Drop main() prototype. Syncs with NetBSD-8
[minix.git] / common / lib / libc / Makefile.inc
blob54652a6d23c51369e88191626bb9ba3baf0f1494
1 # $NetBSD: Makefile.inc,v 1.16 2014/08/10 23:25:49 matt Exp $
3 .include <bsd.own.mk>
5 COMMON_DIR:=${.PARSEDIR}
6 .if defined(__MINIX)
7 COMMON_CODEDIRS=atomic gen inet md net stdlib string
8 .else
9 COMMON_CODEDIRS=atomic gen gmon inet md net stdlib string sys
10 .endif
11 COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160 hash/murmurhash
13 .if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
14     exists(${COMMON_DIR}/arch/${COMMON_MACHINE_ARCH})
15 COMMON_ARCHSUBDIR=      ${COMMON_MACHINE_ARCH}
16 .elif defined(COMMON_MACHINE_CPU) && !empty(COMMON_MACHINE_CPU) && \
17     exists(${COMMON_DIR}/arch/${COMMON_MACHINE_CPU})
18 COMMON_ARCHSUBDIR=      ${COMMON_MACHINE_CPU}
19 .elif defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
20     exists(${KERNDIR}/arch/${LIBKERN_ARCH})
21 COMMON_ARCHSUBDIR=      ${LIBKERN_ARCH}
22 .elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
23 COMMON_ARCHSUBDIR=      ${MACHINE_ARCH}
24 .elif exists(${COMMON_DIR}/arch/${MACHINE_CPU})
25 COMMON_ARCHSUBDIR=      ${MACHINE_CPU}
26 .endif
28 COMMON_ARCHDIR=${COMMON_DIR}/arch/${COMMON_ARCHSUBDIR}
30 .for i in ${COMMON_CODEDIRS}
31 .if exists(${COMMON_DIR}/$i)
32 .PATH.c: ${COMMON_DIR}/$i
33 .endif
34 .if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
35 .include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
36 .endif
37 .if !empty(CPPFLAGS:M-DLIBKERN_OPTIMISE_SPACE) && \
38     exists(${COMMON_ARCHDIR}/$i/small)
39 .PATH.S: ${COMMON_ARCHDIR}/$i/small
40 .endif
42 .if exists(${COMMON_ARCHDIR}/$i)
43 .PATH.c: ${COMMON_ARCHDIR}/$i
44 .PATH.S: ${COMMON_ARCHDIR}/$i
45 .endif
46 .endfor
48 CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string
49 .if defined(COMMON_ARCHSUBDIR)
50 CPPFLAGS+=-I${COMMON_ARCHDIR}/string
51 .endif