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