1# $FreeBSD$ 2 3SYSDIR?=${SRCTOP}/sys 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 ahci \ 31 ${_aic} \ 32 aic7xxx \ 33 alc \ 34 ale \ 35 alq \ 36 ${_amd_ecc_inject} \ 37 ${_amdsbwd} \ 38 ${_amdsmn} \ 39 ${_amdtemp} \ 40 amr \ 41 ${_an} \ 42 ${_aout} \ 43 ${_apm} \ 44 ${_arcmsr} \ 45 ${_arcnet} \ 46 ${_armv8crypto} \ 47 ${_asmc} \ 48 ata \ 49 ath \ 50 ath_dfs \ 51 ath_hal \ 52 ath_hal_ar5210 \ 53 ath_hal_ar5211 \ 54 ath_hal_ar5212 \ 55 ath_hal_ar5416 \ 56 ath_hal_ar9300 \ 57 ath_main \ 58 ath_rate \ 59 ath_pci \ 60 ${_autofs} \ 61 ${_auxio} \ 62 ${_bce} \ 63 bfe \ 64 bge \ 65 bhnd \ 66 ${_bxe} \ 67 ${_bios} \ 68 ${_bktr} \ 69 ${_bm} \ 70 bnxt \ 71 bridgestp \ 72 bwi \ 73 bwn \ 74 bwn_pci \ 75 ${_bytgpio} \ 76 cam \ 77 ${_cardbus} \ 78 ${_carp} \ 79 cas \ 80 ${_cbb} \ 81 cc \ 82 cd9660 \ 83 cd9660_iconv \ 84 ${_ce} \ 85 ${_cfi} \ 86 chacha20 \ 87 ${_chromebook_platform} \ 88 ${_ciss} \ 89 cloudabi \ 90 ${_cloudabi32} \ 91 ${_cloudabi64} \ 92 ${_cm} \ 93 ${_cmx} \ 94 ${_coff} \ 95 ${_coretemp} \ 96 ${_cp} \ 97 ${_cpsw} \ 98 ${_cpuctl} \ 99 ${_cpufreq} \ 100 ${_crypto} \ 101 ${_cryptodev} \ 102 ${_cs} \ 103 ${_ctau} \ 104 ctl \ 105 ${_cxgb} \ 106 ${_cxgbe} \ 107 dc \ 108 dcons \ 109 dcons_crom \ 110 de \ 111 ${_dpms} \ 112 ${_dpt} \ 113 ${_drm} \ 114 ${_drm2} \ 115 dummynet \ 116 ${_ed} \ 117 ${_efirt} \ 118 ${_em} \ 119 ${_ena} \ 120 ${_ep} \ 121 ${_epic} \ 122 esp \ 123 ${_et} \ 124 evdev \ 125 ${_ex} \ 126 ${_exca} \ 127 ext2fs \ 128 fdc \ 129 fdescfs \ 130 ${_fe} \ 131 ${_ffec} \ 132 filemon \ 133 firewire \ 134 firmware \ 135 fuse \ 136 ${_fxp} \ 137 gem \ 138 geom \ 139 ${_glxiic} \ 140 ${_glxsb} \ 141 gpio \ 142 hifn \ 143 hme \ 144 ${_hpt27xx} \ 145 ${_hptiop} \ 146 ${_hptmv} \ 147 ${_hptnr} \ 148 ${_hptrr} \ 149 hwpmc \ 150 ${_hwpmc_mips24k} \ 151 ${_hwpmc_mips74k} \ 152 ${_hyperv} \ 153 i2c \ 154 ${_ibcore} \ 155 ${_ibcs2} \ 156 ${_ichwd} \ 157 ${_ida} \ 158 if_bridge \ 159 if_disc \ 160 if_edsc \ 161 ${_if_enc} \ 162 if_epair \ 163 ${_if_gif} \ 164 ${_if_gre} \ 165 ${_if_me} \ 166 if_lagg \ 167 ${_if_ndis} \ 168 ${_if_stf} \ 169 if_tap \ 170 if_tun \ 171 if_vlan \ 172 if_vxlan \ 173 ${_iir} \ 174 imgact_binmisc \ 175 ${_intelspi} \ 176 ${_io} \ 177 ${_ioat} \ 178 ${_ipoib} \ 179 ${_ipdivert} \ 180 ${_ipfilter} \ 181 ${_ipfw} \ 182 ipfw_nat \ 183 ${_ipfw_nat64} \ 184 ${_ipfw_nptv6} \ 185 ${_ipfw_pmod} \ 186 ${_ipmi} \ 187 ip6_mroute_mod \ 188 ip_mroute_mod \ 189 ${_ips} \ 190 ${_ipsec} \ 191 ${_ipw} \ 192 ${_ipwfw} \ 193 ${_isci} \ 194 ${_iser} \ 195 isp \ 196 ${_ispfw} \ 197 ${_iwi} \ 198 ${_iwifw} \ 199 ${_iwm} \ 200 ${_iwmfw} \ 201 ${_iwn} \ 202 ${_iwnfw} \ 203 ${_ix} \ 204 ${_ixv} \ 205 ${_ixgb} \ 206 ${_ixl} \ 207 ${_ixlv} \ 208 jme \ 209 joy \ 210 kbdmux \ 211 kgssapi \ 212 kgssapi_krb5 \ 213 khelp \ 214 krpc \ 215 ksyms \ 216 le \ 217 lge \ 218 libalias \ 219 libiconv \ 220 libmchain \ 221 ${_linprocfs} \ 222 ${_linsysfs} \ 223 ${_linux} \ 224 ${_linux_common} \ 225 ${_linux64} \ 226 linuxkpi \ 227 ${_lio} \ 228 lmc \ 229 lpt \ 230 mac_biba \ 231 mac_bsdextended \ 232 mac_ifoff \ 233 mac_lomac \ 234 mac_mls \ 235 mac_none \ 236 mac_partition \ 237 mac_portacl \ 238 mac_seeotheruids \ 239 mac_stub \ 240 mac_test \ 241 malo \ 242 md \ 243 mdio \ 244 mem \ 245 mfi \ 246 mii \ 247 mlx \ 248 ${_mlx4} \ 249 ${_mlx4ib} \ 250 ${_mlx4en} \ 251 ${_mlx5} \ 252 ${_mlx5en} \ 253 ${_mlx5ib} \ 254 ${_mly} \ 255 mmc \ 256 mmcsd \ 257 mpr \ 258 mps \ 259 mpt \ 260 mqueue \ 261 mrsas \ 262 msdosfs \ 263 msdosfs_iconv \ 264 ${_mse} \ 265 msk \ 266 mvs \ 267 mwl \ 268 ${_mwlfw} \ 269 mxge \ 270 my \ 271 ${_nandfs} \ 272 ${_nandsim} \ 273 ${_ncr} \ 274 ${_nctgpio} \ 275 ${_ncv} \ 276 ${_ndis} \ 277 ${_netgraph} \ 278 ${_nfe} \ 279 nfscl \ 280 nfscommon \ 281 nfsd \ 282 nfslock \ 283 nfslockd \ 284 nfssvc \ 285 nge \ 286 nmdm \ 287 ${_nsp} \ 288 nullfs \ 289 ${_ntb} \ 290 ${_nvd} \ 291 ${_nvme} \ 292 ${_nvram} \ 293 ${_nxge} \ 294 oce \ 295 otus \ 296 ${_otusfw} \ 297 ow \ 298 ${_padlock} \ 299 ${_padlock_rng} \ 300 ${_pccard} \ 301 ${_pcfclock} \ 302 pcn \ 303 ${_pf} \ 304 ${_pflog} \ 305 ${_pfsync} \ 306 plip \ 307 ${_pms} \ 308 ppbus \ 309 ppc \ 310 ppi \ 311 pps \ 312 procfs \ 313 proto \ 314 pseudofs \ 315 ${_pst} \ 316 pty \ 317 puc \ 318 ${_qlxge} \ 319 ${_qlxgb} \ 320 ${_qlxgbe} \ 321 ${_qlnx} \ 322 ral \ 323 ${_ralfw} \ 324 ${_random_fortuna} \ 325 ${_random_yarrow} \ 326 ${_random_other} \ 327 rc4 \ 328 ${_rdma} \ 329 ${_rdrand_rng} \ 330 re \ 331 rl \ 332 rtwn \ 333 rtwn_pci \ 334 rtwn_usb \ 335 ${_rtwnfw} \ 336 ${_s3} \ 337 ${_safe} \ 338 ${_sbni} \ 339 scc \ 340 ${_scsi_low} \ 341 sdhci \ 342 ${_sdhci_acpi} \ 343 sdhci_pci \ 344 sem \ 345 send \ 346 ${_sf} \ 347 ${_sfxge} \ 348 sge \ 349 ${_sgx} \ 350 ${_sgx_linux} \ 351 siba_bwn \ 352 siftr \ 353 siis \ 354 sis \ 355 sk \ 356 smbfs \ 357 sn \ 358 snp \ 359 sound \ 360 ${_speaker} \ 361 spigen \ 362 ${_splash} \ 363 ${_sppp} \ 364 ste \ 365 ${_stg} \ 366 stge \ 367 ${_sym} \ 368 ${_syscons} \ 369 sysvipc \ 370 tcp \ 371 ${_ti} \ 372 tl \ 373 tmpfs \ 374 ${_toecore} \ 375 ${_tpm} \ 376 trm \ 377 ${_twa} \ 378 twe \ 379 tws \ 380 tx \ 381 ${_txp} \ 382 uart \ 383 ubsec \ 384 udf \ 385 udf_iconv \ 386 ufs \ 387 uinput \ 388 unionfs \ 389 usb \ 390 ${_vesa} \ 391 ${_virtio} \ 392 vge \ 393 ${_viawd} \ 394 videomode \ 395 vkbd \ 396 ${_vmm} \ 397 ${_vmware} \ 398 ${_vpo} \ 399 vr \ 400 vte \ 401 vx \ 402 ${_vxge} \ 403 wb \ 404 ${_wbwd} \ 405 ${_wi} \ 406 wlan \ 407 wlan_acl \ 408 wlan_amrr \ 409 wlan_ccmp \ 410 wlan_rssadapt \ 411 wlan_tkip \ 412 wlan_wep \ 413 wlan_xauth \ 414 ${_wpi} \ 415 ${_wpifw} \ 416 ${_x86bios} \ 417 ${_xe} \ 418 xl \ 419 zlib 420 421.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 422_autofs= autofs 423.endif 424 425.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 426.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \ 427 ${MACHINE_CPUARCH} != "mips" && \ 428 ${MACHINE_CPUARCH} != "sparc64" 429SUBDIR+= dtrace 430.endif 431SUBDIR+= opensolaris 432.endif 433 434.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 435.if exists(${SRCTOP}/sys/opencrypto) 436_crypto= crypto 437_cryptodev= cryptodev 438_random_fortuna=random_fortuna 439_random_yarrow= random_yarrow 440_random_other= random_other 441.endif 442.endif 443 444.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 445SUBDIR+= cuse 446.endif 447 448.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 449 defined(ALL_MODULES) 450_carp= carp 451_toecore= toecore 452_if_enc= if_enc 453_if_gif= if_gif 454_if_gre= if_gre 455_ipfw_pmod= ipfw_pmod 456.if ${MK_IPSEC_SUPPORT} != "no" 457_ipsec= ipsec 458.endif 459.endif 460 461.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 462 defined(ALL_MODULES) 463_if_stf= if_stf 464.endif 465 466.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 467_if_me= if_me 468_ipdivert= ipdivert 469_ipfw= ipfw 470.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 471_ipfw_nat64= ipfw_nat64 472.endif 473.endif 474 475.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 476_ipfw_nptv6= ipfw_nptv6 477.endif 478 479.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 480_ipfilter= ipfilter 481.endif 482 483.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 484SUBDIR+= cfiscsi 485SUBDIR+= iscsi 486SUBDIR+= iscsi_initiator 487.endif 488 489.if ${MK_NAND} != "no" || defined(ALL_MODULES) 490_nandfs= nandfs 491_nandsim= nandsim 492.endif 493 494.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 495_netgraph= netgraph 496.endif 497 498.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 499 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 500_pf= pf 501_pflog= pflog 502.if ${MK_INET_SUPPORT} != "no" 503_pfsync= pfsync 504.endif 505.endif 506 507.if ${MK_SOURCELESS_UCODE} != "no" 508_bce= bce 509_fxp= fxp 510_ispfw= ispfw 511_sf= sf 512_ti= ti 513_txp= txp 514 515.if ${MACHINE_CPUARCH} != "mips" 516_mwlfw= mwlfw 517_otusfw= otusfw 518_ralfw= ralfw 519_rtwnfw= rtwnfw 520.endif 521.endif 522 523.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 524 ${MACHINE_CPUARCH} != "mips" && \ 525 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 526 ${MACHINE_CPUARCH} != "riscv" 527_cxgbe= cxgbe 528.endif 529 530.if ${MK_TESTS} != "no" || defined(ALL_MODULES) 531SUBDIR+= tests 532.endif 533 534.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 535SUBDIR+= zfs 536.endif 537 538.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") 539_hwpmc_mips24k= hwpmc_mips24k 540_hwpmc_mips74k= hwpmc_mips74k 541.endif 542 543.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 544 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 545 ${MACHINE_CPUARCH} != "riscv" 546_syscons= syscons 547_vpo= vpo 548.endif 549 550.if ${MACHINE_CPUARCH} != "mips" 551# no BUS_SPACE_UNSPECIFIED 552# No barrier instruction support (specific to this driver) 553_sym= sym 554# intr_disable() is a macro, causes problems 555.if ${MK_SOURCELESS_UCODE} != "no" 556_cxgb= cxgb 557.endif 558.endif 559 560.if ${MACHINE_CPUARCH} == "aarch64" 561_armv8crypto= armv8crypto 562_efirt= efirt 563_em= em 564.endif 565 566.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 567_agp= agp 568_an= an 569_aout= aout 570_bios= bios 571_bktr= bktr 572.if ${MK_SOURCELESS_UCODE} != "no" 573_bxe= bxe 574.endif 575_cardbus= cardbus 576_cbb= cbb 577_cpuctl= cpuctl 578_cpufreq= cpufreq 579_cs= cs 580_dpms= dpms 581_drm= drm 582_drm2= drm2 583_ed= ed 584_em= em 585_ena= ena 586_ep= ep 587_et= et 588_exca= exca 589_fe= fe 590.if ${MK_OFED} != "no" || defined(ALL_MODULES) 591_ibcore= ibcore 592.endif 593_if_ndis= if_ndis 594_io= io 595.if ${MK_OFED} != "no" || defined(ALL_MODULES) 596_ipoib= ipoib 597_iser= iser 598.endif 599_ix= ix 600_ixv= ixv 601_linprocfs= linprocfs 602_linsysfs= linsysfs 603_linux= linux 604.if ${MK_SOURCELESS_UCODE} != "no" 605_lio= lio 606.endif 607_nctgpio= nctgpio 608_ndis= ndis 609_pccard= pccard 610.if ${MK_OFED} != "no" || defined(ALL_MODULES) 611_rdma= rdma 612.endif 613_safe= safe 614_scsi_low= scsi_low 615_speaker= speaker 616_splash= splash 617_sppp= sppp 618_vmware= vmware 619_vxge= vxge 620_wbwd= wbwd 621_wi= wi 622_xe= xe 623 624_aac= aac 625_aacraid= aacraid 626_acpi= acpi 627.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 628_aesni= aesni 629.endif 630_amd_ecc_inject=amd_ecc_inject 631_amdsbwd= amdsbwd 632_amdsmn= amdsmn 633_amdtemp= amdtemp 634_arcmsr= arcmsr 635_asmc= asmc 636_bytgpio= bytgpio 637_ciss= ciss 638_chromebook_platform= chromebook_platform 639_cmx= cmx 640_coretemp= coretemp 641.if ${MK_SOURCELESS_HOST} != "no" 642_hpt27xx= hpt27xx 643.endif 644_hptiop= hptiop 645.if ${MK_SOURCELESS_HOST} != "no" 646_hptmv= hptmv 647_hptnr= hptnr 648_hptrr= hptrr 649.endif 650_hyperv= hyperv 651_ichwd= ichwd 652_ida= ida 653_iir= iir 654_intelspi= intelspi 655_ipmi= ipmi 656_ips= ips 657_isci= isci 658_ipw= ipw 659_iwi= iwi 660_iwm= iwm 661_iwn= iwn 662_ixgb= ixgb 663.if ${MK_SOURCELESS_UCODE} != "no" 664_ipwfw= ipwfw 665_iwifw= iwifw 666_iwmfw= iwmfw 667_iwnfw= iwnfw 668.endif 669_mlx4= mlx4 670_mlx5= mlx5 671.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 672 defined(ALL_MODULES) 673_mlx4en= mlx4en 674_mlx5en= mlx5en 675.endif 676.if ${MK_OFED} != "no" || defined(ALL_MODULES) 677_mlx4ib= mlx4ib 678_mlx5ib= mlx5ib 679.endif 680_mly= mly 681_nfe= nfe 682_nvd= nvd 683_nvme= nvme 684_nvram= nvram 685_nxge= nxge 686.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 687_padlock= padlock 688_padlock_rng= padlock_rng 689_rdrand_rng= rdrand_rng 690.endif 691_s3= s3 692_sdhci_acpi= sdhci_acpi 693_tpm= tpm 694_twa= twa 695_vesa= vesa 696_viawd= viawd 697_virtio= virtio 698_wpi= wpi 699.if ${MK_SOURCELESS_UCODE} != "no" 700_wpifw= wpifw 701.endif 702_x86bios= x86bios 703.endif 704 705.if ${MACHINE_CPUARCH} == "amd64" 706_efirt= efirt 707_ioat= ioat 708_ixl= ixl 709_ixlv= ixlv 710_linux64= linux64 711_linux_common= linux_common 712_ntb= ntb 713_pms= pms 714_qlxge= qlxge 715_qlxgb= qlxgb 716.if ${MK_SOURCELESS_UCODE} != "no" 717_qlxgbe= qlxgbe 718_qlnx= qlnx 719.endif 720_sfxge= sfxge 721_sgx= sgx 722_sgx_linux= sgx_linux 723 724.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 725_vmm= vmm 726.endif 727.endif 728 729.if ${MACHINE_CPUARCH} == "i386" 730# XXX some of these can move to the general case when de-i386'ed 731# XXX some of these can move now, but are untested on other architectures. 732_3dfx= 3dfx 733_3dfx_linux= 3dfx_linux 734_aic= aic 735_apm= apm 736_arcnet= arcnet 737.if ${MK_SOURCELESS_UCODE} != "no" 738_ce= ce 739.endif 740_coff= coff 741.if ${MK_SOURCELESS_UCODE} != "no" 742_cp= cp 743.endif 744_glxiic= glxiic 745_glxsb= glxsb 746#_ibcs2= ibcs2 747_mse= mse 748_ncr= ncr 749_ncv= ncv 750_nsp= nsp 751_pcfclock= pcfclock 752_pst= pst 753_sbni= sbni 754_stg= stg 755_cm= cm 756.if ${MK_SOURCELESS_UCODE} != "no" 757_ctau= ctau 758.endif 759_dpt= dpt 760_ex= ex 761.endif 762 763.if ${MACHINE_CPUARCH} == "arm" 764_cfi= cfi 765_cpsw= cpsw 766.endif 767 768.if ${MACHINE_CPUARCH} == "powerpc" 769_agp= agp 770_an= an 771_bm= bm 772_cardbus= cardbus 773_cbb= cbb 774_cfi= cfi 775_cpufreq= cpufreq 776_drm= drm 777_exca= exca 778_ffec= ffec 779_pccard= pccard 780_wi= wi 781.endif 782 783.if ${MACHINE_ARCH} == "powerpc64" 784_drm2= drm2 785.endif 786.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 787# Don't build powermac_nvram for powerpcspe, it's never supported. 788_nvram= powermac_nvram 789.endif 790 791.if ${MACHINE_CPUARCH} == "sparc64" 792_auxio= auxio 793_em= em 794_epic= epic 795.endif 796 797.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 798 ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "i386") 799_cloudabi32= cloudabi32 800.endif 801.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 802_cloudabi64= cloudabi64 803.endif 804 805.endif 806 807.if ${MACHINE_ARCH:Marmv[67]*} != "" 808_ffec= ffec 809.endif 810 811SUBDIR+=${MODULES_EXTRA} 812 813.for reject in ${WITHOUT_MODULES} 814SUBDIR:= ${SUBDIR:N${reject}} 815.endfor 816 817# Calling kldxref(8) for each module is expensive. 818.if !defined(NO_XREF) 819.MAKEFLAGS+= -DNO_XREF 820afterinstall: .PHONY 821 @if type kldxref >/dev/null 2>&1; then \ 822 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 823 kldxref ${DESTDIR}${KMODDIR}; \ 824 fi 825.endif 826 827.include "${SYSDIR}/conf/config.mk" 828 829SUBDIR:= ${SUBDIR:u:O} 830 831.include <bsd.subdir.mk> 832