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