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