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