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