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