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 ${_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 ${_bm} \ 72 bnxt \ 73 bridgestp \ 74 bwi \ 75 bwn \ 76 ${_bytgpio} \ 77 ${_chvgpio} \ 78 cam \ 79 ${_cardbus} \ 80 ${_carp} \ 81 cas \ 82 ${_cbb} \ 83 cc \ 84 ${_ccp} \ 85 cd9660 \ 86 cd9660_iconv \ 87 ${_ce} \ 88 ${_cfi} \ 89 ${_chromebook_platform} \ 90 ${_ciss} \ 91 cloudabi \ 92 ${_cloudabi32} \ 93 ${_cloudabi64} \ 94 ${_cmx} \ 95 ${_coff} \ 96 ${_coretemp} \ 97 ${_cp} \ 98 ${_cpsw} \ 99 ${_cpuctl} \ 100 ${_cpufreq} \ 101 ${_crypto} \ 102 ${_cryptodev} \ 103 ${_cs} \ 104 ${_ctau} \ 105 ctl \ 106 ${_cxgb} \ 107 ${_cxgbe} \ 108 dc \ 109 dcons \ 110 dcons_crom \ 111 de \ 112 ${_dpms} \ 113 ${_dpt} \ 114 ${_drm} \ 115 ${_drm2} \ 116 dummynet \ 117 ${_ed} \ 118 ${_efirt} \ 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 ${_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 libmchain \ 221 ${_linprocfs} \ 222 ${_linsysfs} \ 223 ${_linux} \ 224 ${_linux_common} \ 225 ${_linux64} \ 226 linuxkpi \ 227 ${_lio} \ 228 lpt \ 229 mac_biba \ 230 mac_bsdextended \ 231 mac_ifoff \ 232 mac_lomac \ 233 mac_mls \ 234 mac_none \ 235 mac_partition \ 236 mac_portacl \ 237 mac_seeotheruids \ 238 mac_stub \ 239 mac_test \ 240 malo \ 241 md \ 242 mdio \ 243 mem \ 244 mfi \ 245 mii \ 246 mlx \ 247 ${_mlx4} \ 248 ${_mlx4ib} \ 249 ${_mlx4en} \ 250 ${_mlx5} \ 251 ${_mlx5en} \ 252 ${_mlx5ib} \ 253 ${_mly} \ 254 mmc \ 255 mmcsd \ 256 mpr \ 257 mps \ 258 mpt \ 259 mqueue \ 260 mrsas \ 261 msdosfs \ 262 msdosfs_iconv \ 263 ${_mse} \ 264 msk \ 265 ${_mthca} \ 266 mvs \ 267 mwl \ 268 ${_mwlfw} \ 269 mxge \ 270 my \ 271 ${_nandfs} \ 272 ${_nandsim} \ 273 ${_ncr} \ 274 ${_nctgpio} \ 275 ${_ncv} \ 276 ${_ndis} \ 277 ${_netgraph} \ 278 ${_nfe} \ 279 nfscl \ 280 nfscommon \ 281 nfsd \ 282 nfslock \ 283 nfslockd \ 284 nfssvc \ 285 nge \ 286 nmdm \ 287 ${_nsp} \ 288 nullfs \ 289 ${_ntb} \ 290 ${_nvd} \ 291 ${_nvme} \ 292 ${_nvram} \ 293 oce \ 294 ${_ocs_fc} \ 295 otus \ 296 ${_otusfw} \ 297 ow \ 298 ${_padlock} \ 299 ${_padlock_rng} \ 300 ${_pccard} \ 301 ${_pcfclock} \ 302 pcn \ 303 ${_pf} \ 304 ${_pflog} \ 305 ${_pfsync} \ 306 plip \ 307 ${_pms} \ 308 ppbus \ 309 ppc \ 310 ppi \ 311 pps \ 312 procfs \ 313 proto \ 314 pseudofs \ 315 ${_pst} \ 316 pty \ 317 puc \ 318 ${_qlxge} \ 319 ${_qlxgb} \ 320 ${_qlxgbe} \ 321 ${_qlnx} \ 322 ral \ 323 ${_ralfw} \ 324 ${_random_fortuna} \ 325 ${_random_yarrow} \ 326 ${_random_other} \ 327 rc4 \ 328 ${_rdma} \ 329 ${_rdrand_rng} \ 330 re \ 331 rl \ 332 rtwn \ 333 rtwn_pci \ 334 rtwn_usb \ 335 ${_rtwnfw} \ 336 ${_s3} \ 337 ${_safe} \ 338 ${_sbni} \ 339 scc \ 340 ${_scsi_low} \ 341 sdhci \ 342 ${_sdhci_acpi} \ 343 sdhci_pci \ 344 sem \ 345 send \ 346 ${_sf} \ 347 ${_sfxge} \ 348 sge \ 349 ${_sgx} \ 350 ${_sgx_linux} \ 351 siftr \ 352 siis \ 353 sis \ 354 sk \ 355 ${_smartpqi} \ 356 smbfs \ 357 sn \ 358 snp \ 359 sound \ 360 ${_speaker} \ 361 spi \ 362 ${_splash} \ 363 ${_sppp} \ 364 ste \ 365 ${_stg} \ 366 stge \ 367 ${_sym} \ 368 ${_syscons} \ 369 sysvipc \ 370 tcp \ 371 ${_ti} \ 372 tl \ 373 tmpfs \ 374 ${_toecore} \ 375 ${_tpm} \ 376 trm \ 377 ${_twa} \ 378 twe \ 379 tws \ 380 tx \ 381 ${_txp} \ 382 uart \ 383 ubsec \ 384 udf \ 385 udf_iconv \ 386 ufs \ 387 uinput \ 388 unionfs \ 389 usb \ 390 ${_vesa} \ 391 ${_virtio} \ 392 vge \ 393 ${_viawd} \ 394 videomode \ 395 vkbd \ 396 ${_vmm} \ 397 ${_vmware} \ 398 ${_vpo} \ 399 vr \ 400 vte \ 401 vx \ 402 ${_vxge} \ 403 wb \ 404 ${_wbwd} \ 405 ${_wi} \ 406 wlan \ 407 wlan_acl \ 408 wlan_amrr \ 409 wlan_ccmp \ 410 wlan_rssadapt \ 411 wlan_tkip \ 412 wlan_wep \ 413 wlan_xauth \ 414 ${_wpi} \ 415 ${_wpifw} \ 416 ${_x86bios} \ 417 ${_xe} \ 418 xl \ 419 zlib 420 421.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 422_autofs= autofs 423.endif 424 425.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 426.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \ 427 ${MACHINE_CPUARCH} != "mips" && \ 428 ${MACHINE_CPUARCH} != "sparc64" 429SUBDIR+= dtrace 430.endif 431SUBDIR+= opensolaris 432.endif 433 434.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 435.if exists(${SRCTOP}/sys/opencrypto) 436_crypto= crypto 437_cryptodev= cryptodev 438_random_fortuna=random_fortuna 439_random_yarrow= random_yarrow 440_random_other= random_other 441.endif 442.endif 443 444.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 445SUBDIR+= cuse 446.endif 447 448.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 449 defined(ALL_MODULES) 450_carp= carp 451_toecore= toecore 452_if_enc= if_enc 453_if_gif= if_gif 454_if_gre= if_gre 455_ipfw_pmod= ipfw_pmod 456.if ${MK_IPSEC_SUPPORT} != "no" 457_ipsec= ipsec 458.endif 459.endif 460 461.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 462 defined(ALL_MODULES) 463_if_stf= if_stf 464.endif 465 466.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 467_if_me= if_me 468_ipdivert= ipdivert 469_ipfw= ipfw 470.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 471_ipfw_nat64= ipfw_nat64 472.endif 473.endif 474 475.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 476_ipfw_nptv6= ipfw_nptv6 477.endif 478 479.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 480_ipfilter= ipfilter 481.endif 482 483.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 484SUBDIR+= cfiscsi 485SUBDIR+= iscsi 486SUBDIR+= iscsi_initiator 487.endif 488 489.if ${MK_NAND} != "no" || defined(ALL_MODULES) 490_nandfs= nandfs 491_nandsim= nandsim 492.endif 493 494.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 495_netgraph= netgraph 496.endif 497 498.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 499 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 500_pf= pf 501_pflog= pflog 502.if ${MK_INET_SUPPORT} != "no" 503_pfsync= pfsync 504.endif 505.endif 506 507.if ${MK_SOURCELESS_UCODE} != "no" 508_bce= bce 509_fxp= fxp 510_ispfw= ispfw 511_sf= sf 512_ti= ti 513_txp= txp 514 515.if ${MACHINE_CPUARCH} != "mips" 516_mwlfw= mwlfw 517_otusfw= otusfw 518_ralfw= ralfw 519_rtwnfw= rtwnfw 520.endif 521.endif 522 523.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 524 ${MACHINE_CPUARCH} != "mips" && \ 525 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 526 ${MACHINE_CPUARCH} != "riscv" 527_cxgbe= cxgbe 528.endif 529 530.if ${MK_TESTS} != "no" || defined(ALL_MODULES) 531SUBDIR+= tests 532.endif 533 534.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 535SUBDIR+= zfs 536.endif 537 538.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") 539_hwpmc_mips24k= hwpmc_mips24k 540_hwpmc_mips74k= hwpmc_mips74k 541.endif 542 543.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 544 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 545 ${MACHINE_CPUARCH} != "riscv" 546_syscons= syscons 547_vpo= vpo 548.endif 549 550.if ${MACHINE_CPUARCH} != "mips" 551# no BUS_SPACE_UNSPECIFIED 552# No barrier instruction support (specific to this driver) 553_sym= sym 554# intr_disable() is a macro, causes problems 555.if ${MK_SOURCELESS_UCODE} != "no" 556_cxgb= cxgb 557.endif 558.endif 559 560.if ${MACHINE_CPUARCH} == "aarch64" 561_armv8crypto= armv8crypto 562_efirt= efirt 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.if ${MK_SOURCELESS_UCODE} != "no" 605_lio= lio 606.endif 607_nctgpio= nctgpio 608_ndis= ndis 609_ocs_fc= ocs_fc 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.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 638_blake2= blake2 639.endif 640_bytgpio= bytgpio 641_chvgpio= chvgpio 642_ciss= ciss 643_chromebook_platform= chromebook_platform 644_cmx= cmx 645_coretemp= coretemp 646.if ${MK_SOURCELESS_HOST} != "no" 647_hpt27xx= hpt27xx 648.endif 649_hptiop= hptiop 650.if ${MK_SOURCELESS_HOST} != "no" 651_hptmv= hptmv 652_hptnr= hptnr 653_hptrr= hptrr 654.endif 655_hyperv= hyperv 656_ichwd= ichwd 657_ida= ida 658_iir= iir 659_intelspi= intelspi 660_ipmi= ipmi 661_ips= ips 662_isci= isci 663_ipw= ipw 664_iwi= iwi 665_iwm= iwm 666_iwn= iwn 667.if ${MK_SOURCELESS_UCODE} != "no" 668_ipwfw= ipwfw 669_iwifw= iwifw 670_iwmfw= iwmfw 671_iwnfw= iwnfw 672.endif 673_mlx4= mlx4 674_mlx5= mlx5 675.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 676 defined(ALL_MODULES) 677_mlx4en= mlx4en 678_mlx5en= mlx5en 679.endif 680.if ${MK_OFED} != "no" || defined(ALL_MODULES) 681_mthca= mthca 682_mlx4ib= mlx4ib 683_mlx5ib= mlx5ib 684.endif 685_mly= mly 686_nfe= nfe 687_nvd= nvd 688_nvme= nvme 689_nvram= nvram 690.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 691_padlock= padlock 692_padlock_rng= padlock_rng 693_rdrand_rng= rdrand_rng 694.endif 695_s3= s3 696_sdhci_acpi= sdhci_acpi 697_tpm= tpm 698_twa= twa 699_vesa= vesa 700_viawd= viawd 701_virtio= virtio 702_wpi= wpi 703.if ${MK_SOURCELESS_UCODE} != "no" 704_wpifw= wpifw 705.endif 706_x86bios= x86bios 707.endif 708 709.if ${MACHINE_CPUARCH} == "amd64" 710_ccp= ccp 711_efirt= efirt 712_ioat= ioat 713_ixl= ixl 714_ixlv= ixlv 715_linux64= linux64 716_linux_common= linux_common 717_ntb= ntb 718_pms= pms 719_qlxge= qlxge 720_qlxgb= qlxgb 721.if ${MK_SOURCELESS_UCODE} != "no" 722_qlxgbe= qlxgbe 723_qlnx= qlnx 724.endif 725_sfxge= sfxge 726_sgx= sgx 727_sgx_linux= sgx_linux 728_smartpqi= smartpqi 729 730.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 731_vmm= vmm 732.endif 733.endif 734 735.if ${MACHINE_CPUARCH} == "i386" 736# XXX some of these can move to the general case when de-i386'ed 737# XXX some of these can move now, but are untested on other architectures. 738_3dfx= 3dfx 739_3dfx_linux= 3dfx_linux 740_aic= aic 741_apm= apm 742.if ${MK_SOURCELESS_UCODE} != "no" 743_ce= ce 744.endif 745_coff= coff 746.if ${MK_SOURCELESS_UCODE} != "no" 747_cp= cp 748.endif 749_glxiic= glxiic 750_glxsb= glxsb 751#_ibcs2= ibcs2 752_mse= mse 753_ncr= ncr 754_ncv= ncv 755_nsp= nsp 756_pcfclock= pcfclock 757_pst= pst 758_sbni= sbni 759_stg= stg 760.if ${MK_SOURCELESS_UCODE} != "no" 761_ctau= ctau 762.endif 763_dpt= dpt 764_ex= ex 765.endif 766 767.if ${MACHINE_CPUARCH} == "arm" 768_cfi= cfi 769_cpsw= cpsw 770.endif 771 772.if ${MACHINE_CPUARCH} == "powerpc" 773_agp= agp 774_an= an 775_bm= bm 776_cardbus= cardbus 777_cbb= cbb 778_cfi= cfi 779_cpufreq= cpufreq 780_drm= drm 781_exca= exca 782_ffec= ffec 783_pccard= pccard 784_wi= wi 785.endif 786 787.if ${MACHINE_ARCH} == "powerpc64" 788_drm2= drm2 789.endif 790.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 791# Don't build powermac_nvram for powerpcspe, it's never supported. 792_nvram= powermac_nvram 793.endif 794 795.if ${MACHINE_CPUARCH} == "sparc64" 796_auxio= auxio 797_em= em 798_epic= epic 799.endif 800 801.if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 802 ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "i386") 803_cloudabi32= cloudabi32 804.endif 805.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 806_cloudabi64= cloudabi64 807.endif 808 809.endif 810 811.if ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "aarch64" 812_bcm283x_clkman= bcm283x_clkman 813_bcm283x_pwm= bcm283x_pwm 814.endif 815 816SUBDIR+=${MODULES_EXTRA} 817 818.for reject in ${WITHOUT_MODULES} 819SUBDIR:= ${SUBDIR:N${reject}} 820.endfor 821 822# Calling kldxref(8) for each module is expensive. 823.if !defined(NO_XREF) 824.MAKEFLAGS+= -DNO_XREF 825afterinstall: .PHONY 826 @if type kldxref >/dev/null 2>&1; then \ 827 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 828 kldxref ${DESTDIR}${KMODDIR}; \ 829 fi 830.endif 831 832.include "${SYSDIR}/conf/config.mk" 833 834SUBDIR:= ${SUBDIR:u:O} 835 836.include <bsd.subdir.mk> 837