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