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 bnxt \ 61 bridgestp \ 62 bwi \ 63 bwn \ 64 bwn_pci \ 65 cam \ 66 ${_canbepm} \ 67 ${_canbus} \ 68 ${_cardbus} \ 69 ${_carp} \ 70 cas \ 71 ${_cbb} \ 72 cc \ 73 cd9660 \ 74 cd9660_iconv \ 75 ${_ce} \ 76 ${_cfi} \ 77 ${_chromebook_platform} \ 78 ${_ciss} \ 79 cloudabi \ 80 ${_cloudabi32} \ 81 ${_cloudabi64} \ 82 ${_cm} \ 83 ${_cmx} \ 84 ${_coff} \ 85 ${_coretemp} \ 86 ${_cp} \ 87 ${_cpsw} \ 88 ${_cpuctl} \ 89 ${_cpufreq} \ 90 ${_crypto} \ 91 ${_cryptodev} \ 92 ${_cs} \ 93 ${_ct} \ 94 ${_ctau} \ 95 ctl \ 96 ${_cxgb} \ 97 ${_cxgbe} \ 98 dc \ 99 dcons \ 100 dcons_crom \ 101 de \ 102 ${_dpms} \ 103 ${_dpt} \ 104 ${_drm} \ 105 ${_drm2} \ 106 dummynet \ 107 ${_ed} \ 108 ${_efirt} \ 109 ${_elink} \ 110 ${_em} \ 111 en \ 112 ${_ep} \ 113 ${_epic} \ 114 esp \ 115 ${_et} \ 116 evdev \ 117 ${_ex} \ 118 ${_exca} \ 119 ext2fs \ 120 ${_fatm} \ 121 fdc \ 122 fdescfs \ 123 ${_fe} \ 124 filemon \ 125 firewire \ 126 firmware \ 127 fuse \ 128 ${_fxp} \ 129 gem \ 130 geom \ 131 ${_glxiic} \ 132 ${_glxsb} \ 133 gpio \ 134 hatm \ 135 hifn \ 136 hme \ 137 ${_hpt27xx} \ 138 ${_hptiop} \ 139 ${_hptmv} \ 140 ${_hptnr} \ 141 ${_hptrr} \ 142 hwpmc \ 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 ${_igb} \ 165 ${_iir} \ 166 imgact_binmisc \ 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 netfpga10g \ 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 ${_pmc} \ 299 ${_pms} \ 300 ppbus \ 301 ppc \ 302 ppi \ 303 pps \ 304 procfs \ 305 proto \ 306 pseudofs \ 307 ${_pst} \ 308 pty \ 309 puc \ 310 ${_qlxge} \ 311 ${_qlxgb} \ 312 ${_qlxgbe} \ 313 ral \ 314 ${_ralfw} \ 315 ${_random_fortuna} \ 316 ${_random_yarrow} \ 317 ${_random_other} \ 318 rc4 \ 319 ${_rdma} \ 320 ${_rdrand_rng} \ 321 re \ 322 rl \ 323 rtwn \ 324 rtwn_pci \ 325 rtwn_usb \ 326 ${_rtwnfw} \ 327 ${_s3} \ 328 ${_safe} \ 329 ${_sbni} \ 330 scc \ 331 ${_scsi_low} \ 332 sdhci \ 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 ${_snc} \ 347 snp \ 348 sound \ 349 ${_speaker} \ 350 ${_splash} \ 351 ${_sppp} \ 352 ste \ 353 ${_stg} \ 354 stge \ 355 ${_streams} \ 356 ${_svr4} \ 357 ${_sym} \ 358 ${_syscons} \ 359 sysvipc \ 360 ${_ti} \ 361 ${_tcp_fastpath} \ 362 tests/framework \ 363 tests/callout_test \ 364 tl \ 365 tmpfs \ 366 ${_toecore} \ 367 ${_tpm} \ 368 trm \ 369 ${_twa} \ 370 twe \ 371 tws \ 372 tx \ 373 ${_txp} \ 374 uart \ 375 ubsec \ 376 udf \ 377 udf_iconv \ 378 ufs \ 379 uinput \ 380 unionfs \ 381 usb \ 382 utopia \ 383 ${_vesa} \ 384 ${_virtio} \ 385 vge \ 386 ${_viawd} \ 387 videomode \ 388 vkbd \ 389 ${_vmm} \ 390 ${_vmware} \ 391 ${_vpo} \ 392 vr \ 393 vte \ 394 vx \ 395 ${_vxge} \ 396 wb \ 397 ${_wbwd} \ 398 ${_wi} \ 399 wlan \ 400 wlan_acl \ 401 wlan_amrr \ 402 wlan_ccmp \ 403 wlan_rssadapt \ 404 wlan_tkip \ 405 wlan_wep \ 406 wlan_xauth \ 407 ${_wpi} \ 408 ${_wpifw} \ 409 ${_x86bios} \ 410 ${_xe} \ 411 xl \ 412 zlib 413 414.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 415_autofs= autofs 416.endif 417 418.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 419.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \ 420 ${MACHINE_CPUARCH} != "mips" && \ 421 ${MACHINE_CPUARCH} != "sparc64" 422SUBDIR+= dtrace 423.endif 424SUBDIR+= opensolaris 425.endif 426 427.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 428.if exists(${.CURDIR}/../opencrypto) 429_crypto= crypto 430_cryptodev= cryptodev 431_random_fortuna=random_fortuna 432_random_yarrow= random_yarrow 433_random_other= random_other 434.endif 435.endif 436 437.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 438SUBDIR+= cuse 439.endif 440 441.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) 442_tcp_fastpath= tcp/fastpath 443.endif 444 445.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 446 defined(ALL_MODULES) 447_carp= carp 448_toecore= toecore 449_if_enc= if_enc 450_if_gif= if_gif 451_if_gre= if_gre 452.endif 453 454.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 455 defined(ALL_MODULES) 456_if_stf= if_stf 457.endif 458 459.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 460_if_me= if_me 461_ipdivert= ipdivert 462_ipfw= ipfw 463.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 464_ipfw_nat64= ipfw_nat64 465.endif 466.endif 467 468.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 469_ipfw_nptv6= ipfw_nptv6 470.endif 471 472.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 473_ipfilter= ipfilter 474.endif 475 476.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 477SUBDIR+= iscsi 478SUBDIR+= iscsi_initiator 479.endif 480 481.if ${MK_NAND} != "no" || defined(ALL_MODULES) 482_nandfs= nandfs 483_nandsim= nandsim 484.endif 485 486.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 487_netgraph= netgraph 488.endif 489 490.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 491 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 492_pf= pf 493_pflog= pflog 494.if ${MK_INET_SUPPORT} != "no" 495_pfsync= pfsync 496.endif 497.endif 498 499.if ${MK_SOURCELESS_UCODE} != "no" 500_bce= bce 501_fatm= fatm 502_fxp= fxp 503_ispfw= ispfw 504_mwlfw= mwlfw 505_otusfw= otusfw 506_ralfw= ralfw 507_rtwnfw= rtwnfw 508_sf= sf 509_ti= ti 510_txp= txp 511.endif 512 513.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 514 ${MACHINE_CPUARCH} != "mips" && \ 515 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 516 ${MACHINE_CPUARCH} != "riscv" 517_cxgbe= cxgbe 518.endif 519 520.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 521SUBDIR+= zfs 522.endif 523 524.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 525 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 526 ${MACHINE_CPUARCH} != "riscv" 527_syscons= syscons 528_vpo= vpo 529.endif 530 531.if ${MACHINE_CPUARCH} != "mips" 532# no BUS_SPACE_UNSPECIFIED 533# No barrier instruction support (specific to this driver) 534_sym= sym 535# intr_disable() is a macro, causes problems 536.if ${MK_SOURCELESS_UCODE} != "no" 537_cxgb= cxgb 538.endif 539.endif 540 541.if ${MACHINE_CPUARCH} == "aarch64" 542_em= em 543_igb= igb 544.endif 545 546.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 547_agp= agp 548_an= an 549_aout= aout 550_bktr= bktr 551_bxe= bxe 552_cardbus= cardbus 553_cbb= cbb 554_cpuctl= cpuctl 555_cpufreq= cpufreq 556_cs= cs 557_dpms= dpms 558_drm= drm 559_drm2= drm2 560_ed= ed 561_em= em 562_ep= ep 563_et= et 564_exca= exca 565_fe= fe 566.if ${MK_OFED} != "no" || defined(ALL_MODULES) 567_ibcore= ibcore 568.endif 569_if_ndis= if_ndis 570_igb= igb 571_io= io 572.if ${MK_OFED} != "no" || defined(ALL_MODULES) 573_ipoib= ipoib 574_iser= iser 575.endif 576_ix= ix 577_ixv= ixv 578_linprocfs= linprocfs 579_linsysfs= linsysfs 580_linux= linux 581_nctgpio= nctgpio 582_ndis= ndis 583_pccard= pccard 584.if ${MK_OFED} != "no" || defined(ALL_MODULES) 585_rdma= rdma 586.endif 587_safe= safe 588_scsi_low= scsi_low 589_speaker= speaker 590_splash= splash 591_sppp= sppp 592_vmware= vmware 593_vxge= vxge 594_wbwd= wbwd 595_wi= wi 596_xe= xe 597.if ${MACHINE} != "pc98" 598_aac= aac 599_aacraid= aacraid 600_acpi= acpi 601.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 602_aesni= aesni 603.endif 604_amdsbwd= amdsbwd 605_amdtemp= amdtemp 606_arcmsr= arcmsr 607_asmc= asmc 608_ciss= ciss 609_chromebook_platform= chromebook_platform 610_cmx= cmx 611_coretemp= coretemp 612.if ${MK_SOURCELESS_HOST} != "no" 613_hpt27xx= hpt27xx 614.endif 615_hptiop= hptiop 616.if ${MK_SOURCELESS_HOST} != "no" 617_hptmv= hptmv 618_hptnr= hptnr 619_hptrr= hptrr 620.endif 621_hyperv= hyperv 622_ichwd= ichwd 623_ida= ida 624_iir= iir 625_ipmi= ipmi 626_ips= ips 627_isci= isci 628_ipw= ipw 629_iwi= iwi 630_iwm= iwm 631_iwn= iwn 632_ixgb= ixgb 633.if ${MK_SOURCELESS_UCODE} != "no" 634_ipwfw= ipwfw 635_iwifw= iwifw 636_iwmfw= iwmfw 637_iwnfw= iwnfw 638.endif 639_mlx4= mlx4 640_mlx5= mlx5 641.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 642 defined(ALL_MODULES) 643_mlx4en= mlx4en 644_mlx5en= mlx5en 645.endif 646.if ${MK_OFED} != "no" || defined(ALL_MODULES) 647_mlx4ib= mlx4ib 648.endif 649_mly= mly 650.if ${MK_OFED} != "no" || defined(ALL_MODULES) 651_mthca= mthca 652.endif 653_nfe= nfe 654_nvd= nvd 655_nvme= nvme 656_nvram= nvram 657_nxge= nxge 658.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 659_padlock= padlock 660_padlock_rng= padlock_rng 661_rdrand_rng= rdrand_rng 662.endif 663_s3= s3 664_tpm= tpm 665_twa= twa 666_vesa= vesa 667_viawd= viawd 668_virtio= virtio 669_wpi= wpi 670.if ${MK_SOURCELESS_UCODE} != "no" 671_wpifw= wpifw 672.endif 673_x86bios= x86bios 674.endif 675.endif 676 677.if ${MACHINE_CPUARCH} == "amd64" 678_efirt= efirt 679_ioat= ioat 680_ixl= ixl 681_ixlv= ixlv 682_linux64= linux64 683_linux_common= linux_common 684_ntb= ntb 685_pms= pms 686_qlxge= qlxge 687_qlxgb= qlxgb 688_qlxgbe= qlxgbe 689_sfxge= sfxge 690 691.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 692_vmm= vmm 693.endif 694.endif 695 696.if ${MACHINE_CPUARCH} == "i386" 697# XXX some of these can move to the general case when de-i386'ed 698# XXX some of these can move now, but are untested on other architectures. 699_3dfx= 3dfx 700_3dfx_linux= 3dfx_linux 701_aic= aic 702_apm= apm 703_arcnet= arcnet 704.if ${MK_SOURCELESS_UCODE} != "no" 705_ce= ce 706.endif 707_coff= coff 708.if ${MK_SOURCELESS_UCODE} != "no" 709_cp= cp 710.endif 711_elink= elink 712_glxiic= glxiic 713_glxsb= glxsb 714#_ibcs2= ibcs2 715_mse= mse 716_ncr= ncr 717_ncv= ncv 718_nsp= nsp 719_pcfclock= pcfclock 720_pst= pst 721_sbni= sbni 722_streams= streams 723_stg= stg 724_svr4= svr4 725.if ${MACHINE} == "i386" 726.if ${MK_EISA} != "no" 727_ahb= ahb 728.endif 729_bios= bios 730_cm= cm 731.if ${MK_SOURCELESS_UCODE} != "no" 732_ctau= ctau 733.endif 734_dpt= dpt 735_ex= ex 736.elif ${MACHINE} == "pc98" 737_canbepm= canbepm 738_canbus= canbus 739_ct= ct 740_pmc= pmc 741_snc= snc 742.endif 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_igb= igb 777.endif 778 779.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 780 ${MACHINE_CPUARCH} == "i386") 781_cloudabi32= cloudabi32 782.endif 783.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 784_cloudabi64= cloudabi64 785.endif 786 787.endif 788 789SUBDIR+=${MODULES_EXTRA} 790 791.for reject in ${WITHOUT_MODULES} 792SUBDIR:= ${SUBDIR:N${reject}} 793.endfor 794 795# Calling kldxref(8) for each module is expensive. 796.if !defined(NO_XREF) 797.MAKEFLAGS+= -DNO_XREF 798afterinstall: .PHONY 799 @if type kldxref >/dev/null 2>&1; then \ 800 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 801 kldxref ${DESTDIR}${KMODDIR}; \ 802 fi 803.endif 804 805.include "${SYSDIR}/conf/config.mk" 806 807SUBDIR:= ${SUBDIR:u:O} 808 809.include <bsd.subdir.mk> 810