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 ${_intelspi} \ 170 ${_io} \ 171 ${_ioat} \ 172 ${_ipoib} \ 173 ${_ipdivert} \ 174 ${_ipfilter} \ 175 ${_ipfw} \ 176 ipfw_nat \ 177 ${_ipfw_nat64} \ 178 ${_ipfw_nptv6} \ 179 ${_ipmi} \ 180 ip6_mroute_mod \ 181 ip_mroute_mod \ 182 ${_ips} \ 183 ${_ipw} \ 184 ${_ipwfw} \ 185 ${_isci} \ 186 ${_iser} \ 187 isp \ 188 ${_ispfw} \ 189 ${_iwi} \ 190 ${_iwifw} \ 191 ${_iwm} \ 192 ${_iwmfw} \ 193 ${_iwn} \ 194 ${_iwnfw} \ 195 ${_ix} \ 196 ${_ixv} \ 197 ${_ixgb} \ 198 ${_ixl} \ 199 ${_ixlv} \ 200 jme \ 201 joy \ 202 kbdmux \ 203 kgssapi \ 204 kgssapi_krb5 \ 205 khelp \ 206 krpc \ 207 ksyms \ 208 le \ 209 lge \ 210 libalias \ 211 libiconv \ 212 libmbpool \ 213 libmchain \ 214 ${_linprocfs} \ 215 ${_linsysfs} \ 216 ${_linux} \ 217 ${_linux_common} \ 218 ${_linux64} \ 219 linuxkpi \ 220 lmc \ 221 lpt \ 222 mac_biba \ 223 mac_bsdextended \ 224 mac_ifoff \ 225 mac_lomac \ 226 mac_mls \ 227 mac_none \ 228 mac_partition \ 229 mac_portacl \ 230 mac_seeotheruids \ 231 mac_stub \ 232 mac_test \ 233 malo \ 234 md \ 235 mdio \ 236 mem \ 237 mfi \ 238 mii \ 239 mlx \ 240 ${_mlx4} \ 241 ${_mlx4ib} \ 242 ${_mlx4en} \ 243 ${_mlx5} \ 244 ${_mlx5en} \ 245 ${_mly} \ 246 mmc \ 247 mmcsd \ 248 mpr \ 249 mps \ 250 mpt \ 251 mqueue \ 252 mrsas \ 253 msdosfs \ 254 msdosfs_iconv \ 255 ${_mse} \ 256 msk \ 257 ${_mthca} \ 258 mvs \ 259 mwl \ 260 ${_mwlfw} \ 261 mxge \ 262 my \ 263 ${_nandfs} \ 264 ${_nandsim} \ 265 ${_ncr} \ 266 ${_nctgpio} \ 267 ${_ncv} \ 268 ${_ndis} \ 269 netfpga10g \ 270 ${_netgraph} \ 271 ${_nfe} \ 272 nfscl \ 273 nfscommon \ 274 nfsd \ 275 nfslock \ 276 nfslockd \ 277 nfssvc \ 278 nge \ 279 nmdm \ 280 ${_nsp} \ 281 nullfs \ 282 ${_ntb} \ 283 ${_nvd} \ 284 ${_nvme} \ 285 ${_nvram} \ 286 ${_nxge} \ 287 oce \ 288 otus \ 289 ${_otusfw} \ 290 ow \ 291 ${_padlock} \ 292 ${_padlock_rng} \ 293 patm \ 294 ${_pccard} \ 295 ${_pcfclock} \ 296 pcn \ 297 ${_pf} \ 298 ${_pflog} \ 299 ${_pfsync} \ 300 plip \ 301 ${_pmc} \ 302 ${_pms} \ 303 ppbus \ 304 ppc \ 305 ppi \ 306 pps \ 307 procfs \ 308 proto \ 309 pseudofs \ 310 ${_pst} \ 311 pty \ 312 puc \ 313 ${_qlxge} \ 314 ${_qlxgb} \ 315 ${_qlxgbe} \ 316 ral \ 317 ${_ralfw} \ 318 ${_random_fortuna} \ 319 ${_random_yarrow} \ 320 ${_random_other} \ 321 rc4 \ 322 ${_rdma} \ 323 ${_rdrand_rng} \ 324 re \ 325 rl \ 326 rtwn \ 327 rtwn_pci \ 328 rtwn_usb \ 329 ${_rtwnfw} \ 330 ${_s3} \ 331 ${_safe} \ 332 ${_sbni} \ 333 scc \ 334 ${_scsi_low} \ 335 sdhci \ 336 sdhci_pci \ 337 sem \ 338 send \ 339 ${_sf} \ 340 ${_sfxge} \ 341 sge \ 342 siba_bwn \ 343 siftr \ 344 siis \ 345 sis \ 346 sk \ 347 smbfs \ 348 sn \ 349 ${_snc} \ 350 snp \ 351 sound \ 352 ${_speaker} \ 353 ${_splash} \ 354 ${_sppp} \ 355 ste \ 356 ${_stg} \ 357 stge \ 358 ${_streams} \ 359 ${_svr4} \ 360 ${_sym} \ 361 ${_syscons} \ 362 sysvipc \ 363 ${_ti} \ 364 ${_tcp_fastpath} \ 365 tests/framework \ 366 tests/callout_test \ 367 tl \ 368 tmpfs \ 369 ${_toecore} \ 370 ${_tpm} \ 371 trm \ 372 ${_twa} \ 373 twe \ 374 tws \ 375 tx \ 376 ${_txp} \ 377 uart \ 378 ubsec \ 379 udf \ 380 udf_iconv \ 381 ufs \ 382 uinput \ 383 unionfs \ 384 usb \ 385 utopia \ 386 ${_vesa} \ 387 ${_virtio} \ 388 vge \ 389 ${_viawd} \ 390 videomode \ 391 vkbd \ 392 ${_vmm} \ 393 ${_vmware} \ 394 ${_vpo} \ 395 vr \ 396 vte \ 397 vx \ 398 ${_vxge} \ 399 wb \ 400 ${_wbwd} \ 401 ${_wi} \ 402 wlan \ 403 wlan_acl \ 404 wlan_amrr \ 405 wlan_ccmp \ 406 wlan_rssadapt \ 407 wlan_tkip \ 408 wlan_wep \ 409 wlan_xauth \ 410 ${_wpi} \ 411 ${_wpifw} \ 412 ${_x86bios} \ 413 ${_xe} \ 414 xl \ 415 zlib 416 417.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 418_autofs= autofs 419.endif 420 421.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 422.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \ 423 ${MACHINE_CPUARCH} != "mips" && \ 424 ${MACHINE_CPUARCH} != "sparc64" 425SUBDIR+= dtrace 426.endif 427SUBDIR+= opensolaris 428.endif 429 430.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 431.if exists(${.CURDIR}/../opencrypto) 432_crypto= crypto 433_cryptodev= cryptodev 434_random_fortuna=random_fortuna 435_random_yarrow= random_yarrow 436_random_other= random_other 437.endif 438.endif 439 440.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 441SUBDIR+= cuse 442.endif 443 444.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) 445_tcp_fastpath= tcp/fastpath 446.endif 447 448.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 449 defined(ALL_MODULES) 450_carp= carp 451_toecore= toecore 452_if_enc= if_enc 453_if_gif= if_gif 454_if_gre= if_gre 455.endif 456 457.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 458 defined(ALL_MODULES) 459_if_stf= if_stf 460.endif 461 462.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 463_if_me= if_me 464_ipdivert= ipdivert 465_ipfw= ipfw 466.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 467_ipfw_nat64= ipfw_nat64 468.endif 469.endif 470 471.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 472_ipfw_nptv6= ipfw_nptv6 473.endif 474 475.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 476_ipfilter= ipfilter 477.endif 478 479.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 480SUBDIR+= iscsi 481SUBDIR+= iscsi_initiator 482.endif 483 484.if ${MK_NAND} != "no" || defined(ALL_MODULES) 485_nandfs= nandfs 486_nandsim= nandsim 487.endif 488 489.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 490_netgraph= netgraph 491.endif 492 493.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 494 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 495_pf= pf 496_pflog= pflog 497.if ${MK_INET_SUPPORT} != "no" 498_pfsync= pfsync 499.endif 500.endif 501 502.if ${MK_SOURCELESS_UCODE} != "no" 503_bce= bce 504_fatm= fatm 505_fxp= fxp 506_ispfw= ispfw 507_mwlfw= mwlfw 508_otusfw= otusfw 509_ralfw= ralfw 510_rtwnfw= rtwnfw 511_sf= sf 512_ti= ti 513_txp= txp 514.endif 515 516.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 517 ${MACHINE_CPUARCH} != "mips" && \ 518 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 519 ${MACHINE_CPUARCH} != "riscv" 520_cxgbe= cxgbe 521.endif 522 523.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 524SUBDIR+= zfs 525.endif 526 527.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 528 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 529 ${MACHINE_CPUARCH} != "riscv" 530_syscons= syscons 531_vpo= vpo 532.endif 533 534.if ${MACHINE_CPUARCH} != "mips" 535# no BUS_SPACE_UNSPECIFIED 536# No barrier instruction support (specific to this driver) 537_sym= sym 538# intr_disable() is a macro, causes problems 539.if ${MK_SOURCELESS_UCODE} != "no" 540_cxgb= cxgb 541.endif 542.endif 543 544.if ${MACHINE_CPUARCH} == "aarch64" 545_armv8crypto= armv8crypto 546_em= em 547_igb= igb 548.endif 549 550.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 551_agp= agp 552_an= an 553_aout= aout 554_bios= bios 555_bktr= bktr 556_bxe= bxe 557_cardbus= cardbus 558_cbb= cbb 559_cpuctl= cpuctl 560_cpufreq= cpufreq 561_cs= cs 562_dpms= dpms 563_drm= drm 564_drm2= drm2 565_ed= ed 566_em= em 567_ep= ep 568_et= et 569_exca= exca 570_fe= fe 571.if ${MK_OFED} != "no" || defined(ALL_MODULES) 572_ibcore= ibcore 573.endif 574_if_ndis= if_ndis 575_igb= igb 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.if ${MACHINE} != "pc98" 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_tpm= tpm 672_twa= twa 673_vesa= vesa 674_viawd= viawd 675_virtio= virtio 676_wpi= wpi 677.if ${MK_SOURCELESS_UCODE} != "no" 678_wpifw= wpifw 679.endif 680_x86bios= x86bios 681.endif 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 ${MACHINE} == "i386" 733.if ${MK_EISA} != "no" 734_ahb= ahb 735.endif 736_cm= cm 737.if ${MK_SOURCELESS_UCODE} != "no" 738_ctau= ctau 739.endif 740_dpt= dpt 741_ex= ex 742.elif ${MACHINE} == "pc98" 743_canbepm= canbepm 744_canbus= canbus 745_ct= ct 746_pmc= pmc 747_snc= snc 748.endif 749.endif 750 751.if ${MACHINE_CPUARCH} == "arm" 752_cfi= cfi 753_cpsw= cpsw 754.endif 755 756.if ${MACHINE_CPUARCH} == "powerpc" 757_agp= agp 758_an= an 759_bm= bm 760_cardbus= cardbus 761_cbb= cbb 762_cfi= cfi 763_cpufreq= cpufreq 764_drm= drm 765_exca= exca 766_pccard= pccard 767_wi= wi 768.endif 769 770.if ${MACHINE_ARCH} == "powerpc64" 771_drm2= drm2 772.endif 773.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 774# Don't build powermac_nvram for powerpcspe, it's never supported. 775_nvram= powermac_nvram 776.endif 777 778.if ${MACHINE_CPUARCH} == "sparc64" 779_auxio= auxio 780_em= em 781_epic= epic 782_igb= igb 783.endif 784 785.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 786 ${MACHINE_CPUARCH} == "i386") 787_cloudabi32= cloudabi32 788.endif 789.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 790_cloudabi64= cloudabi64 791.endif 792 793.endif 794 795SUBDIR+=${MODULES_EXTRA} 796 797.for reject in ${WITHOUT_MODULES} 798SUBDIR:= ${SUBDIR:N${reject}} 799.endfor 800 801# Calling kldxref(8) for each module is expensive. 802.if !defined(NO_XREF) 803.MAKEFLAGS+= -DNO_XREF 804afterinstall: .PHONY 805 @if type kldxref >/dev/null 2>&1; then \ 806 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 807 kldxref ${DESTDIR}${KMODDIR}; \ 808 fi 809.endif 810 811.include "${SYSDIR}/conf/config.mk" 812 813SUBDIR:= ${SUBDIR:u:O} 814 815.include <bsd.subdir.mk> 816