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