1# $FreeBSD$ 2 3SYSDIR?=${.CURDIR}/.. 4.include "${SYSDIR}/conf/kern.opts.mk" 5 6SUBDIR_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) 12SUBDIR=${MODULES_OVERRIDE} 13.else 14SUBDIR= \ 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 ${_streams} \ 354 ${_svr4} \ 355 ${_sym} \ 356 ${_syscons} \ 357 sysvipc \ 358 ${_ti} \ 359 ${_tcp_fastpath} \ 360 ${_tcpmd5} \ 361 tests/framework \ 362 tests/callout_test \ 363 tl \ 364 tmpfs \ 365 ${_toecore} \ 366 ${_tpm} \ 367 trm \ 368 ${_twa} \ 369 twe \ 370 tws \ 371 tx \ 372 ${_txp} \ 373 uart \ 374 ubsec \ 375 udf \ 376 udf_iconv \ 377 ufs \ 378 uinput \ 379 unionfs \ 380 usb \ 381 utopia \ 382 ${_vesa} \ 383 ${_virtio} \ 384 vge \ 385 ${_viawd} \ 386 videomode \ 387 vkbd \ 388 ${_vmm} \ 389 ${_vmware} \ 390 ${_vpo} \ 391 vr \ 392 vte \ 393 vx \ 394 ${_vxge} \ 395 wb \ 396 ${_wbwd} \ 397 ${_wi} \ 398 wlan \ 399 wlan_acl \ 400 wlan_amrr \ 401 wlan_ccmp \ 402 wlan_rssadapt \ 403 wlan_tkip \ 404 wlan_wep \ 405 wlan_xauth \ 406 ${_wpi} \ 407 ${_wpifw} \ 408 ${_x86bios} \ 409 ${_xe} \ 410 xl \ 411 zlib 412 413.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 414_autofs= autofs 415.endif 416 417.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 418.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \ 419 ${MACHINE_CPUARCH} != "mips" && \ 420 ${MACHINE_CPUARCH} != "sparc64" 421SUBDIR+= dtrace 422.endif 423SUBDIR+= opensolaris 424.endif 425 426.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 427.if exists(${.CURDIR}/../opencrypto) 428_crypto= crypto 429_cryptodev= cryptodev 430_random_fortuna=random_fortuna 431_random_yarrow= random_yarrow 432_random_other= random_other 433.endif 434.endif 435 436.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 437SUBDIR+= cuse 438.endif 439 440.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) 441_tcp_fastpath= tcp/fastpath 442.endif 443 444.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 445 defined(ALL_MODULES) 446_carp= carp 447_toecore= toecore 448_if_enc= if_enc 449_if_gif= if_gif 450_if_gre= if_gre 451.if ${MK_IPSEC_SUPPORT} != "no" 452_ipsec= ipsec 453_tcpmd5= tcp/tcpmd5 454.endif 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) 480SUBDIR+= iscsi 481SUBDIR+= 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_sf= sf 508_ti= ti 509_txp= txp 510 511.if ${MACHINE_CPUARCH} != "mips" 512_mwlfw= mwlfw 513_otusfw= otusfw 514_ralfw= ralfw 515_rtwnfw= rtwnfw 516.endif 517.endif 518 519.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 520 ${MACHINE_CPUARCH} != "mips" && \ 521 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 522 ${MACHINE_CPUARCH} != "riscv" 523_cxgbe= cxgbe 524.endif 525 526.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 527SUBDIR+= zfs 528.endif 529 530.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") 531_hwpmc_mips24k= hwpmc_mips24k 532_hwpmc_mips74k= hwpmc_mips74k 533.endif 534 535.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 536 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 537 ${MACHINE_CPUARCH} != "riscv" 538_syscons= syscons 539_vpo= vpo 540.endif 541 542.if ${MACHINE_CPUARCH} != "mips" 543# no BUS_SPACE_UNSPECIFIED 544# No barrier instruction support (specific to this driver) 545_sym= sym 546# intr_disable() is a macro, causes problems 547.if ${MK_SOURCELESS_UCODE} != "no" 548_cxgb= cxgb 549.endif 550.endif 551 552.if ${MACHINE_CPUARCH} == "aarch64" 553_armv8crypto= armv8crypto 554_em= em 555.endif 556 557.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 558_agp= agp 559_an= an 560_aout= aout 561_bios= bios 562_bktr= bktr 563_bxe= bxe 564_cardbus= cardbus 565_cbb= cbb 566_cpuctl= cpuctl 567_cpufreq= cpufreq 568_cs= cs 569_dpms= dpms 570_drm= drm 571_drm2= drm2 572_ed= ed 573_em= em 574_ep= ep 575_et= et 576_exca= exca 577_fe= fe 578.if ${MK_OFED} != "no" || defined(ALL_MODULES) 579_ibcore= ibcore 580.endif 581_if_ndis= if_ndis 582_io= io 583.if ${MK_OFED} != "no" || defined(ALL_MODULES) 584_ipoib= ipoib 585_iser= iser 586.endif 587_ix= ix 588_ixv= ixv 589_linprocfs= linprocfs 590_linsysfs= linsysfs 591_linux= linux 592_nctgpio= nctgpio 593_ndis= ndis 594_pccard= pccard 595.if ${MK_OFED} != "no" || defined(ALL_MODULES) 596_rdma= rdma 597.endif 598_safe= safe 599_scsi_low= scsi_low 600_speaker= speaker 601_splash= splash 602_sppp= sppp 603_vmware= vmware 604_vxge= vxge 605_wbwd= wbwd 606_wi= wi 607_xe= xe 608 609_aac= aac 610_aacraid= aacraid 611_acpi= acpi 612.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 613_aesni= aesni 614.endif 615_amdsbwd= amdsbwd 616_amdtemp= amdtemp 617_arcmsr= arcmsr 618_asmc= asmc 619_bytgpio= bytgpio 620_ciss= ciss 621_chromebook_platform= chromebook_platform 622_cmx= cmx 623_coretemp= coretemp 624.if ${MK_SOURCELESS_HOST} != "no" 625_hpt27xx= hpt27xx 626.endif 627_hptiop= hptiop 628.if ${MK_SOURCELESS_HOST} != "no" 629_hptmv= hptmv 630_hptnr= hptnr 631_hptrr= hptrr 632.endif 633_hyperv= hyperv 634_ichwd= ichwd 635_ida= ida 636_iir= iir 637_intelspi= intelspi 638_ipmi= ipmi 639_ips= ips 640_isci= isci 641_ipw= ipw 642_iwi= iwi 643_iwm= iwm 644_iwn= iwn 645_ixgb= ixgb 646.if ${MK_SOURCELESS_UCODE} != "no" 647_ipwfw= ipwfw 648_iwifw= iwifw 649_iwmfw= iwmfw 650_iwnfw= iwnfw 651.endif 652_mlx4= mlx4 653_mlx5= mlx5 654.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 655 defined(ALL_MODULES) 656_mlx4en= mlx4en 657_mlx5en= mlx5en 658.endif 659.if ${MK_OFED} != "no" || defined(ALL_MODULES) 660_mlx4ib= mlx4ib 661.endif 662_mly= mly 663.if ${MK_OFED} != "no" || defined(ALL_MODULES) 664_mthca= mthca 665.endif 666_nfe= nfe 667_nvd= nvd 668_nvme= nvme 669_nvram= nvram 670_nxge= nxge 671.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 672_padlock= padlock 673_padlock_rng= padlock_rng 674_rdrand_rng= rdrand_rng 675.endif 676_s3= s3 677_sdhci_acpi= sdhci_acpi 678_tpm= tpm 679_twa= twa 680_vesa= vesa 681_viawd= viawd 682_virtio= virtio 683_wpi= wpi 684.if ${MK_SOURCELESS_UCODE} != "no" 685_wpifw= wpifw 686.endif 687_x86bios= x86bios 688.endif 689 690.if ${MACHINE_CPUARCH} == "amd64" 691_efirt= efirt 692_ioat= ioat 693_ixl= ixl 694_ixlv= ixlv 695_linux64= linux64 696_linux_common= linux_common 697_ntb= ntb 698_pms= pms 699_qlxge= qlxge 700_qlxgb= qlxgb 701_qlxgbe= qlxgbe 702_sfxge= sfxge 703 704.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 705_vmm= vmm 706.endif 707.endif 708 709.if ${MACHINE_CPUARCH} == "i386" 710# XXX some of these can move to the general case when de-i386'ed 711# XXX some of these can move now, but are untested on other architectures. 712_3dfx= 3dfx 713_3dfx_linux= 3dfx_linux 714_aic= aic 715_apm= apm 716_arcnet= arcnet 717.if ${MK_SOURCELESS_UCODE} != "no" 718_ce= ce 719.endif 720_coff= coff 721.if ${MK_SOURCELESS_UCODE} != "no" 722_cp= cp 723.endif 724_elink= elink 725_glxiic= glxiic 726_glxsb= glxsb 727#_ibcs2= ibcs2 728_mse= mse 729_ncr= ncr 730_ncv= ncv 731_nsp= nsp 732_pcfclock= pcfclock 733_pst= pst 734_sbni= sbni 735_streams= streams 736_stg= stg 737_svr4= svr4 738_cm= cm 739.if ${MK_SOURCELESS_UCODE} != "no" 740_ctau= ctau 741.endif 742_dpt= dpt 743_ex= ex 744.endif 745 746.if ${MACHINE_CPUARCH} == "arm" 747_cfi= cfi 748_cpsw= cpsw 749.endif 750 751.if ${MACHINE_CPUARCH} == "powerpc" 752_agp= agp 753_an= an 754_bm= bm 755_cardbus= cardbus 756_cbb= cbb 757_cfi= cfi 758_cpufreq= cpufreq 759_drm= drm 760_exca= exca 761_pccard= pccard 762_wi= wi 763.endif 764 765.if ${MACHINE_ARCH} == "powerpc64" 766_drm2= drm2 767.endif 768.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 769# Don't build powermac_nvram for powerpcspe, it's never supported. 770_nvram= powermac_nvram 771.endif 772 773.if ${MACHINE_CPUARCH} == "sparc64" 774_auxio= auxio 775_em= em 776_epic= epic 777.endif 778 779.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 780 ${MACHINE_CPUARCH} == "i386") 781_cloudabi32= cloudabi32 782.endif 783.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 784_cloudabi64= cloudabi64 785.endif 786 787.endif 788 789SUBDIR+=${MODULES_EXTRA} 790 791.for reject in ${WITHOUT_MODULES} 792SUBDIR:= ${SUBDIR:N${reject}} 793.endfor 794 795# Calling kldxref(8) for each module is expensive. 796.if !defined(NO_XREF) 797.MAKEFLAGS+= -DNO_XREF 798afterinstall: .PHONY 799 @if type kldxref >/dev/null 2>&1; then \ 800 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 801 kldxref ${DESTDIR}${KMODDIR}; \ 802 fi 803.endif 804 805.include "${SYSDIR}/conf/config.mk" 806 807SUBDIR:= ${SUBDIR:u:O} 808 809.include <bsd.subdir.mk> 810