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