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