]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
MFV r313071:
[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         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         ${_chromebook_platform} \
77         ${_ciss} \
78         cloudabi \
79         ${_cloudabi32} \
80         ${_cloudabi64} \
81         ${_cm} \
82         ${_cmx} \
83         ${_coff} \
84         ${_coretemp} \
85         ${_cp} \
86         ${_cpsw} \
87         ${_cpuctl} \
88         ${_cpufreq} \
89         ${_crypto} \
90         ${_cryptodev} \
91         ${_cs} \
92         ${_ctau} \
93         ctl \
94         ${_cxgb} \
95         ${_cxgbe} \
96         dc \
97         dcons \
98         dcons_crom \
99         de \
100         ${_dpms} \
101         ${_dpt} \
102         ${_drm} \
103         ${_drm2} \
104         dummynet \
105         ${_ed} \
106         ${_efirt} \
107         ${_elink} \
108         ${_em} \
109         en \
110         ${_ep} \
111         ${_epic} \
112         esp \
113         ${_et} \
114         evdev \
115         ${_ex} \
116         ${_exca} \
117         ext2fs \
118         ${_fatm} \
119         fdc \
120         fdescfs \
121         ${_fe} \
122         filemon \
123         firewire \
124         firmware \
125         fuse \
126         ${_fxp} \
127         gem \
128         geom \
129         ${_glxiic} \
130         ${_glxsb} \
131         gpio \
132         hatm \
133         hifn \
134         hme \
135         ${_hpt27xx} \
136         ${_hptiop} \
137         ${_hptmv} \
138         ${_hptnr} \
139         ${_hptrr} \
140         hwpmc \
141         ${_hwpmc_mips24k} \
142         ${_hwpmc_mips74k} \
143         ${_hyperv} \
144         i2c \
145         ${_ibcore} \
146         ${_ibcs2} \
147         ${_ichwd} \
148         ${_ida} \
149         if_bridge \
150         if_disc \
151         if_edsc \
152         ${_if_enc} \
153         if_epair \
154         ${_if_gif} \
155         ${_if_gre} \
156         ${_if_me} \
157         if_lagg \
158         ${_if_ndis} \
159         ${_if_stf} \
160         if_tap \
161         if_tun \
162         if_vlan \
163         if_vxlan \
164         ${_iir} \
165         imgact_binmisc \
166         ${_intelspi} \
167         ${_io} \
168         ${_ioat} \
169         ${_ipoib} \
170         ${_ipdivert} \
171         ${_ipfilter} \
172         ${_ipfw} \
173         ipfw_nat \
174         ${_ipfw_nat64} \
175         ${_ipfw_nptv6} \
176         ${_ipmi} \
177         ip6_mroute_mod \
178         ip_mroute_mod \
179         ${_ips} \
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         patm \
290         ${_pccard} \
291         ${_pcfclock} \
292         pcn \
293         ${_pf} \
294         ${_pflog} \
295         ${_pfsync} \
296         plip \
297         ${_pms} \
298         ppbus \
299         ppc \
300         ppi \
301         pps \
302         procfs \
303         proto \
304         pseudofs \
305         ${_pst} \
306         pty  \
307         puc \
308         ${_qlxge} \
309         ${_qlxgb} \
310         ${_qlxgbe} \
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         ${_splash} \
349         ${_sppp} \
350         ste \
351         ${_stg} \
352         stge \
353         ${_streams} \
354         ${_svr4} \
355         ${_sym} \
356         ${_syscons} \
357         sysvipc \
358         ${_ti} \
359         ${_tcp_fastpath} \
360         tests/framework \
361         tests/callout_test \
362         tl \
363         tmpfs \
364         ${_toecore} \
365         ${_tpm} \
366         trm \
367         ${_twa} \
368         twe \
369         tws \
370         tx \
371         ${_txp} \
372         uart \
373         ubsec \
374         udf \
375         udf_iconv \
376         ufs \
377         uinput \
378         unionfs \
379         usb \
380         utopia \
381         ${_vesa} \
382         ${_virtio} \
383         vge \
384         ${_viawd} \
385         videomode \
386         vkbd \
387         ${_vmm} \
388         ${_vmware} \
389         ${_vpo} \
390         vr \
391         vte \
392         vx \
393         ${_vxge} \
394         wb \
395         ${_wbwd} \
396         ${_wi} \
397         wlan \
398         wlan_acl \
399         wlan_amrr \
400         wlan_ccmp \
401         wlan_rssadapt \
402         wlan_tkip \
403         wlan_wep \
404         wlan_xauth \
405         ${_wpi} \
406         ${_wpifw} \
407         ${_x86bios} \
408         ${_xe} \
409         xl \
410         zlib
411
412 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
413 _autofs=        autofs
414 .endif
415
416 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
417 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
418         ${MACHINE_CPUARCH} != "mips" && \
419         ${MACHINE_CPUARCH} != "sparc64"
420 SUBDIR+=        dtrace
421 .endif
422 SUBDIR+=        opensolaris
423 .endif
424
425 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
426 .if exists(${.CURDIR}/../opencrypto)
427 _crypto=        crypto
428 _cryptodev=     cryptodev
429 _random_fortuna=random_fortuna
430 _random_yarrow= random_yarrow
431 _random_other=  random_other
432 .endif
433 .endif
434
435 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
436 SUBDIR+=        cuse
437 .endif
438
439 .if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES)
440 _tcp_fastpath=  tcp/fastpath
441 .endif
442
443 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
444         defined(ALL_MODULES)
445 _carp=          carp
446 _toecore=       toecore
447 _if_enc=        if_enc
448 _if_gif=        if_gif
449 _if_gre=        if_gre
450 .endif
451
452 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
453         defined(ALL_MODULES)
454 _if_stf=        if_stf
455 .endif
456
457 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
458 _if_me=         if_me
459 _ipdivert=      ipdivert
460 _ipfw=          ipfw
461 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
462 _ipfw_nat64=    ipfw_nat64
463 .endif
464 .endif
465
466 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
467 _ipfw_nptv6=    ipfw_nptv6
468 .endif
469
470 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
471 _ipfilter=      ipfilter
472 .endif
473
474 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
475 SUBDIR+=        iscsi
476 SUBDIR+=        iscsi_initiator
477 .endif
478
479 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
480 _nandfs=        nandfs
481 _nandsim=       nandsim
482 .endif
483
484 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
485 _netgraph=      netgraph
486 .endif
487
488 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
489         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
490 _pf=            pf
491 _pflog=         pflog
492 .if ${MK_INET_SUPPORT} != "no"
493 _pfsync=        pfsync
494 .endif
495 .endif
496
497 .if ${MK_SOURCELESS_UCODE} != "no"
498 _bce=           bce
499 _fatm=          fatm
500 _fxp=           fxp
501 _ispfw=         ispfw
502 _sf=            sf
503 _ti=            ti
504 _txp=           txp
505
506 .if ${MACHINE_CPUARCH} != "mips"
507 _mwlfw=         mwlfw
508 _otusfw=        otusfw
509 _ralfw=         ralfw
510 _rtwnfw=        rtwnfw
511 .endif
512 .endif
513
514 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
515         ${MACHINE_CPUARCH} != "mips" && \
516         ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
517         ${MACHINE_CPUARCH} != "riscv"
518 _cxgbe=         cxgbe
519 .endif
520
521 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
522 SUBDIR+=        zfs
523 .endif
524
525 .if ${MACHINE_CPUARCH} == "mips"
526 _hwpmc_mips24k= hwpmc_mips24k
527 _hwpmc_mips74k= hwpmc_mips74k
528 .endif
529
530 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
531         ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
532         ${MACHINE_CPUARCH} != "riscv"
533 _syscons=       syscons
534 _vpo=           vpo
535 .endif
536
537 .if ${MACHINE_CPUARCH} != "mips"
538 # no BUS_SPACE_UNSPECIFIED
539 # No barrier instruction support (specific to this driver)
540 _sym=           sym
541 # intr_disable() is a macro, causes problems
542 .if ${MK_SOURCELESS_UCODE} != "no"
543 _cxgb=          cxgb
544 .endif
545 .endif
546
547 .if ${MACHINE_CPUARCH} == "aarch64"
548 _armv8crypto=   armv8crypto
549 _em=            em
550 .endif
551
552 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
553 _agp=           agp
554 _an=            an
555 _aout=          aout
556 _bios=          bios
557 _bktr=          bktr
558 _bxe=           bxe
559 _cardbus=       cardbus
560 _cbb=           cbb
561 _cpuctl=        cpuctl
562 _cpufreq=       cpufreq
563 _cs=            cs
564 _dpms=          dpms
565 _drm=           drm
566 _drm2=          drm2
567 _ed=            ed
568 _em=            em
569 _ep=            ep
570 _et=            et
571 _exca=          exca
572 _fe=            fe
573 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
574 _ibcore=        ibcore
575 .endif
576 _if_ndis=       if_ndis
577 _io=            io
578 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
579 _ipoib=         ipoib
580 _iser=          iser
581 .endif
582 _ix=            ix
583 _ixv=           ixv
584 _linprocfs=     linprocfs
585 _linsysfs=      linsysfs
586 _linux=         linux
587 _nctgpio=       nctgpio
588 _ndis=          ndis
589 _pccard=        pccard
590 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
591 _rdma=          rdma
592 .endif
593 _safe=          safe
594 _scsi_low=      scsi_low
595 _speaker=       speaker
596 _splash=        splash
597 _sppp=          sppp
598 _vmware=        vmware
599 _vxge=          vxge
600 _wbwd=          wbwd
601 _wi=            wi
602 _xe=            xe
603
604 _aac=           aac
605 _aacraid=       aacraid
606 _acpi=          acpi
607 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
608 _aesni=         aesni
609 .endif
610 _amdsbwd=       amdsbwd
611 _amdtemp=       amdtemp
612 _arcmsr=        arcmsr
613 _asmc=          asmc
614 _bytgpio=       bytgpio
615 _ciss=          ciss
616 _chromebook_platform=   chromebook_platform
617 _cmx=           cmx
618 _coretemp=      coretemp
619 .if ${MK_SOURCELESS_HOST} != "no"
620 _hpt27xx=       hpt27xx
621 .endif
622 _hptiop=        hptiop
623 .if ${MK_SOURCELESS_HOST} != "no"
624 _hptmv=         hptmv
625 _hptnr=         hptnr
626 _hptrr=         hptrr
627 .endif
628 _hyperv=        hyperv
629 _ichwd=         ichwd
630 _ida=           ida
631 _iir=           iir
632 _intelspi=      intelspi
633 _ipmi=          ipmi
634 _ips=           ips
635 _isci=          isci
636 _ipw=           ipw
637 _iwi=           iwi
638 _iwm=           iwm
639 _iwn=           iwn
640 _ixgb=          ixgb
641 .if ${MK_SOURCELESS_UCODE} != "no"
642 _ipwfw=         ipwfw
643 _iwifw=         iwifw
644 _iwmfw=         iwmfw
645 _iwnfw=         iwnfw
646 .endif
647 _mlx4=          mlx4
648 _mlx5=          mlx5
649 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
650         defined(ALL_MODULES)
651 _mlx4en=        mlx4en
652 _mlx5en=        mlx5en
653 .endif
654 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
655 _mlx4ib=        mlx4ib
656 .endif
657 _mly=           mly
658 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
659 _mthca=         mthca
660 .endif
661 _nfe=           nfe
662 _nvd=           nvd
663 _nvme=          nvme
664 _nvram=         nvram
665 _nxge=          nxge
666 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
667 _padlock=       padlock
668 _padlock_rng=   padlock_rng
669 _rdrand_rng=    rdrand_rng
670 .endif
671 _s3=            s3
672 _sdhci_acpi=    sdhci_acpi
673 _tpm=           tpm
674 _twa=           twa
675 _vesa=          vesa
676 _viawd=         viawd
677 _virtio=        virtio
678 _wpi=           wpi
679 .if ${MK_SOURCELESS_UCODE} != "no"
680 _wpifw=         wpifw
681 .endif
682 _x86bios=       x86bios
683 .endif
684
685 .if ${MACHINE_CPUARCH} == "amd64"
686 _efirt=         efirt
687 _ioat=          ioat
688 _ixl=           ixl
689 _ixlv=          ixlv
690 _linux64=       linux64
691 _linux_common=  linux_common
692 _ntb=           ntb
693 _pms=           pms
694 _qlxge=         qlxge
695 _qlxgb=         qlxgb
696 _qlxgbe=        qlxgbe
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 _streams=       streams
731 _stg=           stg
732 _svr4=          svr4
733 .if ${MK_EISA} != "no"
734 _ahb=           ahb
735 .endif
736 _cm=            cm
737 .if ${MK_SOURCELESS_UCODE} != "no"
738 _ctau=          ctau
739 .endif
740 _dpt=           dpt
741 _ex=            ex
742 .endif
743
744 .if ${MACHINE_CPUARCH} == "arm"
745 _cfi=           cfi
746 _cpsw=          cpsw
747 .endif
748
749 .if ${MACHINE_CPUARCH} == "powerpc"
750 _agp=           agp
751 _an=            an
752 _bm=            bm
753 _cardbus=       cardbus
754 _cbb=           cbb
755 _cfi=           cfi
756 _cpufreq=       cpufreq
757 _drm=           drm
758 _exca=          exca
759 _pccard=        pccard
760 _wi=            wi
761 .endif
762
763 .if ${MACHINE_ARCH} == "powerpc64"
764 _drm2=          drm2
765 .endif
766 .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc"
767 # Don't build powermac_nvram for powerpcspe, it's never supported.
768 _nvram=         powermac_nvram
769 .endif
770
771 .if ${MACHINE_CPUARCH} == "sparc64"
772 _auxio=         auxio
773 _em=            em
774 _epic=          epic
775 .endif
776
777 .if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
778      ${MACHINE_CPUARCH} == "i386")
779 _cloudabi32=    cloudabi32
780 .endif
781 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
782 _cloudabi64=    cloudabi64
783 .endif
784
785 .endif
786
787 SUBDIR+=${MODULES_EXTRA}
788
789 .for reject in ${WITHOUT_MODULES}
790 SUBDIR:= ${SUBDIR:N${reject}}
791 .endfor
792
793 # Calling kldxref(8) for each module is expensive.
794 .if !defined(NO_XREF)
795 .MAKEFLAGS+=    -DNO_XREF
796 afterinstall: .PHONY
797         @if type kldxref >/dev/null 2>&1; then \
798                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
799                 kldxref ${DESTDIR}${KMODDIR}; \
800         fi
801 .endif
802
803 .include "${SYSDIR}/conf/config.mk"
804
805 SUBDIR:= ${SUBDIR:u:O}
806
807 .include <bsd.subdir.mk>