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