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