]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
Import zstandard 1.1.4 in base
[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_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         ${_ipfw_pmod} \
177         ${_ipmi} \
178         ip6_mroute_mod \
179         ip_mroute_mod \
180         ${_ips} \
181         ${_ipsec} \
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         ${_netgraph} \
269         ${_nfe} \
270         nfscl \
271         nfscommon \
272         nfsd \
273         nfslock \
274         nfslockd \
275         nfssvc \
276         nge \
277         nmdm \
278         ${_nsp} \
279         nullfs \
280         ${_ntb} \
281         ${_nvd} \
282         ${_nvme} \
283         ${_nvram} \
284         ${_nxge} \
285         oce \
286         otus \
287         ${_otusfw} \
288         ow \
289         ${_padlock} \
290         ${_padlock_rng} \
291         patm \
292         ${_pccard} \
293         ${_pcfclock} \
294         pcn \
295         ${_pf} \
296         ${_pflog} \
297         ${_pfsync} \
298         plip \
299         ${_pms} \
300         ppbus \
301         ppc \
302         ppi \
303         pps \
304         procfs \
305         proto \
306         pseudofs \
307         ${_pst} \
308         pty  \
309         puc \
310         ${_qlxge} \
311         ${_qlxgb} \
312         ${_qlxgbe} \
313         ${_qlnx} \
314         ral \
315         ${_ralfw} \
316         ${_random_fortuna} \
317         ${_random_yarrow} \
318         ${_random_other} \
319         rc4 \
320         ${_rdma} \
321         ${_rdrand_rng} \
322         re \
323         rl \
324         rtwn \
325         rtwn_pci \
326         rtwn_usb \
327         ${_rtwnfw} \
328         ${_s3} \
329         ${_safe} \
330         ${_sbni} \
331         scc \
332         ${_scsi_low} \
333         sdhci \
334         ${_sdhci_acpi} \
335         sdhci_pci \
336         sem \
337         send \
338         ${_sf} \
339         ${_sfxge} \
340         sge \
341         siba_bwn \
342         siftr \
343         siis \
344         sis \
345         sk \
346         smbfs \
347         sn \
348         snp \
349         sound \
350         ${_speaker} \
351         spigen \
352         ${_splash} \
353         ${_sppp} \
354         ste \
355         ${_stg} \
356         stge \
357         ${_sym} \
358         ${_syscons} \
359         sysvipc \
360         tcp \
361         ${_ti} \
362         tests/framework \
363         tests/callout_test \
364         tl \
365         tmpfs \
366         ${_toecore} \
367         ${_tpm} \
368         trm \
369         ${_twa} \
370         twe \
371         tws \
372         tx \
373         ${_txp} \
374         uart \
375         ubsec \
376         udf \
377         udf_iconv \
378         ufs \
379         uinput \
380         unionfs \
381         usb \
382         utopia \
383         ${_vesa} \
384         ${_virtio} \
385         vge \
386         ${_viawd} \
387         videomode \
388         vkbd \
389         ${_vmm} \
390         ${_vmware} \
391         ${_vpo} \
392         vr \
393         vte \
394         vx \
395         ${_vxge} \
396         wb \
397         ${_wbwd} \
398         ${_wi} \
399         wlan \
400         wlan_acl \
401         wlan_amrr \
402         wlan_ccmp \
403         wlan_rssadapt \
404         wlan_tkip \
405         wlan_wep \
406         wlan_xauth \
407         ${_wpi} \
408         ${_wpifw} \
409         ${_x86bios} \
410         ${_xe} \
411         xl \
412         zlib
413
414 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
415 _autofs=        autofs
416 .endif
417
418 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
419 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
420         ${MACHINE_CPUARCH} != "mips" && \
421         ${MACHINE_CPUARCH} != "sparc64"
422 SUBDIR+=        dtrace
423 .endif
424 SUBDIR+=        opensolaris
425 .endif
426
427 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
428 .if exists(${SRCTOP}/sys/opencrypto)
429 _crypto=        crypto
430 _cryptodev=     cryptodev
431 _random_fortuna=random_fortuna
432 _random_yarrow= random_yarrow
433 _random_other=  random_other
434 .endif
435 .endif
436
437 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
438 SUBDIR+=        cuse
439 .endif
440
441 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
442         defined(ALL_MODULES)
443 _carp=          carp
444 _toecore=       toecore
445 _if_enc=        if_enc
446 _if_gif=        if_gif
447 _if_gre=        if_gre
448 _ipfw_pmod=     ipfw_pmod
449 .if ${MK_IPSEC_SUPPORT} != "no"
450 _ipsec=         ipsec
451 .endif
452 .endif
453
454 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
455         defined(ALL_MODULES)
456 _if_stf=        if_stf
457 .endif
458
459 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
460 _if_me=         if_me
461 _ipdivert=      ipdivert
462 _ipfw=          ipfw
463 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
464 _ipfw_nat64=    ipfw_nat64
465 .endif
466 .endif
467
468 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
469 _ipfw_nptv6=    ipfw_nptv6
470 .endif
471
472 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
473 _ipfilter=      ipfilter
474 .endif
475
476 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
477 SUBDIR+=        cfiscsi
478 SUBDIR+=        iscsi
479 SUBDIR+=        iscsi_initiator
480 .endif
481
482 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
483 _nandfs=        nandfs
484 _nandsim=       nandsim
485 .endif
486
487 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
488 _netgraph=      netgraph
489 .endif
490
491 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
492         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
493 _pf=            pf
494 _pflog=         pflog
495 .if ${MK_INET_SUPPORT} != "no"
496 _pfsync=        pfsync
497 .endif
498 .endif
499
500 .if ${MK_SOURCELESS_UCODE} != "no"
501 _bce=           bce
502 _fatm=          fatm
503 _fxp=           fxp
504 _ispfw=         ispfw
505 _sf=            sf
506 _ti=            ti
507 _txp=           txp
508
509 .if ${MACHINE_CPUARCH} != "mips"
510 _mwlfw=         mwlfw
511 _otusfw=        otusfw
512 _ralfw=         ralfw
513 _rtwnfw=        rtwnfw
514 .endif
515 .endif
516
517 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
518         ${MACHINE_CPUARCH} != "mips" && \
519         ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
520         ${MACHINE_CPUARCH} != "riscv"
521 _cxgbe=         cxgbe
522 .endif
523
524 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
525 SUBDIR+=        zfs
526 .endif
527
528 .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "")
529 _hwpmc_mips24k= hwpmc_mips24k
530 _hwpmc_mips74k= hwpmc_mips74k
531 .endif
532
533 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
534         ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
535         ${MACHINE_CPUARCH} != "riscv"
536 _syscons=       syscons
537 _vpo=           vpo
538 .endif
539
540 .if ${MACHINE_CPUARCH} != "mips"
541 # no BUS_SPACE_UNSPECIFIED
542 # No barrier instruction support (specific to this driver)
543 _sym=           sym
544 # intr_disable() is a macro, causes problems
545 .if ${MK_SOURCELESS_UCODE} != "no"
546 _cxgb=          cxgb
547 .endif
548 .endif
549
550 .if ${MACHINE_CPUARCH} == "aarch64"
551 _armv8crypto=   armv8crypto
552 _em=            em
553 .endif
554
555 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
556 _agp=           agp
557 _an=            an
558 _aout=          aout
559 _bios=          bios
560 _bktr=          bktr
561 _bxe=           bxe
562 _cardbus=       cardbus
563 _cbb=           cbb
564 _cpuctl=        cpuctl
565 _cpufreq=       cpufreq
566 _cs=            cs
567 _dpms=          dpms
568 _drm=           drm
569 _drm2=          drm2
570 _ed=            ed
571 _em=            em
572 _ep=            ep
573 _et=            et
574 _exca=          exca
575 _fe=            fe
576 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
577 _ibcore=        ibcore
578 .endif
579 _if_ndis=       if_ndis
580 _io=            io
581 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
582 _ipoib=         ipoib
583 _iser=          iser
584 .endif
585 _ix=            ix
586 _ixv=           ixv
587 _linprocfs=     linprocfs
588 _linsysfs=      linsysfs
589 _linux=         linux
590 _nctgpio=       nctgpio
591 _ndis=          ndis
592 _pccard=        pccard
593 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
594 _rdma=          rdma
595 .endif
596 _safe=          safe
597 _scsi_low=      scsi_low
598 _speaker=       speaker
599 _splash=        splash
600 _sppp=          sppp
601 _vmware=        vmware
602 _vxge=          vxge
603 _wbwd=          wbwd
604 _wi=            wi
605 _xe=            xe
606
607 _aac=           aac
608 _aacraid=       aacraid
609 _acpi=          acpi
610 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
611 _aesni=         aesni
612 .endif
613 _amd_ecc_inject=amd_ecc_inject
614 _amdsbwd=       amdsbwd
615 _amdtemp=       amdtemp
616 _arcmsr=        arcmsr
617 _asmc=          asmc
618 _bytgpio=       bytgpio
619 _ciss=          ciss
620 _chromebook_platform=   chromebook_platform
621 _cmx=           cmx
622 _coretemp=      coretemp
623 .if ${MK_SOURCELESS_HOST} != "no"
624 _hpt27xx=       hpt27xx
625 .endif
626 _hptiop=        hptiop
627 .if ${MK_SOURCELESS_HOST} != "no"
628 _hptmv=         hptmv
629 _hptnr=         hptnr
630 _hptrr=         hptrr
631 .endif
632 _hyperv=        hyperv
633 _ichwd=         ichwd
634 _ida=           ida
635 _iir=           iir
636 _intelspi=      intelspi
637 _ipmi=          ipmi
638 _ips=           ips
639 _isci=          isci
640 _ipw=           ipw
641 _iwi=           iwi
642 _iwm=           iwm
643 _iwn=           iwn
644 _ixgb=          ixgb
645 .if ${MK_SOURCELESS_UCODE} != "no"
646 _ipwfw=         ipwfw
647 _iwifw=         iwifw
648 _iwmfw=         iwmfw
649 _iwnfw=         iwnfw
650 .endif
651 _mlx4=          mlx4
652 _mlx5=          mlx5
653 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
654         defined(ALL_MODULES)
655 _mlx4en=        mlx4en
656 _mlx5en=        mlx5en
657 .endif
658 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
659 _mlx4ib=        mlx4ib
660 .endif
661 _mly=           mly
662 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
663 _mthca=         mthca
664 .endif
665 _nfe=           nfe
666 _nvd=           nvd
667 _nvme=          nvme
668 _nvram=         nvram
669 _nxge=          nxge
670 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
671 _padlock=       padlock
672 _padlock_rng=   padlock_rng
673 _rdrand_rng=    rdrand_rng
674 .endif
675 _s3=            s3
676 _sdhci_acpi=    sdhci_acpi
677 _tpm=           tpm
678 _twa=           twa
679 _vesa=          vesa
680 _viawd=         viawd
681 _virtio=        virtio
682 _wpi=           wpi
683 .if ${MK_SOURCELESS_UCODE} != "no"
684 _wpifw=         wpifw
685 .endif
686 _x86bios=       x86bios
687 .endif
688
689 .if ${MACHINE_CPUARCH} == "amd64"
690 _efirt=         efirt
691 _ioat=          ioat
692 _ixl=           ixl
693 _ixlv=          ixlv
694 _linux64=       linux64
695 _linux_common=  linux_common
696 _ntb=           ntb
697 _pms=           pms
698 _qlxge=         qlxge
699 _qlxgb=         qlxgb
700 _qlxgbe=        qlxgbe
701 _qlnx=          qlnx
702 _sfxge=         sfxge
703
704 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
705 _vmm=           vmm
706 .endif
707 .endif
708
709 .if ${MACHINE_CPUARCH} == "i386"
710 # XXX some of these can move to the general case when de-i386'ed
711 # XXX some of these can move now, but are untested on other architectures.
712 _3dfx=          3dfx
713 _3dfx_linux=    3dfx_linux
714 _aic=           aic
715 _apm=           apm
716 _arcnet=        arcnet
717 .if ${MK_SOURCELESS_UCODE} != "no"
718 _ce=            ce
719 .endif
720 _coff=          coff
721 .if ${MK_SOURCELESS_UCODE} != "no"
722 _cp=            cp
723 .endif
724 _elink=         elink
725 _glxiic=        glxiic
726 _glxsb=         glxsb
727 #_ibcs2=                ibcs2
728 _mse=           mse
729 _ncr=           ncr
730 _ncv=           ncv
731 _nsp=           nsp
732 _pcfclock=      pcfclock
733 _pst=           pst
734 _sbni=          sbni
735 _stg=           stg
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>