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