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