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