]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/build/Makefile
Import DTS files from Linux 4.18
[FreeBSD/FreeBSD.git] / tools / build / Makefile
1 # $FreeBSD$
2
3 .PATH: ${.CURDIR}/../../include
4
5 LIB=            egacy
6 SRC=
7 INCSGROUPS=     INCS SYSINCS
8 INCS=
9
10 SYSINCSDIR=     ${INCLUDEDIR}/sys
11
12 BOOTSTRAPPING?= 0
13
14 _WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true
15 .if ${_WITH_PWCACHEDB} == 0
16 .PATH: ${.CURDIR}/../../contrib/libc-pwcache
17 CFLAGS+=        -I${.CURDIR}/../../contrib/libc-pwcache \
18                 -I${.CURDIR}/../../lib/libc/include
19 SRCS+=          pwcache.c
20 .endif
21
22 _WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true
23 .if ${_WITH_STRSVIS} == 0
24 .PATH: ${.CURDIR}/../../contrib/libc-vis
25 SRCS+=          vis.c
26 CFLAGS+=        -I${.CURDIR}/../../contrib/libc-vis \
27                 -I${.CURDIR}/../../lib/libc/include
28 .endif
29
30 _WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true
31 .if ${_WITH_REALLOCARRAY} == 0
32 .PATH: ${.CURDIR}/../../lib/libc/stdlib
33 INCS+=          stdlib.h
34 SRCS+=          reallocarray.c
35 CFLAGS+=        -I${.CURDIR}/../../lib/libc/include
36 .endif
37
38 _WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true
39 .if ${_WITH_UTIMENS} == 0
40 SYSINCS+=       stat.h
41 SRCS+=          futimens.c utimensat.c
42 .endif
43
44 _WITH_EXPLICIT_BZERO!= grep -c explicit_bzero /usr/include/strings.h || true
45 .if ${_WITH_EXPLICIT_BZERO} == 0
46 .PATH: ${SRCTOP}/sys/libkern
47 INCS+=          strings.h
48 SRCS+=          explicit_bzero.c
49 .endif
50
51 .if empty(SRCS)
52 SRCS=           dummy.c
53 .endif
54
55 .if defined(CROSS_BUILD_TESTING)
56 SUBDIR=         cross-build
57 .endif
58
59 # Needed to build config (since it uses libnv)
60 SYSINCS+=       ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h
61
62 .include <bsd.lib.mk>