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 bge \ 54 ${_bxe} \ 55 ${_bios} \ 56 ${_bktr} \ 57 ${_bm} \ 58 bridgestp \ 59 bwi \ 60 bwn \ 61 cam \ 62 ${_canbepm} \ 63 ${_canbus} \ 64 ${_cardbus} \ 65 ${_carp} \ 66 cas \ 67 ${_cbb} \ 68 cc \ 69 cd9660 \ 70 cd9660_iconv \ 71 ${_ce} \ 72 ${_cfi} \ 73 ${_ciss} \ 74 cloudabi \ 75 ${_cloudabi64} \ 76 ${_cm} \ 77 ${_cmx} \ 78 ${_coff} \ 79 ${_coretemp} \ 80 ${_cp} \ 81 ${_cpsw} \ 82 ${_cpuctl} \ 83 ${_cpufreq} \ 84 ${_crypto} \ 85 ${_cryptodev} \ 86 ${_cs} \ 87 ${_ct} \ 88 ${_ctau} \ 89 ctl \ 90 ${_cxgb} \ 91 ${_cxgbe} \ 92 dc \ 93 dcons \ 94 dcons_crom \ 95 de \ 96 ${_dpms} \ 97 ${_dpt} \ 98 ${_drm} \ 99 ${_drm2} \ 100 dummynet \ 101 ${_ed} \ 102 ${_elink} \ 103 ${_em} \ 104 en \ 105 ${_ep} \ 106 ${_epic} \ 107 esp \ 108 ${_et} \ 109 ${_ex} \ 110 ${_exca} \ 111 ext2fs \ 112 ${_fatm} \ 113 fdc \ 114 fdescfs \ 115 ${_fe} \ 116 ${_filemon} \ 117 firewire \ 118 firmware \ 119 fuse \ 120 ${_fxp} \ 121 gem \ 122 geom \ 123 ${_glxiic} \ 124 ${_glxsb} \ 125 hatm \ 126 hifn \ 127 hme \ 128 ${_hpt27xx} \ 129 ${_hptiop} \ 130 ${_hptmv} \ 131 ${_hptnr} \ 132 ${_hptrr} \ 133 hwpmc \ 134 ${_hyperv} \ 135 i2c \ 136 ${_ibcore} \ 137 ${_ibcs2} \ 138 ${_ichwd} \ 139 ${_ida} \ 140 ${_ie} \ 141 if_bridge \ 142 if_disc \ 143 if_edsc \ 144 ${_if_enc} \ 145 if_epair \ 146 ${_if_gif} \ 147 ${_if_gre} \ 148 ${_if_me} \ 149 if_lagg \ 150 ${_if_ndis} \ 151 ${_if_stf} \ 152 if_tap \ 153 if_tun \ 154 if_vlan \ 155 if_vxlan \ 156 ${_igb} \ 157 ${_iir} \ 158 imgact_binmisc \ 159 ${_io} \ 160 ${_ioat} \ 161 ${_ipoib} \ 162 ${_ipdivert} \ 163 ${_ipfilter} \ 164 ${_ipfw} \ 165 ipfw_nat \ 166 ${_ipmi} \ 167 ip6_mroute_mod \ 168 ip_mroute_mod \ 169 ${_ips} \ 170 ${_ipw} \ 171 ${_ipwfw} \ 172 ${_isci} \ 173 isp \ 174 ${_ispfw} \ 175 ${_iwi} \ 176 ${_iwifw} \ 177 ${_iwm} \ 178 ${_iwmfw} \ 179 ${_iwn} \ 180 ${_iwnfw} \ 181 ${_ix} \ 182 ${_ixv} \ 183 ${_ixgb} \ 184 ${_ixl} \ 185 ${_ixlv} \ 186 jme \ 187 joy \ 188 kbdmux \ 189 kgssapi \ 190 kgssapi_krb5 \ 191 khelp \ 192 krpc \ 193 ksyms \ 194 le \ 195 lge \ 196 libalias \ 197 libiconv \ 198 libmbpool \ 199 libmchain \ 200 ${_linprocfs} \ 201 ${_linsysfs} \ 202 ${_linux} \ 203 ${_linux_common} \ 204 ${_linux64} \ 205 linuxkpi \ 206 lmc \ 207 lpt \ 208 mac_biba \ 209 mac_bsdextended \ 210 mac_ifoff \ 211 mac_lomac \ 212 mac_mls \ 213 mac_none \ 214 mac_partition \ 215 mac_portacl \ 216 mac_seeotheruids \ 217 mac_stub \ 218 mac_test \ 219 malo \ 220 mcd \ 221 md \ 222 mdio \ 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 rtwn \ 314 ${_rtwnfw} \ 315 ${_s3} \ 316 ${_safe} \ 317 ${_sbni} \ 318 scc \ 319 scd \ 320 ${_scsi_low} \ 321 sdhci \ 322 sdhci_pci \ 323 sem \ 324 send \ 325 ${_sf} \ 326 ${_sfxge} \ 327 sge \ 328 ${_si} \ 329 siba_bwn \ 330 siftr \ 331 siis \ 332 sis \ 333 sk \ 334 smbfs \ 335 sn \ 336 ${_snc} \ 337 snp \ 338 sound \ 339 ${_speaker} \ 340 ${_splash} \ 341 ${_sppp} \ 342 ste \ 343 ${_stg} \ 344 stge \ 345 ${_streams} \ 346 ${_svr4} \ 347 ${_sym} \ 348 ${_syscons} \ 349 sysvipc \ 350 ${_ti} \ 351 tcp/fastpath \ 352 tests/framework \ 353 tests/callout_test \ 354 tl \ 355 tmpfs \ 356 ${_toecore} \ 357 ${_tpm} \ 358 trm \ 359 ${_twa} \ 360 twe \ 361 tws \ 362 tx \ 363 ${_txp} \ 364 uart \ 365 ubsec \ 366 udf \ 367 udf_iconv \ 368 ufs \ 369 unionfs \ 370 urtwn \ 371 ${_urtwnfw} \ 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_urtwnfw= urtwnfw 490_sf= sf 491_ti= ti 492_txp= txp 493.endif 494 495.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 496 ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \ 497 ${MACHINE_ARCH} != "powerpc" 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_ix= ix 557_ixv= ixv 558_linprocfs= linprocfs 559_linsysfs= linsysfs 560_linux= linux 561_ndis= ndis 562_pccard= pccard 563.if ${MK_OFED} != "no" || defined(ALL_MODULES) 564_rdma= rdma 565.endif 566_safe= safe 567_scsi_low= scsi_low 568_si= si 569_speaker= speaker 570_splash= splash 571_sppp= sppp 572_vmware= vmware 573_vxge= vxge 574_wbwd= wbwd 575_wi= wi 576_xe= xe 577.if ${MACHINE} != "pc98" 578_aac= aac 579_aacraid= aacraid 580_acpi= acpi 581.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 582_aesni= aesni 583.endif 584_amdsbwd= amdsbwd 585_amdtemp= amdtemp 586_arcmsr= arcmsr 587_asmc= asmc 588_ciss= ciss 589_cmx= cmx 590_coretemp= coretemp 591.if ${MK_SOURCELESS_HOST} != "no" 592_hpt27xx= hpt27xx 593.endif 594_hptiop= hptiop 595.if ${MK_SOURCELESS_HOST} != "no" 596_hptmv= hptmv 597_hptnr= hptnr 598_hptrr= hptrr 599.endif 600_hyperv= hyperv 601_ichwd= ichwd 602_ida= ida 603_iir= iir 604_ipmi= ipmi 605_ips= ips 606_isci= isci 607_ipw= ipw 608_iwi= iwi 609_iwm= iwm 610_iwn= iwn 611_ixgb= ixgb 612.if ${MK_SOURCELESS_UCODE} != "no" 613_ipwfw= ipwfw 614_iwifw= iwifw 615_iwmfw= iwmfw 616_iwnfw= iwnfw 617.endif 618.if ${MK_OFED} != "no" || defined(ALL_MODULES) 619_mlx4= mlx4 620_mlx4ib= mlx4ib 621_mlxen= mlxen 622.endif 623_mlx5= mlx5 624.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 625 defined(ALL_MODULES) 626_mlx5en= mlx5en 627.endif 628_mly= mly 629.if ${MK_OFED} != "no" || defined(ALL_MODULES) 630_mthca= mthca 631.endif 632_nfe= nfe 633_nvd= nvd 634_nvme= nvme 635_nvram= nvram 636_nxge= nxge 637.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 638_padlock= padlock 639_padlock_rng= padlock_rng 640_rdrand_rng= rdrand_rng 641.endif 642_s3= s3 643_tpm= tpm 644_twa= twa 645_vesa= vesa 646_viawd= viawd 647_virtio= virtio 648_wpi= wpi 649.if ${MK_SOURCELESS_UCODE} != "no" 650_wpifw= wpifw 651.endif 652_x86bios= x86bios 653.endif 654.endif 655 656.if ${MACHINE_CPUARCH} == "amd64" 657_ioat= ioat 658_ixl= ixl 659_ixlv= ixlv 660_linux64= linux64 661_linux_common= linux_common 662_ntb= ntb 663_pms= pms 664_qlxge= qlxge 665_qlxgb= qlxgb 666_qlxgbe= qlxgbe 667_sfxge= sfxge 668 669.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 670_vmm= vmm 671.endif 672.endif 673 674.if ${MACHINE_CPUARCH} == "i386" 675# XXX some of these can move to the general case when de-i386'ed 676# XXX some of these can move now, but are untested on other architectures. 677_3dfx= 3dfx 678_3dfx_linux= 3dfx_linux 679_aic= aic 680_apm= apm 681_arcnet= arcnet 682.if ${MK_SOURCELESS_UCODE} != "no" 683_ce= ce 684.endif 685_coff= coff 686.if ${MK_SOURCELESS_UCODE} != "no" 687_cp= cp 688.endif 689_elink= elink 690_glxiic= glxiic 691_glxsb= glxsb 692#_ibcs2= ibcs2 693_ie= ie 694_mse= mse 695_ncr= ncr 696_ncv= ncv 697_nsp= nsp 698_pcfclock= pcfclock 699_pst= pst 700_sbni= sbni 701_streams= streams 702_stg= stg 703_svr4= svr4 704_wds= wds 705.if ${MACHINE} == "i386" 706.if ${MK_EISA} != "no" 707_ahb= ahb 708.endif 709_bios= bios 710_cm= cm 711.if ${MK_SOURCELESS_UCODE} != "no" 712_ctau= ctau 713.endif 714_dpt= dpt 715_ex= ex 716_wl= wl 717.elif ${MACHINE} == "pc98" 718_canbepm= canbepm 719_canbus= canbus 720_ct= ct 721_pmc= pmc 722_snc= snc 723.endif 724.endif 725 726.if ${MACHINE_CPUARCH} == "arm" 727_cfi= cfi 728_cpsw= cpsw 729.endif 730 731.if ${MACHINE_CPUARCH} == "powerpc" 732_agp= agp 733_an= an 734_bm= bm 735_cardbus= cardbus 736_cbb= cbb 737_cfi= cfi 738_cpufreq= cpufreq 739_drm= drm 740_exca= exca 741_nvram= powermac_nvram 742_pccard= pccard 743_wi= wi 744.endif 745 746.if ${MACHINE_ARCH} == "powerpc64" 747_drm2= drm2 748.endif 749 750.if ${MACHINE_CPUARCH} == "sparc64" 751_auxio= auxio 752_em= em 753_epic= epic 754_igb= igb 755.endif 756 757.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 758_cloudabi64= cloudabi64 759.endif 760 761.endif 762 763SUBDIR+=${MODULES_EXTRA} 764 765.for reject in ${WITHOUT_MODULES} 766SUBDIR:= ${SUBDIR:N${reject}} 767.endfor 768 769# Calling kldxref(8) for each module is expensive. 770.if !defined(NO_XREF) 771.MAKEFLAGS+= -DNO_XREF 772afterinstall: 773 @if type kldxref >/dev/null 2>&1; then \ 774 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 775 kldxref ${DESTDIR}${KMODDIR}; \ 776 fi 777.endif 778 779.include "${SYSDIR}/conf/config.mk" 780 781SUBDIR:= ${SUBDIR:u:O} 782 783.include <bsd.subdir.mk> 784