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 ${_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" 419SUBDIR+= dtrace 420.endif 421SUBDIR+= 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) 435SUBDIR+= 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) 478SUBDIR+= iscsi 479SUBDIR+= 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) 525SUBDIR+= 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 785SUBDIR+=${MODULES_EXTRA} 786 787.for reject in ${WITHOUT_MODULES} 788SUBDIR:= ${SUBDIR:N${reject}} 789.endfor 790 791# Calling kldxref(8) for each module is expensive. 792.if !defined(NO_XREF) 793.MAKEFLAGS+= -DNO_XREF 794afterinstall: .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 803SUBDIR:= ${SUBDIR:u:O} 804 805.include <bsd.subdir.mk> 806