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