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