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