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