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