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