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 ${_igb} \ 167 ${_iir} \ 168 imgact_binmisc \ 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 netfpga10g \ 269 ${_netgraph} \ 270 ${_nfe} \ 271 nfscl \ 272 nfscommon \ 273 nfsd \ 274 nfslock \ 275 nfslockd \ 276 nfssvc \ 277 nge \ 278 nmdm \ 279 ${_nsp} \ 280 nullfs \ 281 ${_ntb} \ 282 ${_nvd} \ 283 ${_nvme} \ 284 ${_nvram} \ 285 ${_nxge} \ 286 oce \ 287 otus \ 288 ${_otusfw} \ 289 ow \ 290 ${_padlock} \ 291 ${_padlock_rng} \ 292 patm \ 293 ${_pccard} \ 294 ${_pcfclock} \ 295 pcn \ 296 ${_pf} \ 297 ${_pflog} \ 298 ${_pfsync} \ 299 plip \ 300 ${_pmc} \ 301 ${_pms} \ 302 ppbus \ 303 ppc \ 304 ppi \ 305 pps \ 306 procfs \ 307 proto \ 308 pseudofs \ 309 ${_pst} \ 310 pty \ 311 puc \ 312 ${_qlxge} \ 313 ${_qlxgb} \ 314 ${_qlxgbe} \ 315 ral \ 316 ${_ralfw} \ 317 ${_random_fortuna} \ 318 ${_random_yarrow} \ 319 ${_random_other} \ 320 rc4 \ 321 ${_rdma} \ 322 ${_rdrand_rng} \ 323 re \ 324 rl \ 325 rtwn \ 326 rtwn_pci \ 327 rtwn_usb \ 328 ${_rtwnfw} \ 329 ${_s3} \ 330 ${_safe} \ 331 ${_sbni} \ 332 scc \ 333 ${_scsi_low} \ 334 sdhci \ 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_mwlfw= mwlfw 507_otusfw= otusfw 508_ralfw= ralfw 509_rtwnfw= rtwnfw 510_sf= sf 511_ti= ti 512_txp= txp 513.endif 514 515.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 516 ${MACHINE_CPUARCH} != "mips" && \ 517 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 518 ${MACHINE_CPUARCH} != "riscv" 519_cxgbe= cxgbe 520.endif 521 522.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 523SUBDIR+= zfs 524.endif 525 526.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 527 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 528 ${MACHINE_CPUARCH} != "riscv" 529_syscons= syscons 530_vpo= vpo 531.endif 532 533.if ${MACHINE_CPUARCH} != "mips" 534# no BUS_SPACE_UNSPECIFIED 535# No barrier instruction support (specific to this driver) 536_sym= sym 537# intr_disable() is a macro, causes problems 538.if ${MK_SOURCELESS_UCODE} != "no" 539_cxgb= cxgb 540.endif 541.endif 542 543.if ${MACHINE_CPUARCH} == "aarch64" 544_armv8crypto= armv8crypto 545_em= em 546_igb= igb 547.endif 548 549.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 550_agp= agp 551_an= an 552_aout= aout 553_bios= bios 554_bktr= bktr 555_bxe= bxe 556_cardbus= cardbus 557_cbb= cbb 558_cpuctl= cpuctl 559_cpufreq= cpufreq 560_cs= cs 561_dpms= dpms 562_drm= drm 563_drm2= drm2 564_ed= ed 565_em= em 566_ep= ep 567_et= et 568_exca= exca 569_fe= fe 570.if ${MK_OFED} != "no" || defined(ALL_MODULES) 571_ibcore= ibcore 572.endif 573_if_ndis= if_ndis 574_igb= igb 575_io= io 576.if ${MK_OFED} != "no" || defined(ALL_MODULES) 577_ipoib= ipoib 578_iser= iser 579.endif 580_ix= ix 581_ixv= ixv 582_linprocfs= linprocfs 583_linsysfs= linsysfs 584_linux= linux 585_nctgpio= nctgpio 586_ndis= ndis 587_pccard= pccard 588.if ${MK_OFED} != "no" || defined(ALL_MODULES) 589_rdma= rdma 590.endif 591_safe= safe 592_scsi_low= scsi_low 593_speaker= speaker 594_splash= splash 595_sppp= sppp 596_vmware= vmware 597_vxge= vxge 598_wbwd= wbwd 599_wi= wi 600_xe= xe 601.if ${MACHINE} != "pc98" 602_aac= aac 603_aacraid= aacraid 604_acpi= acpi 605.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 606_aesni= aesni 607.endif 608_amdsbwd= amdsbwd 609_amdtemp= amdtemp 610_arcmsr= arcmsr 611_asmc= asmc 612_bytgpio= bytgpio 613_ciss= ciss 614_chromebook_platform= chromebook_platform 615_cmx= cmx 616_coretemp= coretemp 617.if ${MK_SOURCELESS_HOST} != "no" 618_hpt27xx= hpt27xx 619.endif 620_hptiop= hptiop 621.if ${MK_SOURCELESS_HOST} != "no" 622_hptmv= hptmv 623_hptnr= hptnr 624_hptrr= hptrr 625.endif 626_hyperv= hyperv 627_ichwd= ichwd 628_ida= ida 629_iir= iir 630_ipmi= ipmi 631_ips= ips 632_isci= isci 633_ipw= ipw 634_iwi= iwi 635_iwm= iwm 636_iwn= iwn 637_ixgb= ixgb 638.if ${MK_SOURCELESS_UCODE} != "no" 639_ipwfw= ipwfw 640_iwifw= iwifw 641_iwmfw= iwmfw 642_iwnfw= iwnfw 643.endif 644_mlx4= mlx4 645_mlx5= mlx5 646.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 647 defined(ALL_MODULES) 648_mlx4en= mlx4en 649_mlx5en= mlx5en 650.endif 651.if ${MK_OFED} != "no" || defined(ALL_MODULES) 652_mlx4ib= mlx4ib 653.endif 654_mly= mly 655.if ${MK_OFED} != "no" || defined(ALL_MODULES) 656_mthca= mthca 657.endif 658_nfe= nfe 659_nvd= nvd 660_nvme= nvme 661_nvram= nvram 662_nxge= nxge 663.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 664_padlock= padlock 665_padlock_rng= padlock_rng 666_rdrand_rng= rdrand_rng 667.endif 668_s3= s3 669_tpm= tpm 670_twa= twa 671_vesa= vesa 672_viawd= viawd 673_virtio= virtio 674_wpi= wpi 675.if ${MK_SOURCELESS_UCODE} != "no" 676_wpifw= wpifw 677.endif 678_x86bios= x86bios 679.endif 680.endif 681 682.if ${MACHINE_CPUARCH} == "amd64" 683_efirt= efirt 684_ioat= ioat 685_ixl= ixl 686_ixlv= ixlv 687_linux64= linux64 688_linux_common= linux_common 689_ntb= ntb 690_pms= pms 691_qlxge= qlxge 692_qlxgb= qlxgb 693_qlxgbe= qlxgbe 694_sfxge= sfxge 695 696.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 697_vmm= vmm 698.endif 699.endif 700 701.if ${MACHINE_CPUARCH} == "i386" 702# XXX some of these can move to the general case when de-i386'ed 703# XXX some of these can move now, but are untested on other architectures. 704_3dfx= 3dfx 705_3dfx_linux= 3dfx_linux 706_aic= aic 707_apm= apm 708_arcnet= arcnet 709.if ${MK_SOURCELESS_UCODE} != "no" 710_ce= ce 711.endif 712_coff= coff 713.if ${MK_SOURCELESS_UCODE} != "no" 714_cp= cp 715.endif 716_elink= elink 717_glxiic= glxiic 718_glxsb= glxsb 719#_ibcs2= ibcs2 720_mse= mse 721_ncr= ncr 722_ncv= ncv 723_nsp= nsp 724_pcfclock= pcfclock 725_pst= pst 726_sbni= sbni 727_streams= streams 728_stg= stg 729_svr4= svr4 730.if ${MACHINE} == "i386" 731.if ${MK_EISA} != "no" 732_ahb= ahb 733.endif 734_cm= cm 735.if ${MK_SOURCELESS_UCODE} != "no" 736_ctau= ctau 737.endif 738_dpt= dpt 739_ex= ex 740.elif ${MACHINE} == "pc98" 741_canbepm= canbepm 742_canbus= canbus 743_ct= ct 744_pmc= pmc 745_snc= snc 746.endif 747.endif 748 749.if ${MACHINE_CPUARCH} == "arm" 750_cfi= cfi 751_cpsw= cpsw 752.endif 753 754.if ${MACHINE_CPUARCH} == "powerpc" 755_agp= agp 756_an= an 757_bm= bm 758_cardbus= cardbus 759_cbb= cbb 760_cfi= cfi 761_cpufreq= cpufreq 762_drm= drm 763_exca= exca 764_pccard= pccard 765_wi= wi 766.endif 767 768.if ${MACHINE_ARCH} == "powerpc64" 769_drm2= drm2 770.endif 771.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 772# Don't build powermac_nvram for powerpcspe, it's never supported. 773_nvram= powermac_nvram 774.endif 775 776.if ${MACHINE_CPUARCH} == "sparc64" 777_auxio= auxio 778_em= em 779_epic= epic 780_igb= igb 781.endif 782 783.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 784 ${MACHINE_CPUARCH} == "i386") 785_cloudabi32= cloudabi32 786.endif 787.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 788_cloudabi64= cloudabi64 789.endif 790 791.endif 792 793SUBDIR+=${MODULES_EXTRA} 794 795.for reject in ${WITHOUT_MODULES} 796SUBDIR:= ${SUBDIR:N${reject}} 797.endfor 798 799# Calling kldxref(8) for each module is expensive. 800.if !defined(NO_XREF) 801.MAKEFLAGS+= -DNO_XREF 802afterinstall: .PHONY 803 @if type kldxref >/dev/null 2>&1; then \ 804 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 805 kldxref ${DESTDIR}${KMODDIR}; \ 806 fi 807.endif 808 809.include "${SYSDIR}/conf/config.mk" 810 811SUBDIR:= ${SUBDIR:u:O} 812 813.include <bsd.subdir.mk> 814