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