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 ${_elink} \ 119 ${_em} \ 120 ${_ena} \ 121 ${_ep} \ 122 ${_epic} \ 123 esp \ 124 ${_et} \ 125 evdev \ 126 ${_ex} \ 127 ${_exca} \ 128 ext2fs \ 129 fdc \ 130 fdescfs \ 131 ${_fe} \ 132 ${_ffec} \ 133 filemon \ 134 firewire \ 135 firmware \ 136 fuse \ 137 ${_fxp} \ 138 gem \ 139 geom \ 140 ${_glxiic} \ 141 ${_glxsb} \ 142 gpio \ 143 hifn \ 144 hme \ 145 ${_hpt27xx} \ 146 ${_hptiop} \ 147 ${_hptmv} \ 148 ${_hptnr} \ 149 ${_hptrr} \ 150 hwpmc \ 151 ${_hwpmc_mips24k} \ 152 ${_hwpmc_mips74k} \ 153 ${_hyperv} \ 154 i2c \ 155 ${_ibcore} \ 156 ${_ibcs2} \ 157 ${_ichwd} \ 158 ${_ida} \ 159 if_bridge \ 160 if_disc \ 161 if_edsc \ 162 ${_if_enc} \ 163 if_epair \ 164 ${_if_gif} \ 165 ${_if_gre} \ 166 ${_if_me} \ 167 if_lagg \ 168 ${_if_ndis} \ 169 ${_if_stf} \ 170 if_tap \ 171 if_tun \ 172 if_vlan \ 173 if_vxlan \ 174 ${_iir} \ 175 imgact_binmisc \ 176 ${_intelspi} \ 177 ${_io} \ 178 ${_ioat} \ 179 ${_ipoib} \ 180 ${_ipdivert} \ 181 ${_ipfilter} \ 182 ${_ipfw} \ 183 ipfw_nat \ 184 ${_ipfw_nat64} \ 185 ${_ipfw_nptv6} \ 186 ${_ipfw_pmod} \ 187 ${_ipmi} \ 188 ip6_mroute_mod \ 189 ip_mroute_mod \ 190 ${_ips} \ 191 ${_ipsec} \ 192 ${_ipw} \ 193 ${_ipwfw} \ 194 ${_isci} \ 195 ${_iser} \ 196 isp \ 197 ${_ispfw} \ 198 ${_iwi} \ 199 ${_iwifw} \ 200 ${_iwm} \ 201 ${_iwmfw} \ 202 ${_iwn} \ 203 ${_iwnfw} \ 204 ${_ix} \ 205 ${_ixv} \ 206 ${_ixgb} \ 207 ${_ixl} \ 208 ${_ixlv} \ 209 jme \ 210 joy \ 211 kbdmux \ 212 kgssapi \ 213 kgssapi_krb5 \ 214 khelp \ 215 krpc \ 216 ksyms \ 217 le \ 218 lge \ 219 libalias \ 220 libiconv \ 221 libmchain \ 222 ${_linprocfs} \ 223 ${_linsysfs} \ 224 ${_linux} \ 225 ${_linux_common} \ 226 ${_linux64} \ 227 linuxkpi \ 228 ${_lio} \ 229 lmc \ 230 lpt \ 231 mac_biba \ 232 mac_bsdextended \ 233 mac_ifoff \ 234 mac_lomac \ 235 mac_mls \ 236 mac_none \ 237 mac_partition \ 238 mac_portacl \ 239 mac_seeotheruids \ 240 mac_stub \ 241 mac_test \ 242 malo \ 243 md \ 244 mdio \ 245 mem \ 246 mfi \ 247 mii \ 248 mlx \ 249 ${_mlx4} \ 250 ${_mlx4ib} \ 251 ${_mlx4en} \ 252 ${_mlx5} \ 253 ${_mlx5en} \ 254 ${_mlx5ib} \ 255 ${_mly} \ 256 mmc \ 257 mmcsd \ 258 mpr \ 259 mps \ 260 mpt \ 261 mqueue \ 262 mrsas \ 263 msdosfs \ 264 msdosfs_iconv \ 265 ${_mse} \ 266 msk \ 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:Marmv[67]*} != "") && \ 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_efirt= efirt 564_em= em 565.endif 566 567.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 568_agp= agp 569_an= an 570_aout= aout 571_bios= bios 572_bktr= bktr 573.if ${MK_SOURCELESS_UCODE} != "no" 574_bxe= bxe 575.endif 576_cardbus= cardbus 577_cbb= cbb 578_cpuctl= cpuctl 579_cpufreq= cpufreq 580_cs= cs 581_dpms= dpms 582_drm= drm 583_drm2= drm2 584_ed= ed 585_em= em 586_ena= ena 587_ep= ep 588_et= et 589_exca= exca 590_fe= fe 591.if ${MK_OFED} != "no" || defined(ALL_MODULES) 592_ibcore= ibcore 593.endif 594_if_ndis= if_ndis 595_io= io 596.if ${MK_OFED} != "no" || defined(ALL_MODULES) 597_ipoib= ipoib 598_iser= iser 599.endif 600_ix= ix 601_ixv= ixv 602_linprocfs= linprocfs 603_linsysfs= linsysfs 604_linux= linux 605.if ${MK_SOURCELESS_UCODE} != "no" 606_lio= lio 607.endif 608_nctgpio= nctgpio 609_ndis= ndis 610_pccard= pccard 611.if ${MK_OFED} != "no" || defined(ALL_MODULES) 612_rdma= rdma 613.endif 614_safe= safe 615_scsi_low= scsi_low 616_speaker= speaker 617_splash= splash 618_sppp= sppp 619_vmware= vmware 620_vxge= vxge 621_wbwd= wbwd 622_wi= wi 623_xe= xe 624 625_aac= aac 626_aacraid= aacraid 627_acpi= acpi 628.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 629_aesni= aesni 630.endif 631_amd_ecc_inject=amd_ecc_inject 632_amdsbwd= amdsbwd 633_amdsmn= amdsmn 634_amdtemp= amdtemp 635_arcmsr= arcmsr 636_asmc= asmc 637_bytgpio= bytgpio 638_ciss= ciss 639_chromebook_platform= chromebook_platform 640_cmx= cmx 641_coretemp= coretemp 642.if ${MK_SOURCELESS_HOST} != "no" 643_hpt27xx= hpt27xx 644.endif 645_hptiop= hptiop 646.if ${MK_SOURCELESS_HOST} != "no" 647_hptmv= hptmv 648_hptnr= hptnr 649_hptrr= hptrr 650.endif 651_hyperv= hyperv 652_ichwd= ichwd 653_ida= ida 654_iir= iir 655_intelspi= intelspi 656_ipmi= ipmi 657_ips= ips 658_isci= isci 659_ipw= ipw 660_iwi= iwi 661_iwm= iwm 662_iwn= iwn 663_ixgb= ixgb 664.if ${MK_SOURCELESS_UCODE} != "no" 665_ipwfw= ipwfw 666_iwifw= iwifw 667_iwmfw= iwmfw 668_iwnfw= iwnfw 669.endif 670_mlx4= mlx4 671_mlx5= mlx5 672.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 673 defined(ALL_MODULES) 674_mlx4en= mlx4en 675_mlx5en= mlx5en 676.endif 677.if ${MK_OFED} != "no" || defined(ALL_MODULES) 678_mlx4ib= mlx4ib 679_mlx5ib= mlx5ib 680.endif 681_mly= mly 682_nfe= nfe 683_nvd= nvd 684_nvme= nvme 685_nvram= nvram 686_nxge= nxge 687.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 688_padlock= padlock 689_padlock_rng= padlock_rng 690_rdrand_rng= rdrand_rng 691.endif 692_s3= s3 693_sdhci_acpi= sdhci_acpi 694_tpm= tpm 695_twa= twa 696_vesa= vesa 697_viawd= viawd 698_virtio= virtio 699_wpi= wpi 700.if ${MK_SOURCELESS_UCODE} != "no" 701_wpifw= wpifw 702.endif 703_x86bios= x86bios 704.endif 705 706.if ${MACHINE_CPUARCH} == "amd64" 707_efirt= efirt 708_ioat= ioat 709_ixl= ixl 710_ixlv= ixlv 711_linux64= linux64 712_linux_common= linux_common 713_ntb= ntb 714_pms= pms 715_qlxge= qlxge 716_qlxgb= qlxgb 717.if ${MK_SOURCELESS_UCODE} != "no" 718_qlxgbe= qlxgbe 719_qlnx= qlnx 720.endif 721_sfxge= sfxge 722_sgx= sgx 723_sgx_linux= sgx_linux 724 725.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 726_vmm= vmm 727.endif 728.endif 729 730.if ${MACHINE_CPUARCH} == "i386" 731# XXX some of these can move to the general case when de-i386'ed 732# XXX some of these can move now, but are untested on other architectures. 733_3dfx= 3dfx 734_3dfx_linux= 3dfx_linux 735_aic= aic 736_apm= apm 737_arcnet= arcnet 738.if ${MK_SOURCELESS_UCODE} != "no" 739_ce= ce 740.endif 741_coff= coff 742.if ${MK_SOURCELESS_UCODE} != "no" 743_cp= cp 744.endif 745_elink= elink 746_glxiic= glxiic 747_glxsb= glxsb 748#_ibcs2= ibcs2 749_mse= mse 750_ncr= ncr 751_ncv= ncv 752_nsp= nsp 753_pcfclock= pcfclock 754_pst= pst 755_sbni= sbni 756_stg= stg 757_cm= cm 758.if ${MK_SOURCELESS_UCODE} != "no" 759_ctau= ctau 760.endif 761_dpt= dpt 762_ex= ex 763.endif 764 765.if ${MACHINE_CPUARCH} == "arm" 766_cfi= cfi 767_cpsw= cpsw 768.endif 769 770.if ${MACHINE_CPUARCH} == "powerpc" 771_agp= agp 772_an= an 773_bm= bm 774_cardbus= cardbus 775_cbb= cbb 776_cfi= cfi 777_cpufreq= cpufreq 778_drm= drm 779_exca= exca 780_ffec= ffec 781_pccard= pccard 782_wi= wi 783.endif 784 785.if ${MACHINE_ARCH} == "powerpc64" 786_drm2= drm2 787.endif 788.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 789# Don't build powermac_nvram for powerpcspe, it's never supported. 790_nvram= powermac_nvram 791.endif 792 793.if ${MACHINE_CPUARCH} == "sparc64" 794_auxio= auxio 795_em= em 796_epic= epic 797.endif 798 799.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH:Marmv[67]*} != "" || \ 800 ${MACHINE_CPUARCH} == "i386") 801_cloudabi32= cloudabi32 802.endif 803.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 804_cloudabi64= cloudabi64 805.endif 806 807.endif 808 809.if ${MACHINE_ARCH:Marmv[67]*} != "" 810_ffec= ffec 811.endif 812 813SUBDIR+=${MODULES_EXTRA} 814 815.for reject in ${WITHOUT_MODULES} 816SUBDIR:= ${SUBDIR:N${reject}} 817.endfor 818 819# Calling kldxref(8) for each module is expensive. 820.if !defined(NO_XREF) 821.MAKEFLAGS+= -DNO_XREF 822afterinstall: .PHONY 823 @if type kldxref >/dev/null 2>&1; then \ 824 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 825 kldxref ${DESTDIR}${KMODDIR}; \ 826 fi 827.endif 828 829.include "${SYSDIR}/conf/config.mk" 830 831SUBDIR:= ${SUBDIR:u:O} 832 833.include <bsd.subdir.mk> 834