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 ${_cloudabi32} \ 79 ${_cloudabi64} \ 80 ${_cm} \ 81 ${_cmx} \ 82 ${_coff} \ 83 ${_coretemp} \ 84 ${_cp} \ 85 ${_cpsw} \ 86 ${_cpuctl} \ 87 ${_cpufreq} \ 88 ${_crypto} \ 89 ${_cryptodev} \ 90 ${_cs} \ 91 ${_ct} \ 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 ${_hyperv} \ 142 i2c \ 143 ${_ibcore} \ 144 ${_ibcs2} \ 145 ${_ichwd} \ 146 ${_ida} \ 147 if_bridge \ 148 if_disc \ 149 if_edsc \ 150 ${_if_enc} \ 151 if_epair \ 152 ${_if_gif} \ 153 ${_if_gre} \ 154 ${_if_me} \ 155 if_lagg \ 156 ${_if_ndis} \ 157 ${_if_stf} \ 158 if_tap \ 159 if_tun \ 160 if_vlan \ 161 if_vxlan \ 162 ${_igb} \ 163 ${_iir} \ 164 imgact_binmisc \ 165 ${_io} \ 166 ${_ioat} \ 167 ${_ipoib} \ 168 ${_ipdivert} \ 169 ${_ipfilter} \ 170 ${_ipfw} \ 171 ipfw_nat \ 172 ${_ipfw_nat64} \ 173 ${_ipfw_nptv6} \ 174 ${_ipmi} \ 175 ip6_mroute_mod \ 176 ip_mroute_mod \ 177 ${_ips} \ 178 ${_ipw} \ 179 ${_ipwfw} \ 180 ${_isci} \ 181 ${_iser} \ 182 isp \ 183 ${_ispfw} \ 184 ${_iwi} \ 185 ${_iwifw} \ 186 ${_iwm} \ 187 ${_iwmfw} \ 188 ${_iwn} \ 189 ${_iwnfw} \ 190 ${_ix} \ 191 ${_ixv} \ 192 ${_ixgb} \ 193 ${_ixl} \ 194 ${_ixlv} \ 195 jme \ 196 joy \ 197 kbdmux \ 198 kgssapi \ 199 kgssapi_krb5 \ 200 khelp \ 201 krpc \ 202 ksyms \ 203 le \ 204 lge \ 205 libalias \ 206 libiconv \ 207 libmbpool \ 208 libmchain \ 209 ${_linprocfs} \ 210 ${_linsysfs} \ 211 ${_linux} \ 212 ${_linux_common} \ 213 ${_linux64} \ 214 linuxkpi \ 215 lmc \ 216 lpt \ 217 mac_biba \ 218 mac_bsdextended \ 219 mac_ifoff \ 220 mac_lomac \ 221 mac_mls \ 222 mac_none \ 223 mac_partition \ 224 mac_portacl \ 225 mac_seeotheruids \ 226 mac_stub \ 227 mac_test \ 228 malo \ 229 md \ 230 mdio \ 231 mem \ 232 mfi \ 233 mii \ 234 mlx \ 235 ${_mlx4} \ 236 ${_mlx4ib} \ 237 ${_mlx4en} \ 238 ${_mlx5} \ 239 ${_mlx5en} \ 240 ${_mly} \ 241 mmc \ 242 mmcsd \ 243 mpr \ 244 mps \ 245 mpt \ 246 mqueue \ 247 mrsas \ 248 msdosfs \ 249 msdosfs_iconv \ 250 ${_mse} \ 251 msk \ 252 ${_mthca} \ 253 mvs \ 254 mwl \ 255 ${_mwlfw} \ 256 mxge \ 257 my \ 258 ${_nandfs} \ 259 ${_nandsim} \ 260 ${_ncr} \ 261 ${_nctgpio} \ 262 ${_ncv} \ 263 ${_ndis} \ 264 netfpga10g \ 265 ${_netgraph} \ 266 ${_nfe} \ 267 nfscl \ 268 nfscommon \ 269 nfsd \ 270 nfslock \ 271 nfslockd \ 272 nfssvc \ 273 nge \ 274 nmdm \ 275 ${_nsp} \ 276 nullfs \ 277 ${_ntb} \ 278 ${_nvd} \ 279 ${_nvme} \ 280 ${_nvram} \ 281 ${_nxge} \ 282 oce \ 283 otus \ 284 ${_otusfw} \ 285 ow \ 286 ${_padlock} \ 287 ${_padlock_rng} \ 288 patm \ 289 ${_pccard} \ 290 ${_pcfclock} \ 291 pcn \ 292 ${_pf} \ 293 ${_pflog} \ 294 ${_pfsync} \ 295 plip \ 296 ${_pmc} \ 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 ${_rtwnfw} \ 323 ${_s3} \ 324 ${_safe} \ 325 ${_sbni} \ 326 scc \ 327 ${_scsi_low} \ 328 sdhci \ 329 sdhci_pci \ 330 sem \ 331 send \ 332 ${_sf} \ 333 ${_sfxge} \ 334 sge \ 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 uinput \ 376 unionfs \ 377 urtwn \ 378 ${_urtwnfw} \ 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_mwlfw= mwlfw 503_otusfw= otusfw 504_ralfw= ralfw 505_rtwnfw= rtwnfw 506_urtwnfw= urtwnfw 507_sf= sf 508_ti= ti 509_txp= txp 510.endif 511 512.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 513 ${MACHINE_CPUARCH} != "mips" && \ 514 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv" 515_cxgbe= cxgbe 516.endif 517 518.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 519SUBDIR+= zfs 520.endif 521 522.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 523 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 524 ${MACHINE_CPUARCH} != "riscv" 525_syscons= syscons 526_vpo= vpo 527.endif 528 529.if ${MACHINE_CPUARCH} != "mips" 530# no BUS_SPACE_UNSPECIFIED 531# No barrier instruction support (specific to this driver) 532_sym= sym 533# intr_disable() is a macro, causes problems 534.if ${MK_SOURCELESS_UCODE} != "no" 535_cxgb= cxgb 536.endif 537.endif 538 539.if ${MACHINE_CPUARCH} == "aarch64" 540_em= em 541_igb= igb 542.endif 543 544.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 545_agp= agp 546_an= an 547_aout= aout 548_bktr= bktr 549_bxe= bxe 550_cardbus= cardbus 551_cbb= cbb 552_cpuctl= cpuctl 553_cpufreq= cpufreq 554_cs= cs 555_dpms= dpms 556_drm= drm 557_drm2= drm2 558_ed= ed 559_em= em 560_ep= ep 561_et= et 562_exca= exca 563_fe= fe 564.if ${MK_OFED} != "no" || defined(ALL_MODULES) 565_ibcore= ibcore 566.endif 567_if_ndis= if_ndis 568_igb= igb 569_io= io 570.if ${MK_OFED} != "no" || defined(ALL_MODULES) 571_ipoib= ipoib 572_iser= iser 573.endif 574_ix= ix 575_ixv= ixv 576_linprocfs= linprocfs 577_linsysfs= linsysfs 578_linux= linux 579_nctgpio= nctgpio 580_ndis= ndis 581_pccard= pccard 582.if ${MK_OFED} != "no" || defined(ALL_MODULES) 583_rdma= rdma 584.endif 585_safe= safe 586_scsi_low= scsi_low 587_speaker= speaker 588_splash= splash 589_sppp= sppp 590_vmware= vmware 591_vxge= vxge 592_wbwd= wbwd 593_wi= wi 594_xe= xe 595.if ${MACHINE} != "pc98" 596_aac= aac 597_aacraid= aacraid 598_acpi= acpi 599.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 600_aesni= aesni 601.endif 602_amdsbwd= amdsbwd 603_amdtemp= amdtemp 604_arcmsr= arcmsr 605_asmc= asmc 606_ciss= ciss 607_cmx= cmx 608_coretemp= coretemp 609.if ${MK_SOURCELESS_HOST} != "no" 610_hpt27xx= hpt27xx 611.endif 612_hptiop= hptiop 613.if ${MK_SOURCELESS_HOST} != "no" 614_hptmv= hptmv 615_hptnr= hptnr 616_hptrr= hptrr 617.endif 618_hyperv= hyperv 619_ichwd= ichwd 620_ida= ida 621_iir= iir 622_ipmi= ipmi 623_ips= ips 624_isci= isci 625_ipw= ipw 626_iwi= iwi 627_iwm= iwm 628_iwn= iwn 629_ixgb= ixgb 630.if ${MK_SOURCELESS_UCODE} != "no" 631_ipwfw= ipwfw 632_iwifw= iwifw 633_iwmfw= iwmfw 634_iwnfw= iwnfw 635.endif 636_mlx4= mlx4 637_mlx5= mlx5 638.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 639 defined(ALL_MODULES) 640_mlx4en= mlx4en 641_mlx5en= mlx5en 642.endif 643.if ${MK_OFED} != "no" || defined(ALL_MODULES) 644_mlx4ib= mlx4ib 645.endif 646_mly= mly 647.if ${MK_OFED} != "no" || defined(ALL_MODULES) 648_mthca= mthca 649.endif 650_nfe= nfe 651_nvd= nvd 652_nvme= nvme 653_nvram= nvram 654_nxge= nxge 655.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 656_padlock= padlock 657_padlock_rng= padlock_rng 658_rdrand_rng= rdrand_rng 659.endif 660_s3= s3 661_tpm= tpm 662_twa= twa 663_vesa= vesa 664_viawd= viawd 665_virtio= virtio 666_wpi= wpi 667.if ${MK_SOURCELESS_UCODE} != "no" 668_wpifw= wpifw 669.endif 670_x86bios= x86bios 671.endif 672.endif 673 674.if ${MACHINE_CPUARCH} == "amd64" 675_efirt= efirt 676_ioat= ioat 677_ixl= ixl 678_ixlv= ixlv 679_linux64= linux64 680_linux_common= linux_common 681_ntb= ntb 682_pms= pms 683_qlxge= qlxge 684_qlxgb= qlxgb 685_qlxgbe= qlxgbe 686_sfxge= sfxge 687 688.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 689_vmm= vmm 690.endif 691.endif 692 693.if ${MACHINE_CPUARCH} == "i386" 694# XXX some of these can move to the general case when de-i386'ed 695# XXX some of these can move now, but are untested on other architectures. 696_3dfx= 3dfx 697_3dfx_linux= 3dfx_linux 698_aic= aic 699_apm= apm 700_arcnet= arcnet 701.if ${MK_SOURCELESS_UCODE} != "no" 702_ce= ce 703.endif 704_coff= coff 705.if ${MK_SOURCELESS_UCODE} != "no" 706_cp= cp 707.endif 708_elink= elink 709_glxiic= glxiic 710_glxsb= glxsb 711#_ibcs2= ibcs2 712_mse= mse 713_ncr= ncr 714_ncv= ncv 715_nsp= nsp 716_pcfclock= pcfclock 717_pst= pst 718_sbni= sbni 719_streams= streams 720_stg= stg 721_svr4= svr4 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.elif ${MACHINE} == "pc98" 734_canbepm= canbepm 735_canbus= canbus 736_ct= ct 737_pmc= pmc 738_snc= snc 739.endif 740.endif 741 742.if ${MACHINE_CPUARCH} == "arm" 743_cfi= cfi 744_cpsw= cpsw 745.endif 746 747.if ${MACHINE_CPUARCH} == "powerpc" 748_agp= agp 749_an= an 750_bm= bm 751_cardbus= cardbus 752_cbb= cbb 753_cfi= cfi 754_cpufreq= cpufreq 755_drm= drm 756_exca= exca 757_nvram= powermac_nvram 758_pccard= pccard 759_wi= wi 760.endif 761 762.if ${MACHINE_ARCH} == "powerpc64" 763_drm2= drm2 764.endif 765 766.if ${MACHINE_CPUARCH} == "sparc64" 767_auxio= auxio 768_em= em 769_epic= epic 770_igb= igb 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