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