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