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 ${_ahb} \ 31 ahci \ 32 ${_aic} \ 33 aic7xxx \ 34 alc \ 35 ale \ 36 alq \ 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 ${_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 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(${.CURDIR}/../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_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) 440_tcp_fastpath= tcp/fastpath 441.endif 442 443.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 444 defined(ALL_MODULES) 445_carp= carp 446_toecore= toecore 447_if_enc= if_enc 448_if_gif= if_gif 449_if_gre= if_gre 450.endif 451 452.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 453 defined(ALL_MODULES) 454_if_stf= if_stf 455.endif 456 457.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 458_if_me= if_me 459_ipdivert= ipdivert 460_ipfw= ipfw 461.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 462_ipfw_nat64= ipfw_nat64 463.endif 464.endif 465 466.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 467_ipfw_nptv6= ipfw_nptv6 468.endif 469 470.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 471_ipfilter= ipfilter 472.endif 473 474.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 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" 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_amdsbwd= amdsbwd 611_amdtemp= amdtemp 612_arcmsr= arcmsr 613_asmc= asmc 614_bytgpio= bytgpio 615_ciss= ciss 616_chromebook_platform= chromebook_platform 617_cmx= cmx 618_coretemp= coretemp 619.if ${MK_SOURCELESS_HOST} != "no" 620_hpt27xx= hpt27xx 621.endif 622_hptiop= hptiop 623.if ${MK_SOURCELESS_HOST} != "no" 624_hptmv= hptmv 625_hptnr= hptnr 626_hptrr= hptrr 627.endif 628_hyperv= hyperv 629_ichwd= ichwd 630_ida= ida 631_iir= iir 632_intelspi= intelspi 633_ipmi= ipmi 634_ips= ips 635_isci= isci 636_ipw= ipw 637_iwi= iwi 638_iwm= iwm 639_iwn= iwn 640_ixgb= ixgb 641.if ${MK_SOURCELESS_UCODE} != "no" 642_ipwfw= ipwfw 643_iwifw= iwifw 644_iwmfw= iwmfw 645_iwnfw= iwnfw 646.endif 647_mlx4= mlx4 648_mlx5= mlx5 649.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 650 defined(ALL_MODULES) 651_mlx4en= mlx4en 652_mlx5en= mlx5en 653.endif 654.if ${MK_OFED} != "no" || defined(ALL_MODULES) 655_mlx4ib= mlx4ib 656.endif 657_mly= mly 658.if ${MK_OFED} != "no" || defined(ALL_MODULES) 659_mthca= mthca 660.endif 661_nfe= nfe 662_nvd= nvd 663_nvme= nvme 664_nvram= nvram 665_nxge= nxge 666.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 667_padlock= padlock 668_padlock_rng= padlock_rng 669_rdrand_rng= rdrand_rng 670.endif 671_s3= s3 672_sdhci_acpi= sdhci_acpi 673_tpm= tpm 674_twa= twa 675_vesa= vesa 676_viawd= viawd 677_virtio= virtio 678_wpi= wpi 679.if ${MK_SOURCELESS_UCODE} != "no" 680_wpifw= wpifw 681.endif 682_x86bios= x86bios 683.endif 684 685.if ${MACHINE_CPUARCH} == "amd64" 686_efirt= efirt 687_ioat= ioat 688_ixl= ixl 689_ixlv= ixlv 690_linux64= linux64 691_linux_common= linux_common 692_ntb= ntb 693_pms= pms 694_qlxge= qlxge 695_qlxgb= qlxgb 696_qlxgbe= qlxgbe 697_sfxge= sfxge 698 699.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 700_vmm= vmm 701.endif 702.endif 703 704.if ${MACHINE_CPUARCH} == "i386" 705# XXX some of these can move to the general case when de-i386'ed 706# XXX some of these can move now, but are untested on other architectures. 707_3dfx= 3dfx 708_3dfx_linux= 3dfx_linux 709_aic= aic 710_apm= apm 711_arcnet= arcnet 712.if ${MK_SOURCELESS_UCODE} != "no" 713_ce= ce 714.endif 715_coff= coff 716.if ${MK_SOURCELESS_UCODE} != "no" 717_cp= cp 718.endif 719_elink= elink 720_glxiic= glxiic 721_glxsb= glxsb 722#_ibcs2= ibcs2 723_mse= mse 724_ncr= ncr 725_ncv= ncv 726_nsp= nsp 727_pcfclock= pcfclock 728_pst= pst 729_sbni= sbni 730_streams= streams 731_stg= stg 732_svr4= svr4 733.if ${MK_EISA} != "no" 734_ahb= ahb 735.endif 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