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