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