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_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 ${_ipfw_pmod} \ 177 ${_ipmi} \ 178 ip6_mroute_mod \ 179 ip_mroute_mod \ 180 ${_ips} \ 181 ${_ipsec} \ 182 ${_ipw} \ 183 ${_ipwfw} \ 184 ${_isci} \ 185 ${_iser} \ 186 isp \ 187 ${_ispfw} \ 188 ${_iwi} \ 189 ${_iwifw} \ 190 ${_iwm} \ 191 ${_iwmfw} \ 192 ${_iwn} \ 193 ${_iwnfw} \ 194 ${_ix} \ 195 ${_ixv} \ 196 ${_ixgb} \ 197 ${_ixl} \ 198 ${_ixlv} \ 199 jme \ 200 joy \ 201 kbdmux \ 202 kgssapi \ 203 kgssapi_krb5 \ 204 khelp \ 205 krpc \ 206 ksyms \ 207 le \ 208 lge \ 209 libalias \ 210 libiconv \ 211 libmbpool \ 212 libmchain \ 213 ${_linprocfs} \ 214 ${_linsysfs} \ 215 ${_linux} \ 216 ${_linux_common} \ 217 ${_linux64} \ 218 linuxkpi \ 219 lmc \ 220 lpt \ 221 mac_biba \ 222 mac_bsdextended \ 223 mac_ifoff \ 224 mac_lomac \ 225 mac_mls \ 226 mac_none \ 227 mac_partition \ 228 mac_portacl \ 229 mac_seeotheruids \ 230 mac_stub \ 231 mac_test \ 232 malo \ 233 md \ 234 mdio \ 235 mem \ 236 mfi \ 237 mii \ 238 mlx \ 239 ${_mlx4} \ 240 ${_mlx4ib} \ 241 ${_mlx4en} \ 242 ${_mlx5} \ 243 ${_mlx5en} \ 244 ${_mly} \ 245 mmc \ 246 mmcsd \ 247 mpr \ 248 mps \ 249 mpt \ 250 mqueue \ 251 mrsas \ 252 msdosfs \ 253 msdosfs_iconv \ 254 ${_mse} \ 255 msk \ 256 ${_mthca} \ 257 mvs \ 258 mwl \ 259 ${_mwlfw} \ 260 mxge \ 261 my \ 262 ${_nandfs} \ 263 ${_nandsim} \ 264 ${_ncr} \ 265 ${_nctgpio} \ 266 ${_ncv} \ 267 ${_ndis} \ 268 ${_netgraph} \ 269 ${_nfe} \ 270 nfscl \ 271 nfscommon \ 272 nfsd \ 273 nfslock \ 274 nfslockd \ 275 nfssvc \ 276 nge \ 277 nmdm \ 278 ${_nsp} \ 279 nullfs \ 280 ${_ntb} \ 281 ${_nvd} \ 282 ${_nvme} \ 283 ${_nvram} \ 284 ${_nxge} \ 285 oce \ 286 otus \ 287 ${_otusfw} \ 288 ow \ 289 ${_padlock} \ 290 ${_padlock_rng} \ 291 patm \ 292 ${_pccard} \ 293 ${_pcfclock} \ 294 pcn \ 295 ${_pf} \ 296 ${_pflog} \ 297 ${_pfsync} \ 298 plip \ 299 ${_pms} \ 300 ppbus \ 301 ppc \ 302 ppi \ 303 pps \ 304 procfs \ 305 proto \ 306 pseudofs \ 307 ${_pst} \ 308 pty \ 309 puc \ 310 ${_qlxge} \ 311 ${_qlxgb} \ 312 ${_qlxgbe} \ 313 ${_qlnx} \ 314 ral \ 315 ${_ralfw} \ 316 ${_random_fortuna} \ 317 ${_random_yarrow} \ 318 ${_random_other} \ 319 rc4 \ 320 ${_rdma} \ 321 ${_rdrand_rng} \ 322 re \ 323 rl \ 324 rtwn \ 325 rtwn_pci \ 326 rtwn_usb \ 327 ${_rtwnfw} \ 328 ${_s3} \ 329 ${_safe} \ 330 ${_sbni} \ 331 scc \ 332 ${_scsi_low} \ 333 sdhci \ 334 ${_sdhci_acpi} \ 335 sdhci_pci \ 336 sem \ 337 send \ 338 ${_sf} \ 339 ${_sfxge} \ 340 sge \ 341 siba_bwn \ 342 siftr \ 343 siis \ 344 sis \ 345 sk \ 346 smbfs \ 347 sn \ 348 snp \ 349 sound \ 350 ${_speaker} \ 351 spigen \ 352 ${_splash} \ 353 ${_sppp} \ 354 ste \ 355 ${_stg} \ 356 stge \ 357 ${_sym} \ 358 ${_syscons} \ 359 sysvipc \ 360 tcp \ 361 ${_ti} \ 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" 422SUBDIR+= dtrace 423.endif 424SUBDIR+= opensolaris 425.endif 426 427.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 428.if exists(${SRCTOP}/sys/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) 438SUBDIR+= cuse 439.endif 440 441.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 442 defined(ALL_MODULES) 443_carp= carp 444_toecore= toecore 445_if_enc= if_enc 446_if_gif= if_gif 447_if_gre= if_gre 448_ipfw_pmod= ipfw_pmod 449.if ${MK_IPSEC_SUPPORT} != "no" 450_ipsec= ipsec 451.endif 452.endif 453 454.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 455 defined(ALL_MODULES) 456_if_stf= if_stf 457.endif 458 459.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 460_if_me= if_me 461_ipdivert= ipdivert 462_ipfw= ipfw 463.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 464_ipfw_nat64= ipfw_nat64 465.endif 466.endif 467 468.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 469_ipfw_nptv6= ipfw_nptv6 470.endif 471 472.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 473_ipfilter= ipfilter 474.endif 475 476.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 477SUBDIR+= cfiscsi 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_amd_ecc_inject=amd_ecc_inject 614_amdsbwd= amdsbwd 615_amdtemp= amdtemp 616_arcmsr= arcmsr 617_asmc= asmc 618_bytgpio= bytgpio 619_ciss= ciss 620_chromebook_platform= chromebook_platform 621_cmx= cmx 622_coretemp= coretemp 623.if ${MK_SOURCELESS_HOST} != "no" 624_hpt27xx= hpt27xx 625.endif 626_hptiop= hptiop 627.if ${MK_SOURCELESS_HOST} != "no" 628_hptmv= hptmv 629_hptnr= hptnr 630_hptrr= hptrr 631.endif 632_hyperv= hyperv 633_ichwd= ichwd 634_ida= ida 635_iir= iir 636_intelspi= intelspi 637_ipmi= ipmi 638_ips= ips 639_isci= isci 640_ipw= ipw 641_iwi= iwi 642_iwm= iwm 643_iwn= iwn 644_ixgb= ixgb 645.if ${MK_SOURCELESS_UCODE} != "no" 646_ipwfw= ipwfw 647_iwifw= iwifw 648_iwmfw= iwmfw 649_iwnfw= iwnfw 650.endif 651_mlx4= mlx4 652_mlx5= mlx5 653.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 654 defined(ALL_MODULES) 655_mlx4en= mlx4en 656_mlx5en= mlx5en 657.endif 658.if ${MK_OFED} != "no" || defined(ALL_MODULES) 659_mlx4ib= mlx4ib 660.endif 661_mly= mly 662.if ${MK_OFED} != "no" || defined(ALL_MODULES) 663_mthca= mthca 664.endif 665_nfe= nfe 666_nvd= nvd 667_nvme= nvme 668_nvram= nvram 669_nxge= nxge 670.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 671_padlock= padlock 672_padlock_rng= padlock_rng 673_rdrand_rng= rdrand_rng 674.endif 675_s3= s3 676_sdhci_acpi= sdhci_acpi 677_tpm= tpm 678_twa= twa 679_vesa= vesa 680_viawd= viawd 681_virtio= virtio 682_wpi= wpi 683.if ${MK_SOURCELESS_UCODE} != "no" 684_wpifw= wpifw 685.endif 686_x86bios= x86bios 687.endif 688 689.if ${MACHINE_CPUARCH} == "amd64" 690_efirt= efirt 691_ioat= ioat 692_ixl= ixl 693_ixlv= ixlv 694_linux64= linux64 695_linux_common= linux_common 696_ntb= ntb 697_pms= pms 698_qlxge= qlxge 699_qlxgb= qlxgb 700_qlxgbe= qlxgbe 701_qlnx= qlnx 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_stg= stg 736_cm= cm 737.if ${MK_SOURCELESS_UCODE} != "no" 738_ctau= ctau 739.endif 740_dpt= dpt 741_ex= ex 742.endif 743 744.if ${MACHINE_CPUARCH} == "arm" 745_cfi= cfi 746_cpsw= cpsw 747.endif 748 749.if ${MACHINE_CPUARCH} == "powerpc" 750_agp= agp 751_an= an 752_bm= bm 753_cardbus= cardbus 754_cbb= cbb 755_cfi= cfi 756_cpufreq= cpufreq 757_drm= drm 758_exca= exca 759_pccard= pccard 760_wi= wi 761.endif 762 763.if ${MACHINE_ARCH} == "powerpc64" 764_drm2= drm2 765.endif 766.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 767# Don't build powermac_nvram for powerpcspe, it's never supported. 768_nvram= powermac_nvram 769.endif 770 771.if ${MACHINE_CPUARCH} == "sparc64" 772_auxio= auxio 773_em= em 774_epic= epic 775.endif 776 777.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 778 ${MACHINE_CPUARCH} == "i386") 779_cloudabi32= cloudabi32 780.endif 781.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 782_cloudabi64= cloudabi64 783.endif 784 785.endif 786 787SUBDIR+=${MODULES_EXTRA} 788 789.for reject in ${WITHOUT_MODULES} 790SUBDIR:= ${SUBDIR:N${reject}} 791.endfor 792 793# Calling kldxref(8) for each module is expensive. 794.if !defined(NO_XREF) 795.MAKEFLAGS+= -DNO_XREF 796afterinstall: .PHONY 797 @if type kldxref >/dev/null 2>&1; then \ 798 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 799 kldxref ${DESTDIR}${KMODDIR}; \ 800 fi 801.endif 802 803.include "${SYSDIR}/conf/config.mk" 804 805SUBDIR:= ${SUBDIR:u:O} 806 807.include <bsd.subdir.mk> 808