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 ${_amdtemp} \ 39 amr \ 40 ${_an} \ 41 ${_aout} \ 42 ${_apm} \ 43 ${_arcmsr} \ 44 ${_arcnet} \ 45 ${_armv8crypto} \ 46 ${_asmc} \ 47 ata \ 48 ath \ 49 ath_dfs \ 50 ath_hal \ 51 ath_hal_ar5210 \ 52 ath_hal_ar5211 \ 53 ath_hal_ar5212 \ 54 ath_hal_ar5416 \ 55 ath_hal_ar9300 \ 56 ath_main \ 57 ath_rate \ 58 ath_pci \ 59 ${_autofs} \ 60 ${_auxio} \ 61 ${_bce} \ 62 bfe \ 63 bge \ 64 bhnd \ 65 ${_bxe} \ 66 ${_bios} \ 67 ${_bktr} \ 68 ${_bm} \ 69 bnxt \ 70 bridgestp \ 71 bwi \ 72 bwn \ 73 bwn_pci \ 74 ${_bytgpio} \ 75 cam \ 76 ${_cardbus} \ 77 ${_carp} \ 78 cas \ 79 ${_cbb} \ 80 cc \ 81 cd9660 \ 82 cd9660_iconv \ 83 ${_ce} \ 84 ${_cfi} \ 85 chacha20 \ 86 ${_chromebook_platform} \ 87 ${_ciss} \ 88 cloudabi \ 89 ${_cloudabi32} \ 90 ${_cloudabi64} \ 91 ${_cm} \ 92 ${_cmx} \ 93 ${_coff} \ 94 ${_coretemp} \ 95 ${_cp} \ 96 ${_cpsw} \ 97 ${_cpuctl} \ 98 ${_cpufreq} \ 99 ${_crypto} \ 100 ${_cryptodev} \ 101 ${_cs} \ 102 ${_ctau} \ 103 ctl \ 104 ${_cxgb} \ 105 ${_cxgbe} \ 106 dc \ 107 dcons \ 108 dcons_crom \ 109 de \ 110 ${_dpms} \ 111 ${_dpt} \ 112 ${_drm} \ 113 ${_drm2} \ 114 dummynet \ 115 ${_ed} \ 116 ${_efirt} \ 117 ${_elink} \ 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 libmbpool \ 221 libmchain \ 222 ${_linprocfs} \ 223 ${_linsysfs} \ 224 ${_linux} \ 225 ${_linux_common} \ 226 ${_linux64} \ 227 linuxkpi \ 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 ${_mthca} \ 267 mvs \ 268 mwl \ 269 ${_mwlfw} \ 270 mxge \ 271 my \ 272 ${_nandfs} \ 273 ${_nandsim} \ 274 ${_ncr} \ 275 ${_nctgpio} \ 276 ${_ncv} \ 277 ${_ndis} \ 278 ${_netgraph} \ 279 ${_nfe} \ 280 nfscl \ 281 nfscommon \ 282 nfsd \ 283 nfslock \ 284 nfslockd \ 285 nfssvc \ 286 nge \ 287 nmdm \ 288 ${_nsp} \ 289 nullfs \ 290 ${_ntb} \ 291 ${_nvd} \ 292 ${_nvme} \ 293 ${_nvram} \ 294 ${_nxge} \ 295 oce \ 296 otus \ 297 ${_otusfw} \ 298 ow \ 299 ${_padlock} \ 300 ${_padlock_rng} \ 301 ${_pccard} \ 302 ${_pcfclock} \ 303 pcn \ 304 ${_pf} \ 305 ${_pflog} \ 306 ${_pfsync} \ 307 plip \ 308 ${_pms} \ 309 ppbus \ 310 ppc \ 311 ppi \ 312 pps \ 313 procfs \ 314 proto \ 315 pseudofs \ 316 ${_pst} \ 317 pty \ 318 puc \ 319 ${_qlxge} \ 320 ${_qlxgb} \ 321 ${_qlxgbe} \ 322 ${_qlnx} \ 323 ral \ 324 ${_ralfw} \ 325 ${_random_fortuna} \ 326 ${_random_yarrow} \ 327 ${_random_other} \ 328 rc4 \ 329 ${_rdma} \ 330 ${_rdrand_rng} \ 331 re \ 332 rl \ 333 rtwn \ 334 rtwn_pci \ 335 rtwn_usb \ 336 ${_rtwnfw} \ 337 ${_s3} \ 338 ${_safe} \ 339 ${_sbni} \ 340 scc \ 341 ${_scsi_low} \ 342 sdhci \ 343 ${_sdhci_acpi} \ 344 sdhci_pci \ 345 sem \ 346 send \ 347 ${_sf} \ 348 ${_sfxge} \ 349 sge \ 350 ${_sgx} \ 351 ${_sgx_linux} \ 352 siba_bwn \ 353 siftr \ 354 siis \ 355 sis \ 356 sk \ 357 smbfs \ 358 sn \ 359 snp \ 360 sound \ 361 ${_speaker} \ 362 spigen \ 363 ${_splash} \ 364 ${_sppp} \ 365 ste \ 366 ${_stg} \ 367 stge \ 368 ${_sym} \ 369 ${_syscons} \ 370 sysvipc \ 371 tcp \ 372 ${_ti} \ 373 tl \ 374 tmpfs \ 375 ${_toecore} \ 376 ${_tpm} \ 377 trm \ 378 ${_twa} \ 379 twe \ 380 tws \ 381 tx \ 382 ${_txp} \ 383 uart \ 384 ubsec \ 385 udf \ 386 udf_iconv \ 387 ufs \ 388 uinput \ 389 unionfs \ 390 usb \ 391 ${_vesa} \ 392 ${_virtio} \ 393 vge \ 394 ${_viawd} \ 395 videomode \ 396 vkbd \ 397 ${_vmm} \ 398 ${_vmware} \ 399 ${_vpo} \ 400 vr \ 401 vte \ 402 vx \ 403 ${_vxge} \ 404 wb \ 405 ${_wbwd} \ 406 ${_wi} \ 407 wlan \ 408 wlan_acl \ 409 wlan_amrr \ 410 wlan_ccmp \ 411 wlan_rssadapt \ 412 wlan_tkip \ 413 wlan_wep \ 414 wlan_xauth \ 415 ${_wpi} \ 416 ${_wpifw} \ 417 ${_x86bios} \ 418 ${_xe} \ 419 xl \ 420 zlib 421 422.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 423_autofs= autofs 424.endif 425 426.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 427.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \ 428 ${MACHINE_CPUARCH} != "mips" && \ 429 ${MACHINE_CPUARCH} != "sparc64" 430SUBDIR+= dtrace 431.endif 432SUBDIR+= opensolaris 433.endif 434 435.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 436.if exists(${SRCTOP}/sys/opencrypto) 437_crypto= crypto 438_cryptodev= cryptodev 439_random_fortuna=random_fortuna 440_random_yarrow= random_yarrow 441_random_other= random_other 442.endif 443.endif 444 445.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 446SUBDIR+= cuse 447.endif 448 449.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 450 defined(ALL_MODULES) 451_carp= carp 452_toecore= toecore 453_if_enc= if_enc 454_if_gif= if_gif 455_if_gre= if_gre 456_ipfw_pmod= ipfw_pmod 457.if ${MK_IPSEC_SUPPORT} != "no" 458_ipsec= ipsec 459.endif 460.endif 461 462.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 463 defined(ALL_MODULES) 464_if_stf= if_stf 465.endif 466 467.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 468_if_me= if_me 469_ipdivert= ipdivert 470_ipfw= ipfw 471.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 472_ipfw_nat64= ipfw_nat64 473.endif 474.endif 475 476.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 477_ipfw_nptv6= ipfw_nptv6 478.endif 479 480.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 481_ipfilter= ipfilter 482.endif 483 484.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 485SUBDIR+= cfiscsi 486SUBDIR+= iscsi 487SUBDIR+= iscsi_initiator 488.endif 489 490.if ${MK_NAND} != "no" || defined(ALL_MODULES) 491_nandfs= nandfs 492_nandsim= nandsim 493.endif 494 495.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 496_netgraph= netgraph 497.endif 498 499.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 500 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 501_pf= pf 502_pflog= pflog 503.if ${MK_INET_SUPPORT} != "no" 504_pfsync= pfsync 505.endif 506.endif 507 508.if ${MK_SOURCELESS_UCODE} != "no" 509_bce= bce 510_fxp= fxp 511_ispfw= ispfw 512_sf= sf 513_ti= ti 514_txp= txp 515 516.if ${MACHINE_CPUARCH} != "mips" 517_mwlfw= mwlfw 518_otusfw= otusfw 519_ralfw= ralfw 520_rtwnfw= rtwnfw 521.endif 522.endif 523 524.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 525 ${MACHINE_CPUARCH} != "mips" && \ 526 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 527 ${MACHINE_CPUARCH} != "riscv" 528_cxgbe= cxgbe 529.endif 530 531.if ${MK_TESTS} != "no" || defined(ALL_MODULES) 532SUBDIR+= tests 533.endif 534 535.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 536SUBDIR+= zfs 537.endif 538 539.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") 540_hwpmc_mips24k= hwpmc_mips24k 541_hwpmc_mips74k= hwpmc_mips74k 542.endif 543 544.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 545 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 546 ${MACHINE_CPUARCH} != "riscv" 547_syscons= syscons 548_vpo= vpo 549.endif 550 551.if ${MACHINE_CPUARCH} != "mips" 552# no BUS_SPACE_UNSPECIFIED 553# No barrier instruction support (specific to this driver) 554_sym= sym 555# intr_disable() is a macro, causes problems 556.if ${MK_SOURCELESS_UCODE} != "no" 557_cxgb= cxgb 558.endif 559.endif 560 561.if ${MACHINE_CPUARCH} == "aarch64" 562_armv8crypto= armv8crypto 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_nctgpio= nctgpio 605_ndis= ndis 606_pccard= pccard 607.if ${MK_OFED} != "no" || defined(ALL_MODULES) 608_rdma= rdma 609.endif 610_safe= safe 611_scsi_low= scsi_low 612_speaker= speaker 613_splash= splash 614_sppp= sppp 615_vmware= vmware 616_vxge= vxge 617_wbwd= wbwd 618_wi= wi 619_xe= xe 620 621_aac= aac 622_aacraid= aacraid 623_acpi= acpi 624.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 625_aesni= aesni 626.endif 627_amd_ecc_inject=amd_ecc_inject 628_amdsbwd= amdsbwd 629_amdtemp= amdtemp 630_arcmsr= arcmsr 631_asmc= asmc 632_bytgpio= bytgpio 633_ciss= ciss 634_chromebook_platform= chromebook_platform 635_cmx= cmx 636_coretemp= coretemp 637.if ${MK_SOURCELESS_HOST} != "no" 638_hpt27xx= hpt27xx 639.endif 640_hptiop= hptiop 641.if ${MK_SOURCELESS_HOST} != "no" 642_hptmv= hptmv 643_hptnr= hptnr 644_hptrr= hptrr 645.endif 646_hyperv= hyperv 647_ichwd= ichwd 648_ida= ida 649_iir= iir 650_intelspi= intelspi 651_ipmi= ipmi 652_ips= ips 653_isci= isci 654_ipw= ipw 655_iwi= iwi 656_iwm= iwm 657_iwn= iwn 658_ixgb= ixgb 659.if ${MK_SOURCELESS_UCODE} != "no" 660_ipwfw= ipwfw 661_iwifw= iwifw 662_iwmfw= iwmfw 663_iwnfw= iwnfw 664.endif 665_mlx4= mlx4 666_mlx5= mlx5 667.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 668 defined(ALL_MODULES) 669_mlx4en= mlx4en 670_mlx5en= mlx5en 671.endif 672.if ${MK_OFED} != "no" || defined(ALL_MODULES) 673_mlx4ib= mlx4ib 674_mlx5ib= mlx5ib 675.endif 676_mly= mly 677.if ${MK_OFED} != "no" || defined(ALL_MODULES) 678_mthca= mthca 679.endif 680_nfe= nfe 681_nvd= nvd 682_nvme= nvme 683_nvram= nvram 684_nxge= nxge 685.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 686_padlock= padlock 687_padlock_rng= padlock_rng 688_rdrand_rng= rdrand_rng 689.endif 690_s3= s3 691_sdhci_acpi= sdhci_acpi 692_tpm= tpm 693_twa= twa 694_vesa= vesa 695_viawd= viawd 696_virtio= virtio 697_wpi= wpi 698.if ${MK_SOURCELESS_UCODE} != "no" 699_wpifw= wpifw 700.endif 701_x86bios= x86bios 702.endif 703 704.if ${MACHINE_CPUARCH} == "amd64" 705_efirt= efirt 706_ioat= ioat 707_ixl= ixl 708_ixlv= ixlv 709_linux64= linux64 710_linux_common= linux_common 711_ntb= ntb 712_pms= pms 713_qlxge= qlxge 714_qlxgb= qlxgb 715.if ${MK_SOURCELESS_UCODE} != "no" 716_qlxgbe= qlxgbe 717.endif 718_qlnx= qlnx 719_sfxge= sfxge 720_sgx= sgx 721_sgx_linux= sgx_linux 722 723.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 724_vmm= vmm 725.endif 726.endif 727 728.if ${MACHINE_CPUARCH} == "i386" 729# XXX some of these can move to the general case when de-i386'ed 730# XXX some of these can move now, but are untested on other architectures. 731_3dfx= 3dfx 732_3dfx_linux= 3dfx_linux 733_aic= aic 734_apm= apm 735_arcnet= arcnet 736.if ${MK_SOURCELESS_UCODE} != "no" 737_ce= ce 738.endif 739_coff= coff 740.if ${MK_SOURCELESS_UCODE} != "no" 741_cp= cp 742.endif 743_elink= elink 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} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 798 ${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} == "armv6" 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