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 ${_ffec} \ 132 filemon \ 133 firewire \ 134 firmware \ 135 fuse \ 136 ${_fxp} \ 137 gem \ 138 geom \ 139 ${_glxiic} \ 140 ${_glxsb} \ 141 gpio \ 142 hifn \ 143 hme \ 144 ${_hpt27xx} \ 145 ${_hptiop} \ 146 ${_hptmv} \ 147 ${_hptnr} \ 148 ${_hptrr} \ 149 hwpmc \ 150 ${_hwpmc_mips24k} \ 151 ${_hwpmc_mips74k} \ 152 ${_hyperv} \ 153 i2c \ 154 ${_ibcore} \ 155 ${_ibcs2} \ 156 ${_ichwd} \ 157 ${_ida} \ 158 if_bridge \ 159 if_disc \ 160 if_edsc \ 161 ${_if_enc} \ 162 if_epair \ 163 ${_if_gif} \ 164 ${_if_gre} \ 165 ${_if_me} \ 166 if_lagg \ 167 ${_if_ndis} \ 168 ${_if_stf} \ 169 if_tap \ 170 if_tun \ 171 if_vlan \ 172 if_vxlan \ 173 ${_iir} \ 174 imgact_binmisc \ 175 ${_intelspi} \ 176 ${_io} \ 177 ${_ioat} \ 178 ${_ipoib} \ 179 ${_ipdivert} \ 180 ${_ipfilter} \ 181 ${_ipfw} \ 182 ipfw_nat \ 183 ${_ipfw_nat64} \ 184 ${_ipfw_nptv6} \ 185 ${_ipfw_pmod} \ 186 ${_ipmi} \ 187 ip6_mroute_mod \ 188 ip_mroute_mod \ 189 ${_ips} \ 190 ${_ipsec} \ 191 ${_ipw} \ 192 ${_ipwfw} \ 193 ${_isci} \ 194 ${_iser} \ 195 isp \ 196 ${_ispfw} \ 197 ${_iwi} \ 198 ${_iwifw} \ 199 ${_iwm} \ 200 ${_iwmfw} \ 201 ${_iwn} \ 202 ${_iwnfw} \ 203 ${_ix} \ 204 ${_ixv} \ 205 ${_ixgb} \ 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 libmbpool \ 221 libmchain \ 222 ${_linprocfs} \ 223 ${_linsysfs} \ 224 ${_linux} \ 225 ${_linux_common} \ 226 ${_linux64} \ 227 linuxkpi \ 228 lmc \ 229 lpt \ 230 mac_biba \ 231 mac_bsdextended \ 232 mac_ifoff \ 233 mac_lomac \ 234 mac_mls \ 235 mac_none \ 236 mac_partition \ 237 mac_portacl \ 238 mac_seeotheruids \ 239 mac_stub \ 240 mac_test \ 241 malo \ 242 md \ 243 mdio \ 244 mem \ 245 mfi \ 246 mii \ 247 mlx \ 248 ${_mlx4} \ 249 ${_mlx4ib} \ 250 ${_mlx4en} \ 251 ${_mlx5} \ 252 ${_mlx5en} \ 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 ${_nxge} \ 294 oce \ 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 siba_bwn \ 350 siftr \ 351 siis \ 352 sis \ 353 sk \ 354 smbfs \ 355 sn \ 356 snp \ 357 sound \ 358 ${_speaker} \ 359 spigen \ 360 ${_splash} \ 361 ${_sppp} \ 362 ste \ 363 ${_stg} \ 364 stge \ 365 ${_sym} \ 366 ${_syscons} \ 367 sysvipc \ 368 tcp \ 369 ${_ti} \ 370 tl \ 371 tmpfs \ 372 ${_toecore} \ 373 ${_tpm} \ 374 trm \ 375 ${_twa} \ 376 twe \ 377 tws \ 378 tx \ 379 ${_txp} \ 380 uart \ 381 ubsec \ 382 udf \ 383 udf_iconv \ 384 ufs \ 385 uinput \ 386 unionfs \ 387 usb \ 388 ${_vesa} \ 389 ${_virtio} \ 390 vge \ 391 ${_viawd} \ 392 videomode \ 393 vkbd \ 394 ${_vmm} \ 395 ${_vmware} \ 396 ${_vpo} \ 397 vr \ 398 vte \ 399 vx \ 400 ${_vxge} \ 401 wb \ 402 ${_wbwd} \ 403 ${_wi} \ 404 wlan \ 405 wlan_acl \ 406 wlan_amrr \ 407 wlan_ccmp \ 408 wlan_rssadapt \ 409 wlan_tkip \ 410 wlan_wep \ 411 wlan_xauth \ 412 ${_wpi} \ 413 ${_wpifw} \ 414 ${_x86bios} \ 415 ${_xe} \ 416 xl \ 417 zlib 418 419.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) 420_autofs= autofs 421.endif 422 423.if ${MK_CDDL} != "no" || defined(ALL_MODULES) 424.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \ 425 ${MACHINE_CPUARCH} != "mips" && \ 426 ${MACHINE_CPUARCH} != "sparc64" 427SUBDIR+= dtrace 428.endif 429SUBDIR+= opensolaris 430.endif 431 432.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 433.if exists(${SRCTOP}/sys/opencrypto) 434_crypto= crypto 435_cryptodev= cryptodev 436_random_fortuna=random_fortuna 437_random_yarrow= random_yarrow 438_random_other= random_other 439.endif 440.endif 441 442.if ${MK_CUSE} != "no" || defined(ALL_MODULES) 443SUBDIR+= cuse 444.endif 445 446.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ 447 defined(ALL_MODULES) 448_carp= carp 449_toecore= toecore 450_if_enc= if_enc 451_if_gif= if_gif 452_if_gre= if_gre 453_ipfw_pmod= ipfw_pmod 454.if ${MK_IPSEC_SUPPORT} != "no" 455_ipsec= ipsec 456.endif 457.endif 458 459.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 460 defined(ALL_MODULES) 461_if_stf= if_stf 462.endif 463 464.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) 465_if_me= if_me 466_ipdivert= ipdivert 467_ipfw= ipfw 468.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 469_ipfw_nat64= ipfw_nat64 470.endif 471.endif 472 473.if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) 474_ipfw_nptv6= ipfw_nptv6 475.endif 476 477.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) 478_ipfilter= ipfilter 479.endif 480 481.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) 482SUBDIR+= cfiscsi 483SUBDIR+= iscsi 484SUBDIR+= iscsi_initiator 485.endif 486 487.if ${MK_NAND} != "no" || defined(ALL_MODULES) 488_nandfs= nandfs 489_nandsim= nandsim 490.endif 491 492.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) 493_netgraph= netgraph 494.endif 495 496.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \ 497 ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES) 498_pf= pf 499_pflog= pflog 500.if ${MK_INET_SUPPORT} != "no" 501_pfsync= pfsync 502.endif 503.endif 504 505.if ${MK_SOURCELESS_UCODE} != "no" 506_bce= bce 507_fxp= fxp 508_ispfw= ispfw 509_sf= sf 510_ti= ti 511_txp= txp 512 513.if ${MACHINE_CPUARCH} != "mips" 514_mwlfw= mwlfw 515_otusfw= otusfw 516_ralfw= ralfw 517_rtwnfw= rtwnfw 518.endif 519.endif 520 521.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ 522 ${MACHINE_CPUARCH} != "mips" && \ 523 ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \ 524 ${MACHINE_CPUARCH} != "riscv" 525_cxgbe= cxgbe 526.endif 527 528.if ${MK_TESTS} != "no" || defined(ALL_MODULES) 529SUBDIR+= tests 530.endif 531 532.if ${MK_ZFS} != "no" || defined(ALL_MODULES) 533SUBDIR+= zfs 534.endif 535 536.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") 537_hwpmc_mips24k= hwpmc_mips24k 538_hwpmc_mips74k= hwpmc_mips74k 539.endif 540 541.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ 542 ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ 543 ${MACHINE_CPUARCH} != "riscv" 544_syscons= syscons 545_vpo= vpo 546.endif 547 548.if ${MACHINE_CPUARCH} != "mips" 549# no BUS_SPACE_UNSPECIFIED 550# No barrier instruction support (specific to this driver) 551_sym= sym 552# intr_disable() is a macro, causes problems 553.if ${MK_SOURCELESS_UCODE} != "no" 554_cxgb= cxgb 555.endif 556.endif 557 558.if ${MACHINE_CPUARCH} == "aarch64" 559_armv8crypto= armv8crypto 560_em= em 561.endif 562 563.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 564_agp= agp 565_an= an 566_aout= aout 567_bios= bios 568_bktr= bktr 569_bxe= bxe 570_cardbus= cardbus 571_cbb= cbb 572_cpuctl= cpuctl 573_cpufreq= cpufreq 574_cs= cs 575_dpms= dpms 576_drm= drm 577_drm2= drm2 578_ed= ed 579_em= em 580_ena= ena 581_ep= ep 582_et= et 583_exca= exca 584_fe= fe 585.if ${MK_OFED} != "no" || defined(ALL_MODULES) 586_ibcore= ibcore 587.endif 588_if_ndis= if_ndis 589_io= io 590.if ${MK_OFED} != "no" || defined(ALL_MODULES) 591_ipoib= ipoib 592_iser= iser 593.endif 594_ix= ix 595_ixv= ixv 596_linprocfs= linprocfs 597_linsysfs= linsysfs 598_linux= linux 599_nctgpio= nctgpio 600_ndis= ndis 601_pccard= pccard 602.if ${MK_OFED} != "no" || defined(ALL_MODULES) 603_rdma= rdma 604.endif 605_safe= safe 606_scsi_low= scsi_low 607_speaker= speaker 608_splash= splash 609_sppp= sppp 610_vmware= vmware 611_vxge= vxge 612_wbwd= wbwd 613_wi= wi 614_xe= xe 615 616_aac= aac 617_aacraid= aacraid 618_acpi= acpi 619.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 620_aesni= aesni 621.endif 622_amd_ecc_inject=amd_ecc_inject 623_amdsbwd= amdsbwd 624_amdtemp= amdtemp 625_arcmsr= arcmsr 626_asmc= asmc 627_bytgpio= bytgpio 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_ixgb= ixgb 654.if ${MK_SOURCELESS_UCODE} != "no" 655_ipwfw= ipwfw 656_iwifw= iwifw 657_iwmfw= iwmfw 658_iwnfw= iwnfw 659.endif 660_mlx4= mlx4 661_mlx5= mlx5 662.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ 663 defined(ALL_MODULES) 664_mlx4en= mlx4en 665_mlx5en= mlx5en 666.endif 667.if ${MK_OFED} != "no" || defined(ALL_MODULES) 668_mlx4ib= mlx4ib 669.endif 670_mly= mly 671.if ${MK_OFED} != "no" || defined(ALL_MODULES) 672_mthca= mthca 673.endif 674_nfe= nfe 675_nvd= nvd 676_nvme= nvme 677_nvram= nvram 678_nxge= nxge 679.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) 680_padlock= padlock 681_padlock_rng= padlock_rng 682_rdrand_rng= rdrand_rng 683.endif 684_s3= s3 685_sdhci_acpi= sdhci_acpi 686_tpm= tpm 687_twa= twa 688_vesa= vesa 689_viawd= viawd 690_virtio= virtio 691_wpi= wpi 692.if ${MK_SOURCELESS_UCODE} != "no" 693_wpifw= wpifw 694.endif 695_x86bios= x86bios 696.endif 697 698.if ${MACHINE_CPUARCH} == "amd64" 699_efirt= efirt 700_ioat= ioat 701_ixl= ixl 702_ixlv= ixlv 703_linux64= linux64 704_linux_common= linux_common 705_ntb= ntb 706_pms= pms 707_qlxge= qlxge 708_qlxgb= qlxgb 709_qlxgbe= qlxgbe 710_qlnx= qlnx 711_sfxge= sfxge 712 713.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) 714_vmm= vmm 715.endif 716.endif 717 718.if ${MACHINE_CPUARCH} == "i386" 719# XXX some of these can move to the general case when de-i386'ed 720# XXX some of these can move now, but are untested on other architectures. 721_3dfx= 3dfx 722_3dfx_linux= 3dfx_linux 723_aic= aic 724_apm= apm 725_arcnet= arcnet 726.if ${MK_SOURCELESS_UCODE} != "no" 727_ce= ce 728.endif 729_coff= coff 730.if ${MK_SOURCELESS_UCODE} != "no" 731_cp= cp 732.endif 733_elink= elink 734_glxiic= glxiic 735_glxsb= glxsb 736#_ibcs2= ibcs2 737_mse= mse 738_ncr= ncr 739_ncv= ncv 740_nsp= nsp 741_pcfclock= pcfclock 742_pst= pst 743_sbni= sbni 744_stg= stg 745_cm= cm 746.if ${MK_SOURCELESS_UCODE} != "no" 747_ctau= ctau 748.endif 749_dpt= dpt 750_ex= ex 751.endif 752 753.if ${MACHINE_CPUARCH} == "arm" 754_cfi= cfi 755_cpsw= cpsw 756.endif 757 758.if ${MACHINE_CPUARCH} == "powerpc" 759_agp= agp 760_an= an 761_bm= bm 762_cardbus= cardbus 763_cbb= cbb 764_cfi= cfi 765_cpufreq= cpufreq 766_drm= drm 767_exca= exca 768_ffec= ffec 769_pccard= pccard 770_wi= wi 771.endif 772 773.if ${MACHINE_ARCH} == "powerpc64" 774_drm2= drm2 775.endif 776.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" 777# Don't build powermac_nvram for powerpcspe, it's never supported. 778_nvram= powermac_nvram 779.endif 780 781.if ${MACHINE_CPUARCH} == "sparc64" 782_auxio= auxio 783_em= em 784_epic= epic 785.endif 786 787.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ 788 ${MACHINE_CPUARCH} == "i386") 789_cloudabi32= cloudabi32 790.endif 791.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" 792_cloudabi64= cloudabi64 793.endif 794 795.endif 796 797.if ${MACHINE_ARCH} == "armv6" 798_ffec= ffec 799.endif 800 801SUBDIR+=${MODULES_EXTRA} 802 803.for reject in ${WITHOUT_MODULES} 804SUBDIR:= ${SUBDIR:N${reject}} 805.endfor 806 807# Calling kldxref(8) for each module is expensive. 808.if !defined(NO_XREF) 809.MAKEFLAGS+= -DNO_XREF 810afterinstall: .PHONY 811 @if type kldxref >/dev/null 2>&1; then \ 812 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \ 813 kldxref ${DESTDIR}${KMODDIR}; \ 814 fi 815.endif 816 817.include "${SYSDIR}/conf/config.mk" 818 819SUBDIR:= ${SUBDIR:u:O} 820 821.include <bsd.subdir.mk> 822