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