]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/conf/config.mk
acpi_hpet: Use devclass_find to find devclass in identify.
[FreeBSD/FreeBSD.git] / sys / conf / config.mk
1 # $FreeBSD$
2 #
3 # Common code to marry kernel config(8) goo and module building goo.
4 #
5
6 # Generate options files that otherwise would be built
7 # in substantially similar ways through the tree. Move
8 # the code here when they all produce identical results
9 # (or should)
10 .if !defined(KERNBUILDDIR)
11 opt_global.h:
12         touch ${.TARGET}
13         @echo "#define SMP 1" >> ${.TARGET}
14         @echo "#define MAC 1" >> ${.TARGET}
15         @echo "#define VIMAGE 1" >> ${.TARGET}
16 .if ${MK_BHYVE_SNAPSHOT} != "no"
17 opt_bhyve_snapshot.h:
18         @echo "#define BHYVE_SNAPSHOT 1" > ${.TARGET}
19 .endif
20 opt_bpf.h:
21         echo "#define DEV_BPF 1" > ${.TARGET}
22 .if ${MK_INET_SUPPORT} != "no"
23 opt_inet.h:
24         @echo "#define INET 1" > ${.TARGET}
25         @echo "#define TCP_OFFLOAD 1" >> ${.TARGET}
26 .endif
27 .if ${MK_INET6_SUPPORT} != "no"
28 opt_inet6.h:
29         @echo "#define INET6 1" > ${.TARGET}
30 .endif
31 .if ${MK_IPSEC_SUPPORT} != "no"
32 opt_ipsec.h:
33         @echo "#define IPSEC_SUPPORT 1" > ${.TARGET}
34 .endif
35 .if ${MK_RATELIMIT} != "no"
36 opt_ratelimit.h:
37         @echo "#define RATELIMIT 1" > ${.TARGET}
38 .endif
39 opt_mrouting.h:
40         @echo "#define MROUTING 1" > ${.TARGET}
41 .if ${MK_FDT} != "no"
42 opt_platform.h:
43         @echo "#define FDT 1" > ${.TARGET}
44 .endif
45 opt_printf.h:
46         echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET}
47 opt_scsi.h:
48         echo "#define SCSI_DELAY 15000" > ${.TARGET}
49 .if ${MK_SCTP_SUPPORT} != "no"
50 opt_sctp.h:
51         @echo "#define SCTP_SUPPORT 1" > ${.TARGET}
52 .endif
53 opt_wlan.h:
54         echo "#define IEEE80211_DEBUG 1" > ${.TARGET}
55         echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET}
56 KERN_OPTS.i386=NEW_PCIB DEV_PCI
57 KERN_OPTS.amd64=NEW_PCIB DEV_PCI
58 KERN_OPTS.powerpc=NEW_PCIB DEV_PCI
59 KERN_OPTS=MROUTING IEEE80211_DEBUG \
60         IEEE80211_SUPPORT_MESH DEV_BPF \
61         ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA}
62 .if ${MK_BHYVE_SNAPSHOT} != "no"
63 KERN_OPTS+= BHYVE_SNAPSHOT
64 .endif
65 .if ${MK_INET_SUPPORT} != "no"
66 KERN_OPTS+= INET TCP_OFFLOAD
67 .endif
68 .if ${MK_INET6_SUPPORT} != "no"
69 KERN_OPTS+= INET6
70 .endif
71 .if ${MK_IPSEC_SUPPORT} != "no"
72 KERN_OPTS+= IPSEC_SUPPORT
73 .endif
74 .if ${MK_SCTP_SUPPORT} != "no"
75 KERN_OPTS+= SCTP_SUPPORT
76 .endif
77 .elif !defined(KERN_OPTS)
78 # Add all the options that are mentioned in any opt_*.h file when we
79 # have a kernel build directory to pull them from.
80 KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u
81 .export KERN_OPTS
82 .endif
83
84 .if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \
85     (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH))
86 __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
87 .export __MPATH
88 .endif