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