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