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