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