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