]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
Remove SVR4 (System V Release 4) binary compatibility support.
[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         ahci \
31         ${_aic} \
32         aic7xxx \
33         alc \
34         ale \
35         alq \
36         ${_amdsbwd} \
37         ${_amdtemp} \
38         amr \
39         ${_an} \
40         ${_aout} \
41         ${_apm} \
42         ${_arcmsr} \
43         ${_arcnet} \
44         ${_armv8crypto} \
45         ${_asmc} \
46         ata \
47         ath \
48         ath_pci \
49         ${_autofs} \
50         ${_auxio} \
51         ${_bce} \
52         bfe \
53         bge \
54         bhnd \
55         ${_bxe} \
56         ${_bios} \
57         ${_bktr} \
58         ${_bm} \
59         bnxt \
60         bridgestp \
61         bwi \
62         bwn \
63         bwn_pci \
64         ${_bytgpio} \
65         cam \
66         ${_cardbus} \
67         ${_carp} \
68         cas \
69         ${_cbb} \
70         cc \
71         cd9660 \
72         cd9660_iconv \
73         ${_ce} \
74         ${_cfi} \
75         ${_chromebook_platform} \
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         ${_ctau} \
92         ctl \
93         ${_cxgb} \
94         ${_cxgbe} \
95         dc \
96         dcons \
97         dcons_crom \
98         de \
99         ${_dpms} \
100         ${_dpt} \
101         ${_drm} \
102         ${_drm2} \
103         dummynet \
104         ${_ed} \
105         ${_efirt} \
106         ${_elink} \
107         ${_em} \
108         en \
109         ${_ep} \
110         ${_epic} \
111         esp \
112         ${_et} \
113         evdev \
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         ${_hwpmc_mips24k} \
141         ${_hwpmc_mips74k} \
142         ${_hyperv} \
143         i2c \
144         ${_ibcore} \
145         ${_ibcs2} \
146         ${_ichwd} \
147         ${_ida} \
148         if_bridge \
149         if_disc \
150         if_edsc \
151         ${_if_enc} \
152         if_epair \
153         ${_if_gif} \
154         ${_if_gre} \
155         ${_if_me} \
156         if_lagg \
157         ${_if_ndis} \
158         ${_if_stf} \
159         if_tap \
160         if_tun \
161         if_vlan \
162         if_vxlan \
163         ${_iir} \
164         imgact_binmisc \
165         ${_intelspi} \
166         ${_io} \
167         ${_ioat} \
168         ${_ipoib} \
169         ${_ipdivert} \
170         ${_ipfilter} \
171         ${_ipfw} \
172         ipfw_nat \
173         ${_ipfw_nat64} \
174         ${_ipfw_nptv6} \
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         patm \
290         ${_pccard} \
291         ${_pcfclock} \
292         pcn \
293         ${_pf} \
294         ${_pflog} \
295         ${_pfsync} \
296         plip \
297         ${_pms} \
298         ppbus \
299         ppc \
300         ppi \
301         pps \
302         procfs \
303         proto \
304         pseudofs \
305         ${_pst} \
306         pty  \
307         puc \
308         ${_qlxge} \
309         ${_qlxgb} \
310         ${_qlxgbe} \
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         ${_splash} \
349         ${_sppp} \
350         ste \
351         ${_stg} \
352         stge \
353         ${_sym} \
354         ${_syscons} \
355         sysvipc \
356         ${_ti} \
357         ${_tcp_fastpath} \
358         ${_tcpmd5} \
359         tests/framework \
360         tests/callout_test \
361         tl \
362         tmpfs \
363         ${_toecore} \
364         ${_tpm} \
365         trm \
366         ${_twa} \
367         twe \
368         tws \
369         tx \
370         ${_txp} \
371         uart \
372         ubsec \
373         udf \
374         udf_iconv \
375         ufs \
376         uinput \
377         unionfs \
378         usb \
379         utopia \
380         ${_vesa} \
381         ${_virtio} \
382         vge \
383         ${_viawd} \
384         videomode \
385         vkbd \
386         ${_vmm} \
387         ${_vmware} \
388         ${_vpo} \
389         vr \
390         vte \
391         vx \
392         ${_vxge} \
393         wb \
394         ${_wbwd} \
395         ${_wi} \
396         wlan \
397         wlan_acl \
398         wlan_amrr \
399         wlan_ccmp \
400         wlan_rssadapt \
401         wlan_tkip \
402         wlan_wep \
403         wlan_xauth \
404         ${_wpi} \
405         ${_wpifw} \
406         ${_x86bios} \
407         ${_xe} \
408         xl \
409         zlib
410
411 .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
412 _autofs=        autofs
413 .endif
414
415 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
416 .if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
417         ${MACHINE_CPUARCH} != "mips" && \
418         ${MACHINE_CPUARCH} != "sparc64"
419 SUBDIR+=        dtrace
420 .endif
421 SUBDIR+=        opensolaris
422 .endif
423
424 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
425 .if exists(${.CURDIR}/../opencrypto)
426 _crypto=        crypto
427 _cryptodev=     cryptodev
428 _random_fortuna=random_fortuna
429 _random_yarrow= random_yarrow
430 _random_other=  random_other
431 .endif
432 .endif
433
434 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
435 SUBDIR+=        cuse
436 .endif
437
438 .if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES)
439 _tcp_fastpath=  tcp/fastpath
440 .endif
441
442 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
443         defined(ALL_MODULES)
444 _carp=          carp
445 _toecore=       toecore
446 _if_enc=        if_enc
447 _if_gif=        if_gif
448 _if_gre=        if_gre
449 .if ${MK_IPSEC_SUPPORT} != "no"
450 _ipsec=         ipsec
451 _tcpmd5=        tcp/tcpmd5
452 .endif
453 .endif
454
455 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
456         defined(ALL_MODULES)
457 _if_stf=        if_stf
458 .endif
459
460 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
461 _if_me=         if_me
462 _ipdivert=      ipdivert
463 _ipfw=          ipfw
464 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
465 _ipfw_nat64=    ipfw_nat64
466 .endif
467 .endif
468
469 .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES)
470 _ipfw_nptv6=    ipfw_nptv6
471 .endif
472
473 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
474 _ipfilter=      ipfilter
475 .endif
476
477 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
478 SUBDIR+=        iscsi
479 SUBDIR+=        iscsi_initiator
480 .endif
481
482 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
483 _nandfs=        nandfs
484 _nandsim=       nandsim
485 .endif
486
487 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
488 _netgraph=      netgraph
489 .endif
490
491 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
492         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
493 _pf=            pf
494 _pflog=         pflog
495 .if ${MK_INET_SUPPORT} != "no"
496 _pfsync=        pfsync
497 .endif
498 .endif
499
500 .if ${MK_SOURCELESS_UCODE} != "no"
501 _bce=           bce
502 _fatm=          fatm
503 _fxp=           fxp
504 _ispfw=         ispfw
505 _sf=            sf
506 _ti=            ti
507 _txp=           txp
508
509 .if ${MACHINE_CPUARCH} != "mips"
510 _mwlfw=         mwlfw
511 _otusfw=        otusfw
512 _ralfw=         ralfw
513 _rtwnfw=        rtwnfw
514 .endif
515 .endif
516
517 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
518         ${MACHINE_CPUARCH} != "mips" && \
519         ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
520         ${MACHINE_CPUARCH} != "riscv"
521 _cxgbe=         cxgbe
522 .endif
523
524 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
525 SUBDIR+=        zfs
526 .endif
527
528 .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "")
529 _hwpmc_mips24k= hwpmc_mips24k
530 _hwpmc_mips74k= hwpmc_mips74k
531 .endif
532
533 .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
534         ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
535         ${MACHINE_CPUARCH} != "riscv"
536 _syscons=       syscons
537 _vpo=           vpo
538 .endif
539
540 .if ${MACHINE_CPUARCH} != "mips"
541 # no BUS_SPACE_UNSPECIFIED
542 # No barrier instruction support (specific to this driver)
543 _sym=           sym
544 # intr_disable() is a macro, causes problems
545 .if ${MK_SOURCELESS_UCODE} != "no"
546 _cxgb=          cxgb
547 .endif
548 .endif
549
550 .if ${MACHINE_CPUARCH} == "aarch64"
551 _armv8crypto=   armv8crypto
552 _em=            em
553 .endif
554
555 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
556 _agp=           agp
557 _an=            an
558 _aout=          aout
559 _bios=          bios
560 _bktr=          bktr
561 _bxe=           bxe
562 _cardbus=       cardbus
563 _cbb=           cbb
564 _cpuctl=        cpuctl
565 _cpufreq=       cpufreq
566 _cs=            cs
567 _dpms=          dpms
568 _drm=           drm
569 _drm2=          drm2
570 _ed=            ed
571 _em=            em
572 _ep=            ep
573 _et=            et
574 _exca=          exca
575 _fe=            fe
576 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
577 _ibcore=        ibcore
578 .endif
579 _if_ndis=       if_ndis
580 _io=            io
581 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
582 _ipoib=         ipoib
583 _iser=          iser
584 .endif
585 _ix=            ix
586 _ixv=           ixv
587 _linprocfs=     linprocfs
588 _linsysfs=      linsysfs
589 _linux=         linux
590 _nctgpio=       nctgpio
591 _ndis=          ndis
592 _pccard=        pccard
593 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
594 _rdma=          rdma
595 .endif
596 _safe=          safe
597 _scsi_low=      scsi_low
598 _speaker=       speaker
599 _splash=        splash
600 _sppp=          sppp
601 _vmware=        vmware
602 _vxge=          vxge
603 _wbwd=          wbwd
604 _wi=            wi
605 _xe=            xe
606
607 _aac=           aac
608 _aacraid=       aacraid
609 _acpi=          acpi
610 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
611 _aesni=         aesni
612 .endif
613 _amdsbwd=       amdsbwd
614 _amdtemp=       amdtemp
615 _arcmsr=        arcmsr
616 _asmc=          asmc
617 _bytgpio=       bytgpio
618 _ciss=          ciss
619 _chromebook_platform=   chromebook_platform
620 _cmx=           cmx
621 _coretemp=      coretemp
622 .if ${MK_SOURCELESS_HOST} != "no"
623 _hpt27xx=       hpt27xx
624 .endif
625 _hptiop=        hptiop
626 .if ${MK_SOURCELESS_HOST} != "no"
627 _hptmv=         hptmv
628 _hptnr=         hptnr
629 _hptrr=         hptrr
630 .endif
631 _hyperv=        hyperv
632 _ichwd=         ichwd
633 _ida=           ida
634 _iir=           iir
635 _intelspi=      intelspi
636 _ipmi=          ipmi
637 _ips=           ips
638 _isci=          isci
639 _ipw=           ipw
640 _iwi=           iwi
641 _iwm=           iwm
642 _iwn=           iwn
643 _ixgb=          ixgb
644 .if ${MK_SOURCELESS_UCODE} != "no"
645 _ipwfw=         ipwfw
646 _iwifw=         iwifw
647 _iwmfw=         iwmfw
648 _iwnfw=         iwnfw
649 .endif
650 _mlx4=          mlx4
651 _mlx5=          mlx5
652 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
653         defined(ALL_MODULES)
654 _mlx4en=        mlx4en
655 _mlx5en=        mlx5en
656 .endif
657 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
658 _mlx4ib=        mlx4ib
659 .endif
660 _mly=           mly
661 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
662 _mthca=         mthca
663 .endif
664 _nfe=           nfe
665 _nvd=           nvd
666 _nvme=          nvme
667 _nvram=         nvram
668 _nxge=          nxge
669 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
670 _padlock=       padlock
671 _padlock_rng=   padlock_rng
672 _rdrand_rng=    rdrand_rng
673 .endif
674 _s3=            s3
675 _sdhci_acpi=    sdhci_acpi
676 _tpm=           tpm
677 _twa=           twa
678 _vesa=          vesa
679 _viawd=         viawd
680 _virtio=        virtio
681 _wpi=           wpi
682 .if ${MK_SOURCELESS_UCODE} != "no"
683 _wpifw=         wpifw
684 .endif
685 _x86bios=       x86bios
686 .endif
687
688 .if ${MACHINE_CPUARCH} == "amd64"
689 _efirt=         efirt
690 _ioat=          ioat
691 _ixl=           ixl
692 _ixlv=          ixlv
693 _linux64=       linux64
694 _linux_common=  linux_common
695 _ntb=           ntb
696 _pms=           pms
697 _qlxge=         qlxge
698 _qlxgb=         qlxgb
699 _qlxgbe=        qlxgbe
700 _sfxge=         sfxge
701
702 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
703 _vmm=           vmm
704 .endif
705 .endif
706
707 .if ${MACHINE_CPUARCH} == "i386"
708 # XXX some of these can move to the general case when de-i386'ed
709 # XXX some of these can move now, but are untested on other architectures.
710 _3dfx=          3dfx
711 _3dfx_linux=    3dfx_linux
712 _aic=           aic
713 _apm=           apm
714 _arcnet=        arcnet
715 .if ${MK_SOURCELESS_UCODE} != "no"
716 _ce=            ce
717 .endif
718 _coff=          coff
719 .if ${MK_SOURCELESS_UCODE} != "no"
720 _cp=            cp
721 .endif
722 _elink=         elink
723 _glxiic=        glxiic
724 _glxsb=         glxsb
725 #_ibcs2=                ibcs2
726 _mse=           mse
727 _ncr=           ncr
728 _ncv=           ncv
729 _nsp=           nsp
730 _pcfclock=      pcfclock
731 _pst=           pst
732 _sbni=          sbni
733 _stg=           stg
734 _cm=            cm
735 .if ${MK_SOURCELESS_UCODE} != "no"
736 _ctau=          ctau
737 .endif
738 _dpt=           dpt
739 _ex=            ex
740 .endif
741
742 .if ${MACHINE_CPUARCH} == "arm"
743 _cfi=           cfi
744 _cpsw=          cpsw
745 .endif
746
747 .if ${MACHINE_CPUARCH} == "powerpc"
748 _agp=           agp
749 _an=            an
750 _bm=            bm
751 _cardbus=       cardbus
752 _cbb=           cbb
753 _cfi=           cfi
754 _cpufreq=       cpufreq
755 _drm=           drm
756 _exca=          exca
757 _pccard=        pccard
758 _wi=            wi
759 .endif
760
761 .if ${MACHINE_ARCH} == "powerpc64"
762 _drm2=          drm2
763 .endif
764 .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc"
765 # Don't build powermac_nvram for powerpcspe, it's never supported.
766 _nvram=         powermac_nvram
767 .endif
768
769 .if ${MACHINE_CPUARCH} == "sparc64"
770 _auxio=         auxio
771 _em=            em
772 _epic=          epic
773 .endif
774
775 .if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
776      ${MACHINE_CPUARCH} == "i386")
777 _cloudabi32=    cloudabi32
778 .endif
779 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
780 _cloudabi64=    cloudabi64
781 .endif
782
783 .endif
784
785 SUBDIR+=${MODULES_EXTRA}
786
787 .for reject in ${WITHOUT_MODULES}
788 SUBDIR:= ${SUBDIR:N${reject}}
789 .endfor
790
791 # Calling kldxref(8) for each module is expensive.
792 .if !defined(NO_XREF)
793 .MAKEFLAGS+=    -DNO_XREF
794 afterinstall: .PHONY
795         @if type kldxref >/dev/null 2>&1; then \
796                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
797                 kldxref ${DESTDIR}${KMODDIR}; \
798         fi
799 .endif
800
801 .include "${SYSDIR}/conf/config.mk"
802
803 SUBDIR:= ${SUBDIR:u:O}
804
805 .include <bsd.subdir.mk>