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