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