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 ${_cloudabi64} \ 79 ${_cm} \ 80 ${_cmx} \ 81 ${_coff} \ 82 ${_coretemp} \ 83 ${_cp} \ 84 ${_cpsw} \ 85 ${_cpuctl} \ 86 ${_cpufreq} \ 87 ${_crypto} \ 88 ${_cryptodev} \ 89 ${_cs} \ 90 ${_ct} \ 91 ${_ctau} \ 92 ctl \ 93 ${_cxgb} \ 94 ${_cxgbe} \ 95 dc \ 96 dcons \ 97 dcons_crom \ 98 de \ 99 ${_dpms} \ 100 ${_dpt} \ 101 ${_drm} \ 102 ${_drm2} \ 103 dummynet \ 104 ${_ed} \ 105 ${_elink} \ 106 ${_em} \ 107 en \ 108 ${_ep} \ 109 ${_epic} \ 110 esp \ 111 ${_et} \ 112 ${_ex} \ 113 ${_exca} \ 114 ext2fs \ 115 ${_fatm} \ 116 fdc \ 117 fdescfs \ 118 ${_fe} \ 119 filemon \ 120 firewire \ 121 firmware \ 122 fuse \ 123 ${_fxp} \ 124 gem \ 125 geom \ 126 ${_glxiic} \ 127 ${_glxsb} \ 128 gpio \ 129 hatm \ 130 hifn \ 131 hme \ 132 ${_hpt27xx} \ 133 ${_hptiop} \ 134 ${_hptmv} \ 135 ${_hptnr} \ 136 ${_hptrr} \ 137 hwpmc \ 138 ${_hyperv} \ 139 i2c \ 140 ${_ibcore} \ 141 ${_ibcs2} \ 142 ${_ichwd} \ 143 ${_ida} \ 144 ${_ie} \ 145 if_bridge \ 146 if_disc \ 147 if_edsc \ 148 ${_if_enc} \ 149 if_epair \ 150 ${_if_gif} \ 151 ${_if_gre} \ 152 ${_if_me} \ 153 if_lagg \ 154 ${_if_ndis} \ 155 ${_if_stf} \ 156 if_tap \ 157 if_tun \ 158 if_vlan \ 159 if_vxlan \ 160 ${_igb} \ 161 ${_iir} \ 162 imgact_binmisc \ 163 ${_io} \ 164 ${_ioat} \ 165 ${_ipoib} \ 166 ${_ipdivert} \ 167 ${_ipfilter} \ 168 ${_ipfw} \ 169 ipfw_nat \ 170 ${_ipfw_nat64} \ 171 ${_ipfw_nptv6} \ 172 ${_ipmi} \ 173 ip6_mroute_mod \ 174 ip_mroute_mod \ 175 ${_ips} \ 176 ${_ipw} \ 177 ${_ipwfw} \ 178 ${_isci} \ 179 ${_iser} \ 180 isp \ 181 ${_ispfw} \ 182 ${_iwi} \ 183 ${_iwifw} \ 184 ${_iwm} \ 185 ${_iwmfw} \ 186 ${_iwn} \ 187 ${_iwnfw} \ 188 ${_ix} \ 189 ${_ixv} \ 190 ${_ixgb} \ 191 ${_ixl} \ 192 ${_ixlv} \ 193 jme \ 194 joy \ 195 kbdmux \ 196 kgssapi \ 197 kgssapi_krb5 \ 198 khelp \ 199 krpc \ 200 ksyms \ 201 le \ 202 lge \ 203 libalias \ 204 libiconv \ 205 libmbpool \ 206 libmchain \ 207 ${_linprocfs} \ 208 ${_linsysfs} \ 209 ${_linux} \ 210 ${_linux_common} \ 211 ${_linux64} \ 212 linuxkpi \ 213 lmc \ 214 lpt \ 215 mac_biba \ 216 mac_bsdextended \ 217 mac_ifoff \ 218 mac_lomac \ 219 mac_mls \ 220 mac_none \ 221 mac_partition \ 222 mac_portacl \ 223 mac_seeotheruids \ 224 mac_stub \ 225 mac_test \ 226 malo \ 227 mcd \ 228 md \ 229 mdio \ 230 mem \ 231 mfi \ 232 mii \ 233 mlx \ 234 ${_mlx4} \ 235 ${_mlx4ib} \ 236 ${_mlxen} \ 237 ${_mlx5} \ 238 ${_mlx5en} \ 239 ${_mly} \ 240 mmc \ 241 mmcsd \ 242 mpr \ 243 mps \ 244 mpt \ 245 mqueue \ 246 mrsas \ 247 msdosfs \ 248 msdosfs_iconv \ 249 ${_mse} \ 250 msk \ 251 ${_mthca} \ 252 mvs \ 253 mwl \ 254 ${_mwlfw} \ 255 mxge \ 256 my \ 257 ${_nandfs} \ 258 ${_nandsim} \ 259 ${_ncr} \ 260 ${_nctgpio} \ 261 ${_ncv} \ 262 ${_ndis} \ 263 netfpga10g \ 264 ${_netgraph} \ 265 ${_nfe} \ 266 nfscl \ 267 nfscommon \ 268 nfsd \ 269 nfslock \ 270 nfslockd \ 271 nfssvc \ 272 nge \ 273 nmdm \ 274 ${_nsp} \ 275 nullfs \ 276 ${_ntb} \ 277 ${_nvd} \ 278 ${_nvme} \ 279 ${_nvram} \ 280 ${_nxge} \ 281 oce \ 282 otus \ 283 ${_otusfw} \ 284 ow \ 285 ${_padlock} \ 286 ${_padlock_rng} \ 287 patm \ 288 ${_pccard} \ 289 ${_pcfclock} \ 290 pcn \ 291 ${_pf} \ 292 ${_pflog} \ 293 ${_pfsync} \ 294 plip \ 295 ${_pmc} \ 296 ${_pms} \ 297 ppbus \ 298 ppc \ 299 ppi \ 300 pps \ 301 procfs \ 302 proto \ 303 pseudofs \ 304 ${_pst} \ 305 pty \ 306 puc \ 307 ${_qlxge} \ 308 ${_qlxgb} \ 309 ${_qlxgbe} \ 310 ral \ 311 ${_ralfw} \ 312 ${_random_fortuna} \ 313 ${_random_yarrow} \ 314 ${_random_other} \ 315 rc4 \ 316 ${_rdma} \ 317 ${_rdrand_rng} \ 318 re \ 319 rl \ 320 rtwn \ 321 ${_rtwnfw} \ 322 ${_s3} \ 323 ${_safe} \ 324 ${_sbni} \ 325 scc \ 326 scd \ 327 ${_scsi_low} \ 328 sdhci \ 329 sdhci_pci \ 330 sem \ 331 send \ 332 ${_sf} \ 333 ${_sfxge} \ 334 sge \ 335 ${_si} \ 336 siba_bwn \ 337 siftr \ 338 siis \ 339 sis \ 340 sk \ 341 smbfs \ 342 sn \ 343 ${_snc} \ 344 snp \ 345 sound \ 346 ${_speaker} \ 347 ${_splash} \ 348 ${_sppp} \ 349 ste \ 350 ${_stg} \ 351 stge \ 352 ${_streams} \ 353 ${_svr4} \ 354 ${_sym} \ 355 ${_syscons} \ 356 sysvipc \ 357 ${_ti} \ 358 ${_tcp_fastpath} \ 359 tests/framework \ 360 tests/callout_test \ 361 tl \ 362 tmpfs \ 363 ${_toecore} \ 364 ${_tpm} \ 365 trm \ 366 ${_twa} \ 367 twe \ 368 tws \ 369 tx \ 370 ${_txp} \ 371 uart \ 372 ubsec \ 373 udf \ 374 udf_iconv \ 375 ufs \ 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 ${_wds} \ 397 ${_wi} \ 398 ${_wl} \ 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_urtwnfw= urtwnfw 509_sf= sf 510_ti= ti 511_txp= txp 512.endif 513 514.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 515 ${MACHINE_CPUARCH} != "mips" && \ 516 ${MACHINE_ARCH} != "powerpc" && ${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_si= si 590_speaker= speaker 591_splash= splash 592_sppp= sppp 593_vmware= vmware 594_vxge= vxge 595_wbwd= wbwd 596_wi= wi 597_xe= xe 598.if ${MACHINE} != "pc98" 599_aac= aac 600_aacraid= aacraid 601_acpi= acpi 602.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 603_aesni= aesni 604.endif 605_amdsbwd= amdsbwd 606_amdtemp= amdtemp 607_arcmsr= arcmsr 608_asmc= asmc 609_ciss= ciss 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.if ${MK_OFED} != "no" || defined(ALL_MODULES) 640_mlx4= mlx4 641_mlx4ib= mlx4ib 642_mlxen= mlxen 643.endif 644_mlx5= mlx5 645.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 646 defined(ALL_MODULES) 647_mlx5en= mlx5en 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_ioat= ioat 679_ixl= ixl 680_ixlv= ixlv 681_linux64= linux64 682_linux_common= linux_common 683_ntb= ntb 684_pms= pms 685_qlxge= qlxge 686_qlxgb= qlxgb 687_qlxgbe= qlxgbe 688_sfxge= sfxge 689 690.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 691_vmm= vmm 692.endif 693.endif 694 695.if ${MACHINE_CPUARCH} == "i386" 696# XXX some of these can move to the general case when de-i386'ed 697# XXX some of these can move now, but are untested on other architectures. 698_3dfx= 3dfx 699_3dfx_linux= 3dfx_linux 700_aic= aic 701_apm= apm 702_arcnet= arcnet 703.if ${MK_SOURCELESS_UCODE} != "no" 704_ce= ce 705.endif 706_coff= coff 707.if ${MK_SOURCELESS_UCODE} != "no" 708_cp= cp 709.endif 710_elink= elink 711_glxiic= glxiic 712_glxsb= glxsb 713#_ibcs2= ibcs2 714_ie= ie 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_wds= wds 726.if ${MACHINE} == "i386" 727.if ${MK_EISA} != "no" 728_ahb= ahb 729.endif 730_bios= bios 731_cm= cm 732.if ${MK_SOURCELESS_UCODE} != "no" 733_ctau= ctau 734.endif 735_dpt= dpt 736_ex= ex 737_wl= wl 738.elif ${MACHINE} == "pc98" 739_canbepm= canbepm 740_canbus= canbus 741_ct= ct 742_pmc= pmc 743_snc= snc 744.endif 745.endif 746 747.if ${MACHINE_CPUARCH} == "arm" 748_cfi= cfi 749_cpsw= cpsw 750.endif 751 752.if ${MACHINE_CPUARCH} == "powerpc" 753_agp= agp 754_an= an 755_bm= bm 756_cardbus= cardbus 757_cbb= cbb 758_cfi= cfi 759_cpufreq= cpufreq 760_drm= drm 761_exca= exca 762_nvram= powermac_nvram 763_pccard= pccard 764_wi= wi 765.endif 766 767.if ${MACHINE_ARCH} == "powerpc64" 768_drm2= drm2 769.endif 770 771.if ${MACHINE_CPUARCH} == "sparc64" 772_auxio= auxio 773_em= em 774_epic= epic 775_igb= igb 776.endif 777 778.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 779_cloudabi64= cloudabi64 780.endif 781 782.endif 783 784SUBDIR+=${MODULES_EXTRA} 785 786.for reject in ${WITHOUT_MODULES} 787SUBDIR:= ${SUBDIR:N${reject}} 788.endfor 789 790# Calling kldxref(8) for each module is expensive. 791.if !defined(NO_XREF) 792.MAKEFLAGS+= -DNO_XREF 793afterinstall: .PHONY 794 @if type kldxref >/dev/null 2>&1; then \ 795 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 796 kldxref ${DESTDIR}${KMODDIR}; \ 797 fi 798.endif 799 800.include "${SYSDIR}/conf/config.mk" 801 802SUBDIR:= ${SUBDIR:u:O} 803 804.include <bsd.subdir.mk> 805