]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
Merge ^/head r317281 through r317502.
[FreeBSD/FreeBSD.git] / sys / modules / Makefile
1 # $FreeBSD$
2
3 SYSDIR?=${SRCTOP}/sys
4 .include "${SYSDIR}/conf/kern.opts.mk"
5
6 SUBDIR_PARALLEL=
7
8 # Modules that include binary-only blobs of microcode should be selectable by
9 # MK_SOURCELESS_UCODE option (see below).
10
11 .if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
12 SUBDIR=${MODULES_OVERRIDE}
13 .else
14 SUBDIR= \
15         ${_3dfx} \
16         ${_3dfx_linux} \
17         ${_aac} \
18         ${_aacraid} \
19         accf_data \
20         accf_dns \
21         accf_http \
22         acl_nfs4 \
23         acl_posix1e \
24         ${_acpi} \
25         ae \
26         ${_aesni} \
27         age \
28         ${_agp} \
29         aha \
30         ahci \
31         ${_aic} \
32         aic7xxx \
33         alc \
34         ale \
35         alq \
36         ${_amd_ecc_inject} \
37         ${_amdsbwd} \
38         ${_amdtemp} \
39         amr \
40         ${_an} \
41         ${_aout} \
42         ${_apm} \
43         ${_arcmsr} \
44         ${_arcnet} \
45         ${_armv8crypto} \
46         ${_asmc} \
47         ata \
48         ath \
49         ath_pci \
50         ${_autofs} \
51         ${_auxio} \
52         ${_bce} \
53         bfe \
54         bge \
55         bhnd \
56         ${_bxe} \
57         ${_bios} \
58         ${_bktr} \
59         ${_bm} \
60         bnxt \
61         bridgestp \
62         bwi \
63         bwn \
64         bwn_pci \
65         ${_bytgpio} \
66         cam \
67         ${_cardbus} \
68         ${_carp} \
69         cas \
70         ${_cbb} \
71         cc \
72         cd9660 \
73         cd9660_iconv \
74         ${_ce} \
75         ${_cfi} \
76         chacha20 \
77         ${_chromebook_platform} \
78         ${_ciss} \
79         cloudabi \
80         ${_cloudabi32} \
81         ${_cloudabi64} \
82         ${_cm} \
83         ${_cmx} \
84         ${_coff} \
85         ${_coretemp} \
86         ${_cp} \
87         ${_cpsw} \
88         ${_cpuctl} \
89         ${_cpufreq} \
90         ${_crypto} \
91         ${_cryptodev} \
92         ${_cs} \
93         ${_ctau} \
94         ctl \
95         ${_cxgb} \
96         ${_cxgbe} \
97         dc \
98         dcons \
99         dcons_crom \
100         de \
101         ${_dpms} \
102         ${_dpt} \
103         ${_drm} \
104         ${_drm2} \
105         dummynet \
106         ${_ed} \
107         ${_efirt} \
108         ${_elink} \
109         ${_em} \
110         ${_ep} \
111         ${_epic} \
112         esp \
113         ${_et} \
114         evdev \
115         ${_ex} \
116         ${_exca} \
117         ext2fs \
118         fdc \
119         fdescfs \
120         ${_fe} \
121         filemon \
122         firewire \
123         firmware \
124         fuse \
125         ${_fxp} \
126         gem \
127         geom \
128         ${_glxiic} \
129         ${_glxsb} \
130         gpio \
131         hifn \
132         hme \
133         ${_hpt27xx} \
134         ${_hptiop} \
135         ${_hptmv} \
136         ${_hptnr} \
137         ${_hptrr} \
138         hwpmc \
139         ${_hwpmc_mips24k} \
140         ${_hwpmc_mips74k} \
141         ${_hyperv} \
142         i2c \
143         ${_ibcore} \
144         ${_ibcs2} \
145         ${_ichwd} \
146         ${_ida} \
147         if_bridge \
148         if_disc \
149         if_edsc \
150         ${_if_enc} \
151         if_epair \
152         ${_if_gif} \
153         ${_if_gre} \
154         ${_if_me} \
155         if_lagg \
156         ${_if_ndis} \
157         ${_if_stf} \
158         if_tap \
159         if_tun \
160         if_vlan \
161         if_vxlan \
162         ${_iir} \
163         imgact_binmisc \
164         ${_intelspi} \
165         ${_io} \
166         ${_ioat} \
167         ${_ipoib} \
168         ${_ipdivert} \
169         ${_ipfilter} \
170         ${_ipfw} \
171         ipfw_nat \
172         ${_ipfw_nat64} \
173         ${_ipfw_nptv6} \
174         ${_ipfw_pmod} \
175         ${_ipmi} \
176         ip6_mroute_mod \
177         ip_mroute_mod \
178         ${_ips} \
179         ${_ipsec} \
180         ${_ipw} \
181         ${_ipwfw} \
182         ${_isci} \
183         ${_iser} \
184         isp \
185         ${_ispfw} \
186         ${_iwi} \
187         ${_iwifw} \
188         ${_iwm} \
189         ${_iwmfw} \
190         ${_iwn} \
191         ${_iwnfw} \
192         ${_ix} \
193         ${_ixv} \
194         ${_ixgb} \
195         ${_ixl} \
196         ${_ixlv} \
197         jme \
198         joy \
199         kbdmux \
200         kgssapi \
201         kgssapi_krb5 \
202         khelp \
203         krpc \
204         ksyms \
205         le \
206         lge \
207         libalias \
208         libiconv \
209         libmbpool \
210         libmchain \
211         ${_linprocfs} \
212         ${_linsysfs} \
213         ${_linux} \
214         ${_linux_common} \
215         ${_linux64} \
216         linuxkpi \
217         lmc \
218         lpt \
219         mac_biba \
220         mac_bsdextended \
221         mac_ifoff \
222         mac_lomac \
223         mac_mls \
224         mac_none \
225         mac_partition \
226         mac_portacl \
227         mac_seeotheruids \
228         mac_stub \
229         mac_test \
230         malo \
231         md \
232         mdio \
233         mem \
234         mfi \
235         mii \
236         mlx \
237         ${_mlx4} \
238         ${_mlx4ib} \
239         ${_mlx4en} \
240         ${_mlx5} \
241         ${_mlx5en} \
242         ${_mly} \
243         mmc \
244         mmcsd \
245         mpr \
246         mps \
247         mpt \
248         mqueue \
249         mrsas \
250         msdosfs \
251         msdosfs_iconv \
252         ${_mse} \
253         msk \
254         ${_mthca} \
255         mvs \
256         mwl \
257         ${_mwlfw} \
258         mxge \
259         my \
260         ${_nandfs} \
261         ${_nandsim} \
262         ${_ncr} \
263         ${_nctgpio} \
264         ${_ncv} \
265         ${_ndis} \
266         ${_netgraph} \
267         ${_nfe} \
268         nfscl \
269         nfscommon \
270         nfsd \
271         nfslock \
272         nfslockd \
273         nfssvc \
274         nge \
275         nmdm \
276         ${_nsp} \
277         nullfs \
278         ${_ntb} \
279         ${_nvd} \
280         ${_nvme} \
281         ${_nvram} \
282         ${_nxge} \
283         oce \
284         otus \
285         ${_otusfw} \
286         ow \
287         ${_padlock} \
288         ${_padlock_rng} \
289         ${_pccard} \
290         ${_pcfclock} \
291         pcn \
292         ${_pf} \
293         ${_pflog} \
294         ${_pfsync} \
295         plip \
296         ${_pms} \
297         ppbus \
298         ppc \
299         ppi \
300         pps \
301         procfs \
302         proto \
303         pseudofs \
304         ${_pst} \
305         pty  \
306         puc \
307         ${_qlxge} \
308         ${_qlxgb} \
309         ${_qlxgbe} \
310         ${_qlnx} \
311         ral \
312         ${_ralfw} \
313         ${_random_fortuna} \
314         ${_random_yarrow} \
315         ${_random_other} \
316         rc4 \
317         ${_rdma} \
318         ${_rdrand_rng} \
319         re \
320         rl \
321         rtwn \
322         rtwn_pci \
323         rtwn_usb \
324         ${_rtwnfw} \
325         ${_s3} \
326         ${_safe} \
327         ${_sbni} \
328         scc \
329         ${_scsi_low} \
330         sdhci \
331         ${_sdhci_acpi} \
332         sdhci_pci \
333         sem \
334         send \
335         ${_sf} \
336         ${_sfxge} \
337         sge \
338         siba_bwn \
339         siftr \
340         siis \
341         sis \
342         sk \
343         smbfs \
344         sn \
345         snp \
346         sound \
347         ${_speaker} \
348         spigen \
349         ${_splash} \
350         ${_sppp} \
351         ste \
352         ${_stg} \
353         stge \
354         ${_sym} \
355         ${_syscons} \
356         sysvipc \
357         tcp \
358         ${_ti} \
359         tests/framework \
360         tests/callout_test \
361         tl \
362         tmpfs \
363         ${_toecore} \
364         ${_tpm} \
365         trm \
366         ${_twa} \
367         twe \
368         tws \
369         tx \
370         ${_txp} \
371         uart \
372         ubsec \
373         udf \
374         udf_iconv \
375         ufs \
376         uinput \
377         unionfs \
378         usb \
379         ${_vesa} \
380         ${_virtio} \
381         vge \
382         ${_viawd} \
383         videomode \
384         vkbd \
385         ${_vmm} \
386         ${_vmware} \
387         ${_vpo} \
388         vr \
389         vte \
390         vx \
391         ${_vxge} \
392         wb \
393         ${_wbwd} \
394         ${_wi} \
395         wlan \
396         wlan_acl \
397         wlan_amrr \
398         wlan_ccmp \
399         wlan_rssadapt \
400         wlan_tkip \
401         wlan_wep \
402         wlan_xauth \
403         ${_wpi} \
404         ${_wpifw} \
405         ${_x86bios} \
406         ${_xe} \
407         xl \
408         zlib
409
410 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
411 _autofs=        autofs
412 .endif
413
414 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
415 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
416         ${MACHINE_CPUARCH} != "mips" && \
417         ${MACHINE_CPUARCH} != "sparc64"
418 SUBDIR+=        dtrace
419 .endif
420 SUBDIR+=        opensolaris
421 .endif
422
423 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
424 .if exists(${SRCTOP}/sys/opencrypto)
425 _crypto=        crypto
426 _cryptodev=     cryptodev
427 _random_fortuna=random_fortuna
428 _random_yarrow= random_yarrow
429 _random_other=  random_other
430 .endif
431 .endif
432
433 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
434 SUBDIR+=        cuse
435 .endif
436
437 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
438         defined(ALL_MODULES)
439 _carp=          carp
440 _toecore=       toecore
441 _if_enc=        if_enc
442 _if_gif=        if_gif
443 _if_gre=        if_gre
444 _ipfw_pmod=     ipfw_pmod
445 .if ${MK_IPSEC_SUPPORT} != "no"
446 _ipsec=         ipsec
447 .endif
448 .endif
449
450 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
451         defined(ALL_MODULES)
452 _if_stf=        if_stf
453 .endif
454
455 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
456 _if_me=         if_me
457 _ipdivert=      ipdivert
458 _ipfw=          ipfw
459 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
460 _ipfw_nat64=    ipfw_nat64
461 .endif
462 .endif
463
464 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
465 _ipfw_nptv6=    ipfw_nptv6
466 .endif
467
468 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
469 _ipfilter=      ipfilter
470 .endif
471
472 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
473 SUBDIR+=        cfiscsi
474 SUBDIR+=        iscsi
475 SUBDIR+=        iscsi_initiator
476 .endif
477
478 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
479 _nandfs=        nandfs
480 _nandsim=       nandsim
481 .endif
482
483 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
484 _netgraph=      netgraph
485 .endif
486
487 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
488         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
489 _pf=            pf
490 _pflog=         pflog
491 .if ${MK_INET_SUPPORT} != "no"
492 _pfsync=        pfsync
493 .endif
494 .endif
495
496 .if ${MK_SOURCELESS_UCODE} != "no"
497 _bce=           bce
498 _fxp=           fxp
499 _ispfw=         ispfw
500 _sf=            sf
501 _ti=            ti
502 _txp=           txp
503
504 .if ${MACHINE_CPUARCH} != "mips"
505 _mwlfw=         mwlfw
506 _otusfw=        otusfw
507 _ralfw=         ralfw
508 _rtwnfw=        rtwnfw
509 .endif
510 .endif
511
512 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
513         ${MACHINE_CPUARCH} != "mips" && \
514         ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
515         ${MACHINE_CPUARCH} != "riscv"
516 _cxgbe=         cxgbe
517 .endif
518
519 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
520 SUBDIR+=        zfs
521 .endif
522
523 .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "")
524 _hwpmc_mips24k= hwpmc_mips24k
525 _hwpmc_mips74k= hwpmc_mips74k
526 .endif
527
528 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
529         ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
530         ${MACHINE_CPUARCH} != "riscv"
531 _syscons=       syscons
532 _vpo=           vpo
533 .endif
534
535 .if ${MACHINE_CPUARCH} != "mips"
536 # no BUS_SPACE_UNSPECIFIED
537 # No barrier instruction support (specific to this driver)
538 _sym=           sym
539 # intr_disable() is a macro, causes problems
540 .if ${MK_SOURCELESS_UCODE} != "no"
541 _cxgb=          cxgb
542 .endif
543 .endif
544
545 .if ${MACHINE_CPUARCH} == "aarch64"
546 _armv8crypto=   armv8crypto
547 _em=            em
548 .endif
549
550 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
551 _agp=           agp
552 _an=            an
553 _aout=          aout
554 _bios=          bios
555 _bktr=          bktr
556 _bxe=           bxe
557 _cardbus=       cardbus
558 _cbb=           cbb
559 _cpuctl=        cpuctl
560 _cpufreq=       cpufreq
561 _cs=            cs
562 _dpms=          dpms
563 _drm=           drm
564 _drm2=          drm2
565 _ed=            ed
566 _em=            em
567 _ep=            ep
568 _et=            et
569 _exca=          exca
570 _fe=            fe
571 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
572 _ibcore=        ibcore
573 .endif
574 _if_ndis=       if_ndis
575 _io=            io
576 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
577 _ipoib=         ipoib
578 _iser=          iser
579 .endif
580 _ix=            ix
581 _ixv=           ixv
582 _linprocfs=     linprocfs
583 _linsysfs=      linsysfs
584 _linux=         linux
585 _nctgpio=       nctgpio
586 _ndis=          ndis
587 _pccard=        pccard
588 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
589 _rdma=          rdma
590 .endif
591 _safe=          safe
592 _scsi_low=      scsi_low
593 _speaker=       speaker
594 _splash=        splash
595 _sppp=          sppp
596 _vmware=        vmware
597 _vxge=          vxge
598 _wbwd=          wbwd
599 _wi=            wi
600 _xe=            xe
601
602 _aac=           aac
603 _aacraid=       aacraid
604 _acpi=          acpi
605 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
606 _aesni=         aesni
607 .endif
608 _amd_ecc_inject=amd_ecc_inject
609 _amdsbwd=       amdsbwd
610 _amdtemp=       amdtemp
611 _arcmsr=        arcmsr
612 _asmc=          asmc
613 _bytgpio=       bytgpio
614 _ciss=          ciss
615 _chromebook_platform=   chromebook_platform
616 _cmx=           cmx
617 _coretemp=      coretemp
618 .if ${MK_SOURCELESS_HOST} != "no"
619 _hpt27xx=       hpt27xx
620 .endif
621 _hptiop=        hptiop
622 .if ${MK_SOURCELESS_HOST} != "no"
623 _hptmv=         hptmv
624 _hptnr=         hptnr
625 _hptrr=         hptrr
626 .endif
627 _hyperv=        hyperv
628 _ichwd=         ichwd
629 _ida=           ida
630 _iir=           iir
631 _intelspi=      intelspi
632 _ipmi=          ipmi
633 _ips=           ips
634 _isci=          isci
635 _ipw=           ipw
636 _iwi=           iwi
637 _iwm=           iwm
638 _iwn=           iwn
639 _ixgb=          ixgb
640 .if ${MK_SOURCELESS_UCODE} != "no"
641 _ipwfw=         ipwfw
642 _iwifw=         iwifw
643 _iwmfw=         iwmfw
644 _iwnfw=         iwnfw
645 .endif
646 _mlx4=          mlx4
647 _mlx5=          mlx5
648 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
649         defined(ALL_MODULES)
650 _mlx4en=        mlx4en
651 _mlx5en=        mlx5en
652 .endif
653 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
654 _mlx4ib=        mlx4ib
655 .endif
656 _mly=           mly
657 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
658 _mthca=         mthca
659 .endif
660 _nfe=           nfe
661 _nvd=           nvd
662 _nvme=          nvme
663 _nvram=         nvram
664 _nxge=          nxge
665 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
666 _padlock=       padlock
667 _padlock_rng=   padlock_rng
668 _rdrand_rng=    rdrand_rng
669 .endif
670 _s3=            s3
671 _sdhci_acpi=    sdhci_acpi
672 _tpm=           tpm
673 _twa=           twa
674 _vesa=          vesa
675 _viawd=         viawd
676 _virtio=        virtio
677 _wpi=           wpi
678 .if ${MK_SOURCELESS_UCODE} != "no"
679 _wpifw=         wpifw
680 .endif
681 _x86bios=       x86bios
682 .endif
683
684 .if ${MACHINE_CPUARCH} == "amd64"
685 _efirt=         efirt
686 _ioat=          ioat
687 _ixl=           ixl
688 _ixlv=          ixlv
689 _linux64=       linux64
690 _linux_common=  linux_common
691 _ntb=           ntb
692 _pms=           pms
693 _qlxge=         qlxge
694 _qlxgb=         qlxgb
695 _qlxgbe=        qlxgbe
696 _qlnx=          qlnx
697 _sfxge=         sfxge
698
699 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
700 _vmm=           vmm
701 .endif
702 .endif
703
704 .if ${MACHINE_CPUARCH} == "i386"
705 # XXX some of these can move to the general case when de-i386'ed
706 # XXX some of these can move now, but are untested on other architectures.
707 _3dfx=          3dfx
708 _3dfx_linux=    3dfx_linux
709 _aic=           aic
710 _apm=           apm
711 _arcnet=        arcnet
712 .if ${MK_SOURCELESS_UCODE} != "no"
713 _ce=            ce
714 .endif
715 _coff=          coff
716 .if ${MK_SOURCELESS_UCODE} != "no"
717 _cp=            cp
718 .endif
719 _elink=         elink
720 _glxiic=        glxiic
721 _glxsb=         glxsb
722 #_ibcs2=                ibcs2
723 _mse=           mse
724 _ncr=           ncr
725 _ncv=           ncv
726 _nsp=           nsp
727 _pcfclock=      pcfclock
728 _pst=           pst
729 _sbni=          sbni
730 _stg=           stg
731 _cm=            cm
732 .if ${MK_SOURCELESS_UCODE} != "no"
733 _ctau=          ctau
734 .endif
735 _dpt=           dpt
736 _ex=            ex
737 .endif
738
739 .if ${MACHINE_CPUARCH} == "arm"
740 _cfi=           cfi
741 _cpsw=          cpsw
742 .endif
743
744 .if ${MACHINE_CPUARCH} == "powerpc"
745 _agp=           agp
746 _an=            an
747 _bm=            bm
748 _cardbus=       cardbus
749 _cbb=           cbb
750 _cfi=           cfi
751 _cpufreq=       cpufreq
752 _drm=           drm
753 _exca=          exca
754 _pccard=        pccard
755 _wi=            wi
756 .endif
757
758 .if ${MACHINE_ARCH} == "powerpc64"
759 _drm2=          drm2
760 .endif
761 .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc"
762 # Don't build powermac_nvram for powerpcspe, it's never supported.
763 _nvram=         powermac_nvram
764 .endif
765
766 .if ${MACHINE_CPUARCH} == "sparc64"
767 _auxio=         auxio
768 _em=            em
769 _epic=          epic
770 .endif
771
772 .if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
773      ${MACHINE_CPUARCH} == "i386")
774 _cloudabi32=    cloudabi32
775 .endif
776 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
777 _cloudabi64=    cloudabi64
778 .endif
779
780 .endif
781
782 SUBDIR+=${MODULES_EXTRA}
783
784 .for reject in ${WITHOUT_MODULES}
785 SUBDIR:= ${SUBDIR:N${reject}}
786 .endfor
787
788 # Calling kldxref(8) for each module is expensive.
789 .if !defined(NO_XREF)
790 .MAKEFLAGS+=    -DNO_XREF
791 afterinstall: .PHONY
792         @if type kldxref >/dev/null 2>&1; then \
793                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
794                 kldxref ${DESTDIR}${KMODDIR}; \
795         fi
796 .endif
797
798 .include "${SYSDIR}/conf/config.mk"
799
800 SUBDIR:= ${SUBDIR:u:O}
801
802 .include <bsd.subdir.mk>