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