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