xref: /minix/lib/libc/Makefile.inc (revision 0a6a1f1d)
1#	$NetBSD: Makefile.inc,v 1.18 2015/08/28 11:45:02 joerg Exp $
2#	@(#)Makefile	8.2 (Berkeley) 2/3/94
3#
4# All library objects contain sccsid strings by default; they may be
5# excluded as a space-saving measure.  To produce a library that does
6# not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
7# from CPPFLAGS below.  To remove these strings from just the system call
8# stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
9#
10# The NLS (message catalog) functions are always in libc.  To choose that
11# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
12# functions, put -DNLS on the CPPFLAGS line below.
13#
14# The YP functions are always in libc. To choose that getpwent() and friends
15# actually call the YP functions, put -DYP on the CPPFLAGS line below.
16#
17# The Hesiod functions are always in libc. To choose that getpwent() and friends
18# actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
19.if defined(__MINIX)
20USE_INET6=no
21MKYP=no #requires RPC
22USE_JEMALLOC=no
23USE_FORT=no
24USE_LIBTRE=no
25
26# BJG too many warnings
27NOGCCERROR?=    yes
28NOCLANGERROR?=  yes
29.endif # defined(__MINIX)
30
31USE_FORT?=	yes
32
33USE_SHLIBDIR=	yes
34
35.include <bsd.own.mk>
36
37# build libc suitable for rumprun software stack, i.e. are system calls
38# rump kernel function calls instead of kernel traps?
39RUMPRUN?=	no
40
41WARNS=5
42.if !defined(__MINIX)
43CPPFLAGS+=	-D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
44CPPFLAGS+=	-D_DIAGNOSTIC
45.else
46CPPFLAGS+=	-D_LIBC
47.if defined(MLIBDIR)
48CPPFLAGS+=	-DMLIBDIR=\"${MLIBDIR}\"
49.endif
50.endif # !defined(__minix)
51
52.if (${USE_HESIOD} != "no")
53CPPFLAGS+=	-DHESIOD
54.endif
55
56.if (${USE_INET6} != "no")
57CPPFLAGS+=	-DINET6
58.endif
59
60CPPFLAGS+=	-DNLS
61
62.if (${USE_YP} != "no")
63CPPFLAGS+=	-DYP
64.endif
65
66# Set lint to exit on warnings
67#LINTFLAGS+=	-w
68# ignore 'empty translation unit' warnings.
69LINTFLAGS+=	-X 272
70
71.include "libcincludes.mk"
72
73ARCHDIR=	${.CURDIR}/arch/${ARCHSUBDIR}
74AFLAGS+=	-I${ARCHDIR}
75CLEANFILES+=	tags
76
77# Don't try to lint the C library against itself when creating llib-lc.ln
78LLIBS=
79
80INCSDIR=	/usr/include
81