xref: /openbsd/lib/libc/Makefile.inc (revision 8529ddd3)
1#	$OpenBSD: Makefile.inc,v 1.22 2014/08/31 09:36:39 miod Exp $
2#
3# This file contains make rules used to build libc
4#
5
6.ifndef LIBCSRCDIR
7all:
8	@echo "need to define LIBCSRCDIR" >&2; exit 1
9.endif
10
11CFLAGS+=	-I${LIBCSRCDIR}/include -Werror-implicit-function-declaration
12
13# Include link-time warnings about unsafe API uses (ie. strcpy)
14CFLAGS+=-DAPIWARN
15
16.if (${YP:L} == "yes")
17CFLAGS+=-DYP -I${LIBCSRCDIR}/yp
18.endif
19
20LLIBS=
21AINC=   -I${LIBCSRCDIR}/arch/${MACHINE_CPU}
22.if defined(DESTDIR)
23AINC+=  -nostdinc -idirafter ${DESTDIR}/usr/include
24.endif
25
26.if exists (${LIBCSRCDIR}/arch/${MACHINE_CPU}/Makefile.inc)
27.PATH:	${LIBCSRCDIR}/arch/${MACHINE_CPU}
28.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/Makefile.inc"
29.endif
30
31.include "${LIBCSRCDIR}/db/Makefile.inc"
32.include "${LIBCSRCDIR}/dlfcn/Makefile.inc"
33.include "${LIBCSRCDIR}/citrus/Makefile.inc"
34.include "${LIBCSRCDIR}/compat-43/Makefile.inc"
35.include "${LIBCSRCDIR}/gen/Makefile.inc"
36.include "${LIBCSRCDIR}/crypt/Makefile.inc"
37.include "${LIBCSRCDIR}/gdtoa/Makefile.inc"
38.include "${LIBCSRCDIR}/gmon/Makefile.inc"
39.include "${LIBCSRCDIR}/hash/Makefile.inc"
40.include "${LIBCSRCDIR}/locale/Makefile.inc"
41.include "${LIBCSRCDIR}/asr/Makefile.inc"
42.include "${LIBCSRCDIR}/net/Makefile.inc"
43.include "${LIBCSRCDIR}/nls/Makefile.inc"
44.if (${MACHINE_CPU} != "alpha")
45.include "${LIBCSRCDIR}/quad/Makefile.inc"
46.endif
47.include "${LIBCSRCDIR}/regex/Makefile.inc"
48.include "${LIBCSRCDIR}/rpc/Makefile.inc"
49.include "${LIBCSRCDIR}/stdio/Makefile.inc"
50.include "${LIBCSRCDIR}/stdlib/Makefile.inc"
51.include "${LIBCSRCDIR}/string/Makefile.inc"
52.include "${LIBCSRCDIR}/termios/Makefile.inc"
53.include "${LIBCSRCDIR}/thread/Makefile.inc"
54.include "${LIBCSRCDIR}/time/Makefile.inc"
55.include "${LIBCSRCDIR}/uuid/Makefile.inc"
56.include "${LIBCSRCDIR}/sys/Makefile.inc"
57.if (${YP:L} == "yes")
58.include "${LIBCSRCDIR}/yp/Makefile.inc"
59.endif
60
61CFLAGS+=-DNLS
62