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