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