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