]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
Copy elftoolchain binutils replacements from vendor branch
[FreeBSD/FreeBSD.git] / sys / modules / Makefile
1 # $FreeBSD$
2
3 SYSDIR?=${.CURDIR}/..
4 .include "${SYSDIR}/conf/kern.opts.mk"
5
6 SUBDIR_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)
12 SUBDIR=${MODULES_OVERRIDE}
13 .else
14 SUBDIR= \
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_gif} \
149         ${_if_gre} \
150         ${_if_me} \
151         if_lagg \
152         ${_if_ndis} \
153         if_stf \
154         if_tap \
155         if_tun \
156         if_vlan \
157         if_vxlan \
158         ${_igb} \
159         ${_iir} \
160         imgact_binmisc \
161         ${_io} \
162         ${_ipoib} \
163         ${_ipdivert} \
164         ${_ipfilter} \
165         ${_ipfw} \
166         ipfw_nat \
167         ${_ipmi} \
168         ip6_mroute_mod \
169         ip_mroute_mod \
170         ${_ips} \
171         ${_ipw} \
172         ${_ipwfw} \
173         ${_isci} \
174         iscsi \
175         iscsi_initiator \
176         isp \
177         ${_ispfw} \
178         ${_iwi} \
179         ${_iwifw} \
180         ${_iwn} \
181         ${_iwnfw} \
182         ${_ixgb} \
183         ${_ixgbe} \
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         lmc \
204         lpt \
205         mac_biba \
206         mac_bsdextended \
207         mac_ifoff \
208         mac_lomac \
209         mac_mls \
210         mac_none \
211         mac_partition \
212         mac_portacl \
213         mac_seeotheruids \
214         mac_stub \
215         mac_test \
216         malo \
217         mcd \
218         md \
219         mem \
220         mfi \
221         mii \
222         mlx \
223         ${_mlx4} \
224         ${_mlx4ib} \
225         ${_mlxen} \
226         ${_mly} \
227         mmc \
228         mmcsd \
229         mpr \
230         mps \
231         mpt \
232         mqueue \
233         mrsas \
234         msdosfs \
235         msdosfs_iconv \
236         ${_mse} \
237         msk \
238         ${_mthca} \
239         mvs \
240         mwl \
241         ${_mwlfw} \
242         mxge \
243         my \
244         ${_nandfs} \
245         ${_nandsim} \
246         ${_ncr} \
247         ${_ncv} \
248         ${_ndis} \
249         netfpga10g \
250         ${_netgraph} \
251         ${_nfe} \
252         nfs_common \
253         nfscl \
254         nfsclient \
255         nfscommon \
256         nfsd \
257         nfslock \
258         nfslockd \
259         nfsserver \
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         ppbus \
284         ppc \
285         ppi \
286         pps \
287         procfs \
288         proto \
289         pseudofs \
290         ${_pst} \
291         pty  \
292         puc \
293         ${_qlxge} \
294         ${_qlxgb} \
295         ${_qlxgbe} \
296         ral \
297         ${_ralfw} \
298         ${_random} \
299         rc4 \
300         ${_rdma} \
301         ${_rdrand_rng} \
302         re \
303         reiserfs \
304         rl \
305         ${_s3} \
306         ${_safe} \
307         ${_sbni} \
308         scc \
309         scd \
310         ${_scsi_low} \
311         sdhci \
312         sdhci_pci \
313         sem \
314         send \
315         ${_sf} \
316         ${_sfxge} \
317         sge \
318         ${_si} \
319         siba_bwn \
320         siftr \
321         siis \
322         sis \
323         sk \
324         ${_smbfs} \
325         ${_sn} \
326         ${_snc} \
327         snp \
328         ${_sound} \
329         ${_speaker} \
330         ${_splash} \
331         ${_sppp} \
332         ste \
333         ${_stg} \
334         stge \
335         ${_streams} \
336         ${_svr4} \
337         ${_sym} \
338         ${_syscons} \
339         sysvipc \
340         ${_ti} \
341         tl \
342         tmpfs \
343         ${_toecore} \
344         ${_tpm} \
345         trm \
346         ${_twa} \
347         twe \
348         tws \
349         tx \
350         ${_txp} \
351         uart \
352         ubsec \
353         udf \
354         udf_iconv \
355         ufs \
356         unionfs \
357         usb \
358         utopia \
359         ${_vesa} \
360         ${_virtio} \
361         vge \
362         ${_viawd} \
363         vkbd \
364         ${_vmm} \
365         ${_vmware} \
366         ${_vpo} \
367         vr \
368         vte \
369         vx \
370         ${_vxge} \
371         wb \
372         ${_wbwd} \
373         ${_wds} \
374         ${_wi} \
375         ${_wl} \
376         wlan \
377         wlan_acl \
378         wlan_amrr \
379         wlan_ccmp \
380         wlan_rssadapt \
381         wlan_tkip \
382         wlan_wep \
383         wlan_xauth \
384         ${_wpi} \
385         ${_wpifw} \
386         ${_x86bios} \
387         ${_xe} \
388         xl \
389         ${_zfs} \
390         zlib
391
392 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
393 .if exists(${.CURDIR}/../opencrypto)
394 _crypto=        crypto
395 _cryptodev=     cryptodev
396 .endif
397 .if exists(${.CURDIR}/../crypto)
398 _random=        random
399 .endif
400 .endif
401
402 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
403         defined(ALL_MODULES)
404 _carp=          carp
405 _toecore=       toecore
406 _if_gif=        if_gif
407 _if_gre=        if_gre
408 .endif
409
410 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
411 _if_me=         if_me
412 _ipdivert=      ipdivert
413 _ipfw=          ipfw
414 .endif
415
416 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
417 _ipfilter=      ipfilter
418 .endif
419
420 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
421 _nandfs=        nandfs
422 _nandsim=       nandsim
423 .endif
424
425 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
426 _netgraph=      netgraph
427 .endif
428
429 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
430         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
431 _pf=            pf
432 _pflog=         pflog
433 .if ${MK_INET_SUPPORT} != "no"
434 _pfsync=        pfsync
435 .endif
436 .endif
437
438 .if ${MK_SOURCELESS_UCODE} != "no"
439 _bce=           bce
440 _cxgbe=         cxgbe
441 _fatm=          fatm
442 _fxp=           fxp
443 _ispfw=         ispfw
444 _mwlfw=         mwlfw
445 _ralfw=         ralfw
446 _sf=            sf
447 _sn=            sn
448 _ti=            ti
449 _txp=           txp
450 .endif
451
452
453 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
454         ${MACHINE_CPUARCH} != "powerpc"
455 _syscons=       syscons
456 _vpo=           vpo
457 .endif
458
459 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
460 # no BUS_SPACE_UNSPECIFIED
461 # No barrier instruction support (specific to this driver)
462 _sym=           sym
463 # intr_disable() is a macro, causes problems
464 .if ${MK_SOURCELESS_UCODE} != "no"
465 _cxgb=          cxgb
466 .endif
467 .endif
468
469 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
470 _agp=           agp
471 _an=            an
472 _aout=          aout
473 _bktr=          bktr
474 _bxe=           bxe
475 _cardbus=       cardbus
476 _cbb=           cbb
477 _cpuctl=        cpuctl
478 _cpufreq=       cpufreq
479 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
480 _cyclic=        cyclic
481 .endif
482 _dpms=          dpms
483 _drm=           drm
484 _drm2=          drm2
485 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
486 _dtrace=        dtrace
487 .endif
488 _ed=            ed
489 _em=            em
490 _et=            et
491 _exca=          exca
492 _ext2fs=        ext2fs
493 _filemon=       filemon
494 _i2c=           i2c
495 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
496 _ibcore=        ibcore
497 .endif
498 _if_ndis=       if_ndis
499 _igb=           igb
500 _io=            io
501 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
502 _ipoib=         ipoib
503 .endif
504 _linprocfs=     linprocfs
505 _linsysfs=      linsysfs
506 _linux=         linux
507 _ndis=          ndis
508 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
509 _opensolaris=   opensolaris
510 .endif
511 _pccard=        pccard
512 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
513 _rdma=          rdma
514 .endif
515 _safe=          safe
516 _scsi_low=      scsi_low
517 _si=            si
518 _smbfs=         smbfs
519 _sound=         sound
520 _speaker=       speaker
521 _splash=        splash
522 _sppp=          sppp
523 _vmware=        vmware
524 _vxge=          vxge
525 _wbwd=          wbwd
526 _wi=            wi
527 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
528 _zfs=           zfs
529 .endif
530 .if ${MACHINE} != "pc98"
531 _aac=           aac
532 _aacraid=       aacraid
533 _acpi=          acpi
534 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
535 _aesni=         aesni
536 .endif
537 _amdsbwd=       amdsbwd
538 _amdtemp=       amdtemp
539 _arcmsr=        arcmsr
540 _asmc=          asmc
541 _ciss=          ciss
542 _cmx=           cmx
543 _coretemp=      coretemp
544 .if ${MK_SOURCELESS_HOST} != "no"
545 _hpt27xx=       hpt27xx
546 .endif
547 _hptiop=        hptiop
548 .if ${MK_SOURCELESS_HOST} != "no"
549 _hptmv=         hptmv
550 _hptnr=         hptnr
551 _hptrr=         hptrr
552 .endif
553 _hyperv=        hyperv
554 _ichwd=         ichwd
555 _ida=           ida
556 _iir=           iir
557 _ipmi=          ipmi
558 _ips=           ips
559 _ipw=           ipw
560 .if ${MK_SOURCELESS_UCODE} != "no"
561 _ipwfw=         ipwfw
562 .endif
563 _isci=          isci
564 _iwi=           iwi
565 .if ${MK_SOURCELESS_UCODE} != "no"
566 _iwifw=         iwifw
567 .endif
568 _iwn=           iwn
569 .if ${MK_SOURCELESS_UCODE} != "no"
570 _iwnfw=         iwnfw
571 .endif
572 _ixgb=          ixgb
573 _ixgbe=         ixgbe
574 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
575 _mlx4=          mlx4
576 _mlx4ib=        mlx4ib
577 _mlxen=         mlxen
578 .endif
579 _mly=           mly
580 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
581 _mthca=         mthca
582 .endif
583 _nfe=           nfe
584 _nvd=           nvd
585 _nvme=          nvme
586 _nvram=         nvram
587 _nxge=          nxge
588 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
589 _padlock=       padlock
590 _padlock_rng=   padlock_rng
591 _rdrand_rng=    rdrand_rng
592 .endif
593 _s3=            s3
594 _tpm=           tpm
595 _twa=           twa
596 _vesa=          vesa
597 _viawd=         viawd
598 _virtio=        virtio
599 _wpi=           wpi
600 .if ${MK_SOURCELESS_UCODE} != "no"
601 _wpifw=         wpifw
602 .endif
603 _x86bios=       x86bios
604 .endif
605 .endif
606
607 .if ${MACHINE_CPUARCH} == "amd64"
608 _ixl=           ixl
609 _ixlv=          ixlv
610 _ntb=           ntb
611 _qlxge=         qlxge
612 _qlxgb=         qlxgb
613 _qlxgbe=        qlxgbe
614 _sfxge=         sfxge
615 _vmm=           vmm
616 .endif
617
618 .if ${MACHINE_CPUARCH} == "i386"
619 # XXX some of these can move to the general case when de-i386'ed
620 # XXX some of these can move now, but are untested on other architectures.
621 _3dfx=          3dfx
622 _3dfx_linux=    3dfx_linux
623 _aic=           aic
624 _apm=           apm
625 _arcnet=        arcnet
626 .if ${MK_SOURCELESS_UCODE} != "no"
627 _ce=            ce
628 .endif
629 _coff=          coff
630 .if ${MK_SOURCELESS_UCODE} != "no"
631 _cp=            cp
632 .endif
633 _cs=            cs
634 _elink=         elink
635 _ep=            ep
636 _fe=            fe
637 _glxiic=        glxiic
638 _glxsb=         glxsb
639 _ibcs2=         ibcs2
640 _ie=            ie
641 _mse=           mse
642 _ncr=           ncr
643 _ncv=           ncv
644 _nsp=           nsp
645 _pcfclock=      pcfclock
646 _pst=           pst
647 _sbni=          sbni
648 _streams=       streams
649 _stg=           stg
650 _svr4=          svr4
651 _wds=           wds
652 _xe=            xe
653 .if ${MACHINE} == "i386"
654 .if ${MK_EISA} != "no"
655 _ahb=           ahb
656 .endif
657 _asr=           asr
658 _bios=          bios
659 _cm=            cm
660 .if ${MK_SOURCELESS_UCODE} != "no"
661 _ctau=          ctau
662 .endif
663 _dpt=           dpt
664 _ex=            ex
665 _wl=            wl
666 .elif ${MACHINE} == "pc98"
667 _canbepm=       canbepm
668 _canbus=        canbus
669 _ct=            ct
670 _pmc=           pmc
671 _snc=           snc
672 .endif
673 .endif
674
675 .if ${MACHINE_CPUARCH} == "arm"
676 _cfi=           cfi
677 _cpsw=          cpsw
678 _sound=         sound
679 .endif
680
681 .if ${MACHINE_CPUARCH} == "powerpc"
682 _agp=           agp
683 _an=            an
684 _bm=            bm
685 _cardbus=       cardbus
686 _cbb=           cbb
687 _cfi=           cfi
688 _cpufreq=       cpufreq
689 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
690 _cyclic=        cyclic
691 .endif
692 _drm=           drm
693 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
694 _dtrace=        dtrace
695 .endif
696 _exca=          exca
697 _nvram=         powermac_nvram
698 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
699 _opensolaris=   opensolaris
700 .endif
701 _pccard=        pccard
702 _smbfs=         smbfs
703 _sound=         sound
704 _wi=            wi
705 .endif
706
707 .if ${MACHINE_ARCH} == "powerpc64"
708 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
709 _zfs=           zfs
710 .endif
711 .endif
712
713 .if ${MACHINE_CPUARCH} == "sparc64"
714 _auxio=         auxio
715 _em=            em
716 _epic=          epic
717 _i2c=           i2c
718 _igb=           igb
719 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
720 _opensolaris=   opensolaris
721 .endif
722 _smbfs=         smbfs
723 _sound=         sound
724 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
725 _zfs=           zfs
726 .endif
727 .endif
728
729 .endif
730
731 .for reject in ${WITHOUT_MODULES}
732 SUBDIR:= ${SUBDIR:N${reject}}
733 .endfor
734
735 # Calling kldxref(8) for each module is expensive.
736 .if !defined(NO_XREF)
737 .MAKEFLAGS+=    -DNO_XREF
738 afterinstall:
739         @if type kldxref >/dev/null 2>&1; then \
740                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
741                 kldxref ${DESTDIR}${KMODDIR}; \
742         fi
743 .endif
744
745 .include <bsd.subdir.mk>