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 ${_nctgpio} \ 259 ${_ndis} \ 260 ${_netgraph} \ 261 ${_nfe} \ 262 nfscl \ 263 nfscommon \ 264 nfsd \ 265 nfslock \ 266 nfslockd \ 267 nfssvc \ 268 nge \ 269 nmdm \ 270 nullfs \ 271 ${_ntb} \ 272 ${_nvd} \ 273 ${_nvdimm} \ 274 ${_nvme} \ 275 ${_nvram} \ 276 oce \ 277 ${_ocs_fc} \ 278 otus \ 279 ${_otusfw} \ 280 ow \ 281 ${_padlock} \ 282 ${_padlock_rng} \ 283 ${_pccard} \ 284 ${_pcfclock} \ 285 ${_pf} \ 286 ${_pflog} \ 287 ${_pfsync} \ 288 plip \ 289 ${_pms} \ 290 ppbus \ 291 ppc \ 292 ppi \ 293 pps \ 294 procfs \ 295 proto \ 296 pseudofs \ 297 ${_pst} \ 298 pty \ 299 puc \ 300 pwm \ 301 ${_qlxge} \ 302 ${_qlxgb} \ 303 ${_qlxgbe} \ 304 ${_qlnx} \ 305 ral \ 306 ${_ralfw} \ 307 ${_random_fortuna} \ 308 ${_random_other} \ 309 rc4 \ 310 ${_rdma} \ 311 ${_rdrand_rng} \ 312 re \ 313 rl \ 314 ${_rockchip} \ 315 rtwn \ 316 rtwn_pci \ 317 rtwn_usb \ 318 ${_rtwnfw} \ 319 ${_s3} \ 320 ${_safe} \ 321 ${_sbni} \ 322 scc \ 323 sdhci \ 324 ${_sdhci_acpi} \ 325 sdhci_pci \ 326 sdio \ 327 sem \ 328 send \ 329 ${_sfxge} \ 330 sge \ 331 ${_sgx} \ 332 ${_sgx_linux} \ 333 siftr \ 334 siis \ 335 sis \ 336 sk \ 337 ${_smartpqi} \ 338 smbfs \ 339 snp \ 340 sound \ 341 ${_speaker} \ 342 spi \ 343 ${_splash} \ 344 ${_sppp} \ 345 ste \ 346 stge \ 347 ${_superio} \ 348 ${_sym} \ 349 ${_syscons} \ 350 sysvipc \ 351 tcp \ 352 ${_ti} \ 353 tmpfs \ 354 ${_toecore} \ 355 ${_tpm} \ 356 trm \ 357 ${_twa} \ 358 twe \ 359 tws \ 360 uart \ 361 ubsec \ 362 udf \ 363 udf_iconv \ 364 ufs \ 365 uinput \ 366 unionfs \ 367 usb \ 368 ${_vesa} \ 369 ${_virtio} \ 370 vge \ 371 ${_viawd} \ 372 videomode \ 373 vkbd \ 374 ${_vmm} \ 375 ${_vmware} \ 376 ${_vpo} \ 377 vr \ 378 vte \ 379 ${_wbwd} \ 380 ${_wi} \ 381 wlan \ 382 wlan_acl \ 383 wlan_amrr \ 384 wlan_ccmp \ 385 wlan_rssadapt \ 386 wlan_tkip \ 387 wlan_wep \ 388 wlan_xauth \ 389 ${_wpi} \ 390 ${_wpifw} \ 391 ${_x86bios} \ 392 xl \ 393 xz \ 394 zlib 395 396.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 397_autofs= autofs 398.endif 399 400.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 401.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \ 402 ${MACHINE_CPUARCH} != "mips" && \ 403 ${MACHINE_CPUARCH} != "sparc64" 404SUBDIR+= dtrace 405.endif 406SUBDIR+= opensolaris 407.endif 408 409.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 410.if exists(${SRCTOP}/sys/opencrypto) 411_crypto= crypto 412_cryptodev= cryptodev 413_random_fortuna=random_fortuna 414_random_other= random_other 415.endif 416.endif 417 418.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 419SUBDIR+= cuse 420.endif 421 422.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 423 defined(ALL_MODULES) 424_carp= carp 425_toecore= toecore 426_if_enc= if_enc 427_if_gif= if_gif 428_if_gre= if_gre 429_ipfw_pmod= ipfw_pmod 430.if ${MK_IPSEC_SUPPORT} != "no" 431_ipsec= ipsec 432.endif 433.endif 434 435.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 436 defined(ALL_MODULES) 437_if_stf= if_stf 438.endif 439 440.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 441_if_me= if_me 442_ipdivert= ipdivert 443_ipfw= ipfw 444.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 445_ipfw_nat64= ipfw_nat64 446.endif 447.endif 448 449.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 450_ipfw_nptv6= ipfw_nptv6 451.endif 452 453.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 454_ipfilter= ipfilter 455.endif 456 457.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 458SUBDIR+= cfiscsi 459SUBDIR+= iscsi 460SUBDIR+= iscsi_initiator 461.endif 462 463.if !empty(OPT_FDT) 464SUBDIR+= fdt 465.endif 466 467.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 468 ${MACHINE_CPUARCH} == "i386" 469SUBDIR+= linprocfs 470SUBDIR+= linsysfs 471_ena= ena 472.if ${MK_OFED} != "no" || defined(ALL_MODULES) 473_ibcore= ibcore 474_ipoib= ipoib 475_iser= iser 476.endif 477_mlx4= mlx4 478_mlx5= mlx5 479.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 480 defined(ALL_MODULES) 481_mlx4en= mlx4en 482_mlx5en= mlx5en 483.endif 484.if ${MK_OFED} != "no" || defined(ALL_MODULES) 485_mthca= mthca 486_mlx4ib= mlx4ib 487_mlx5ib= mlx5ib 488.endif 489.endif 490 491.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 492_netgraph= netgraph 493.endif 494 495.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 496 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 497_pf= pf 498_pflog= pflog 499.if ${MK_INET_SUPPORT} != "no" 500_pfsync= pfsync 501.endif 502.endif 503 504.if ${MK_SOURCELESS_UCODE} != "no" 505_bce= bce 506_fxp= fxp 507_ispfw= ispfw 508_ti= ti 509 510.if ${MACHINE_CPUARCH} != "mips" 511_mwlfw= mwlfw 512_otusfw= otusfw 513_ralfw= ralfw 514_rtwnfw= rtwnfw 515.endif 516.endif 517 518.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 519 ${MACHINE_CPUARCH} != "mips" && \ 520 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 521 ${MACHINE_CPUARCH} != "riscv" 522_cxgbe= cxgbe 523.endif 524 525# These rely on 64bit atomics 526.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 527 ${MACHINE_CPUARCH} != "mips" 528_mps= mps 529_mpr= mpr 530.endif 531 532.if ${MK_TESTS} != "no" || defined(ALL_MODULES) 533SUBDIR+= tests 534.endif 535 536.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 537SUBDIR+= zfs 538.endif 539 540.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") 541_hwpmc_mips24k= hwpmc_mips24k 542_hwpmc_mips74k= hwpmc_mips74k 543.endif 544 545.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 546 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 547 ${MACHINE_CPUARCH} != "riscv" 548_syscons= syscons 549_vpo= vpo 550.endif 551 552.if ${MACHINE_CPUARCH} != "mips" 553# no BUS_SPACE_UNSPECIFIED 554# No barrier instruction support (specific to this driver) 555_sym= sym 556# intr_disable() is a macro, causes problems 557.if ${MK_SOURCELESS_UCODE} != "no" 558_cxgb= cxgb 559.endif 560.endif 561 562.if ${MACHINE_CPUARCH} == "aarch64" 563_allwinner= allwinner 564_armv8crypto= armv8crypto 565_efirt= efirt 566_em= em 567_rockchip= rockchip 568.endif 569 570.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 571_agp= agp 572_an= an 573_aout= aout 574_bios= bios 575_bktr= bktr 576.if ${MK_SOURCELESS_UCODE} != "no" 577_bxe= bxe 578.endif 579_cardbus= cardbus 580_cbb= cbb 581_cpuctl= cpuctl 582_cpufreq= cpufreq 583_dpms= dpms 584_em= em 585_et= et 586_exca= exca 587_if_ndis= if_ndis 588_io= io 589_ix= ix 590_ixv= ixv 591_linux= linux 592.if ${MK_SOURCELESS_UCODE} != "no" 593_lio= lio 594.endif 595_nctgpio= nctgpio 596_ndis= ndis 597_ocs_fc= ocs_fc 598_pccard= pccard 599.if ${MK_OFED} != "no" || defined(ALL_MODULES) 600_rdma= rdma 601.endif 602_safe= safe 603_speaker= speaker 604_splash= splash 605_sppp= sppp 606_vmware= vmware 607_wbwd= wbwd 608_wi= wi 609 610_aac= aac 611_aacraid= aacraid 612_acpi= acpi 613.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 614.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} > 40201 615_aesni= aesni 616.endif 617.endif 618_amd_ecc_inject=amd_ecc_inject 619_amdsbwd= amdsbwd 620_amdsmn= amdsmn 621_amdtemp= amdtemp 622_arcmsr= arcmsr 623_asmc= asmc 624.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 625_blake2= blake2 626.endif 627_bytgpio= bytgpio 628_chvgpio= chvgpio 629_ciss= ciss 630_chromebook_platform= chromebook_platform 631_cmx= cmx 632_coretemp= coretemp 633.if ${MK_SOURCELESS_HOST} != "no" 634_hpt27xx= hpt27xx 635.endif 636_hptiop= hptiop 637.if ${MK_SOURCELESS_HOST} != "no" 638_hptmv= hptmv 639_hptnr= hptnr 640_hptrr= hptrr 641.endif 642_hyperv= hyperv 643_ichwd= ichwd 644_ida= ida 645_iir= iir 646_intelspi= intelspi 647_ipmi= ipmi 648_ips= ips 649_isci= isci 650_ipw= ipw 651_iwi= iwi 652_iwm= iwm 653_iwn= iwn 654.if ${MK_SOURCELESS_UCODE} != "no" 655_ipwfw= ipwfw 656_iwifw= iwifw 657_iwmfw= iwmfw 658_iwnfw= iwnfw 659.endif 660_mly= mly 661_nfe= nfe 662_nvd= nvd 663_nvme= nvme 664_nvram= nvram 665.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 666_padlock= padlock 667_padlock_rng= padlock_rng 668_rdrand_rng= rdrand_rng 669.endif 670_s3= s3 671_sdhci_acpi= sdhci_acpi 672_superio= superio 673_tpm= tpm 674_twa= twa 675_vesa= vesa 676_viawd= viawd 677_virtio= virtio 678_wpi= wpi 679.if ${MK_SOURCELESS_UCODE} != "no" 680_wpifw= wpifw 681.endif 682_x86bios= x86bios 683.endif 684 685.if ${MACHINE_CPUARCH} == "amd64" 686_amdgpio= amdgpio 687_ccp= ccp 688_efirt= efirt 689_iavf= iavf 690_ioat= ioat 691_ixl= ixl 692_linux64= linux64 693_linux_common= linux_common 694_ntb= ntb 695_nvdimm= nvdimm 696_pms= pms 697_qlxge= qlxge 698_qlxgb= qlxgb 699.if ${MK_SOURCELESS_UCODE} != "no" 700_qlxgbe= qlxgbe 701_qlnx= qlnx 702.endif 703_sfxge= sfxge 704_sgx= sgx 705_sgx_linux= sgx_linux 706_smartpqi= smartpqi 707 708.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 709_vmm= vmm 710.endif 711.endif 712 713.if ${MACHINE_CPUARCH} == "i386" 714# XXX some of these can move to the general case when de-i386'ed 715# XXX some of these can move now, but are untested on other architectures. 716_3dfx= 3dfx 717_3dfx_linux= 3dfx_linux 718_apm= apm 719.if ${MK_SOURCELESS_UCODE} != "no" 720_ce= ce 721.endif 722.if ${MK_SOURCELESS_UCODE} != "no" 723_cp= cp 724.endif 725_glxiic= glxiic 726_glxsb= glxsb 727_pcfclock= pcfclock 728_pst= pst 729_sbni= sbni 730.if ${MK_SOURCELESS_UCODE} != "no" 731_ctau= ctau 732.endif 733.endif 734 735.if ${MACHINE_CPUARCH} == "arm" 736_cfi= cfi 737_cpsw= cpsw 738.endif 739 740.if ${MACHINE_CPUARCH} == "powerpc" 741_agp= agp 742_an= an 743_cardbus= cardbus 744_cbb= cbb 745_cfi= cfi 746_cpufreq= cpufreq 747_exca= exca 748_ffec= ffec 749_nvd= nvd 750_nvme= nvme 751_pccard= pccard 752_wi= wi 753.endif 754 755.if ${MACHINE_ARCH} == "powerpc64" 756_ipmi= ipmi 757.endif 758.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 759# Don't build powermac_nvram for powerpcspe, it's never supported. 760_nvram= powermac_nvram 761.endif 762 763.if ${MACHINE_CPUARCH} == "sparc64" 764_auxio= auxio 765_em= em 766_epic= epic 767.endif 768 769.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 770 ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "i386") 771_cloudabi32= cloudabi32 772.endif 773.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 774_cloudabi64= cloudabi64 775.endif 776 777.endif 778 779.if ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "aarch64" 780_bcm283x_clkman= bcm283x_clkman 781_bcm283x_pwm= bcm283x_pwm 782.endif 783 784SUBDIR+=${MODULES_EXTRA} 785 786.for reject in ${WITHOUT_MODULES} 787SUBDIR:= ${SUBDIR:N${reject}} 788.endfor 789 790# Calling kldxref(8) for each module is expensive. 791.if !defined(NO_XREF) 792.MAKEFLAGS+= -DNO_XREF 793afterinstall: .PHONY 794 @if type kldxref >/dev/null 2>&1; then \ 795 ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ 796 ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ 797 fi 798.endif 799 800.include "${SYSDIR}/conf/config.mk" 801 802SUBDIR:= ${SUBDIR:u:O} 803 804.include <bsd.subdir.mk> 805