]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
MF head @ r284358
[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         ${_cm} \
76         ${_cmx} \
77         ${_coff} \
78         ${_coretemp} \
79         ${_cp} \
80         ${_cpsw} \
81         ${_cpuctl} \
82         ${_cpufreq} \
83         ${_crypto} \
84         ${_cryptodev} \
85         ${_cs} \
86         ${_ct} \
87         ${_ctau} \
88         ctl \
89         ${_cxgb} \
90         ${_cxgbe} \
91         dc \
92         dcons \
93         dcons_crom \
94         de \
95         ${_dpms} \
96         ${_dpt} \
97         ${_drm} \
98         ${_drm2} \
99         ${_dtrace} \
100         dummynet \
101         ${_ed} \
102         ${_elink} \
103         ${_em} \
104         en \
105         ${_ep} \
106         ${_epic} \
107         esp \
108         ${_et} \
109         ${_ex} \
110         ${_exca} \
111         ext2fs \
112         ${_fatm} \
113         fdc \
114         fdescfs \
115         ${_fe} \
116         ${_filemon} \
117         firewire \
118         firmware \
119         fuse \
120         ${_fxp} \
121         gem \
122         geom \
123         ${_glxiic} \
124         ${_glxsb} \
125         hatm \
126         hifn \
127         hme \
128         ${_hpt27xx} \
129         ${_hptiop} \
130         ${_hptmv} \
131         ${_hptnr} \
132         ${_hptrr} \
133         hwpmc \
134         ${_hyperv} \
135         i2c \
136         ${_ibcore} \
137         ${_ibcs2} \
138         ${_ichwd} \
139         ${_ida} \
140         ${_ie} \
141         if_bridge \
142         if_disc \
143         if_edsc \
144         if_epair \
145         ${_if_gif} \
146         ${_if_gre} \
147         ${_if_me} \
148         if_lagg \
149         ${_if_ndis} \
150         if_stf \
151         if_tap \
152         if_tun \
153         if_vlan \
154         if_vxlan \
155         ${_igb} \
156         ${_iir} \
157         imgact_binmisc \
158         ${_io} \
159         ${_ipoib} \
160         ${_ipdivert} \
161         ${_ipfilter} \
162         ${_ipfw} \
163         ipfw_nat \
164         ${_ipmi} \
165         ip6_mroute_mod \
166         ip_mroute_mod \
167         ${_ips} \
168         ${_ipw} \
169         ${_ipwfw} \
170         ${_isci} \
171         isp \
172         ${_ispfw} \
173         ${_iwi} \
174         ${_iwifw} \
175         ${_iwn} \
176         ${_iwnfw} \
177         ${_ixgb} \
178         ${_ix} \
179         ${_ixv} \
180         ${_ixl} \
181         ${_ixlv} \
182         jme \
183         joy \
184         kbdmux \
185         kgssapi \
186         kgssapi_krb5 \
187         khelp \
188         krpc \
189         ksyms \
190         le \
191         lge \
192         libalias \
193         libiconv \
194         libmbpool \
195         libmchain \
196         ${_linprocfs} \
197         ${_linsysfs} \
198         ${_linux} \
199         ${_linux_common} \
200         ${_linux64} \
201         ${_linuxapi} \
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         nfscl \
252         nfscommon \
253         nfsd \
254         nfslock \
255         nfslockd \
256         nfssvc \
257         nge \
258         nmdm \
259         ${_nsp} \
260         nullfs \
261         ${_ntb} \
262         ${_nvd} \
263         ${_nvme} \
264         ${_nvram} \
265         ${_nxge} \
266         ${_opensolaris} \
267         oce \
268         ${_padlock} \
269         ${_padlock_rng} \
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         ${_rdrand_rng} \
298         re \
299         reiserfs \
300         rl \
301         ${_s3} \
302         ${_safe} \
303         ${_sbni} \
304         scc \
305         scd \
306         ${_scsi_low} \
307         sdhci \
308         sdhci_pci \
309         sem \
310         send \
311         ${_sf} \
312         ${_sfxge} \
313         sge \
314         ${_si} \
315         siba_bwn \
316         siftr \
317         siis \
318         sis \
319         sk \
320         smbfs \
321         sn \
322         ${_snc} \
323         snp \
324         sound \
325         ${_speaker} \
326         ${_splash} \
327         ${_sppp} \
328         ste \
329         ${_stg} \
330         stge \
331         ${_streams} \
332         ${_svr4} \
333         ${_sym} \
334         ${_syscons} \
335         sysvipc \
336         ${_ti} \
337         tl \
338         tmpfs \
339         ${_toecore} \
340         ${_tpm} \
341         trm \
342         ${_twa} \
343         twe \
344         tws \
345         tx \
346         ${_txp} \
347         uart \
348         ubsec \
349         udf \
350         udf_iconv \
351         ufs \
352         unionfs \
353         usb \
354         utopia \
355         ${_vesa} \
356         ${_virtio} \
357         vge \
358         ${_viawd} \
359         videomode \
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 ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
390 _autofs=        autofs
391 .endif
392
393 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
394 .if exists(${.CURDIR}/../opencrypto)
395 _crypto=        crypto
396 _cryptodev=     cryptodev
397 .endif
398 .if exists(${.CURDIR}/../crypto)
399 _random=        random
400 .endif
401 .endif
402
403 .if ${MK_CUSE} != "no" || defined(ALL_MODULES)
404 SUBDIR+=        cuse
405 .endif
406
407 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
408         defined(ALL_MODULES)
409 _carp=          carp
410 _toecore=       toecore
411 _if_gif=        if_gif
412 _if_gre=        if_gre
413 .endif
414
415 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
416 _if_me=         if_me
417 _ipdivert=      ipdivert
418 _ipfw=          ipfw
419 .endif
420
421 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
422 _ipfilter=      ipfilter
423 .endif
424
425 .if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
426 SUBDIR+=        iscsi
427 SUBDIR+=        iscsi_initiator
428 .endif
429
430 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
431 _nandfs=        nandfs
432 _nandsim=       nandsim
433 .endif
434
435 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
436 _netgraph=      netgraph
437 .endif
438
439 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
440         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
441 _pf=            pf
442 _pflog=         pflog
443 .if ${MK_INET_SUPPORT} != "no"
444 _pfsync=        pfsync
445 .endif
446 .endif
447
448 .if ${MK_SOURCELESS_UCODE} != "no"
449 _bce=           bce
450 _fatm=          fatm
451 _fxp=           fxp
452 _ispfw=         ispfw
453 _mwlfw=         mwlfw
454 _ralfw=         ralfw
455 _sf=            sf
456 _ti=            ti
457 _txp=           txp
458 .endif
459
460 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
461         ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
462         ${MACHINE_ARCH} != "powerpc"
463 _cxgbe=         cxgbe
464 .endif
465
466 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
467         ${MACHINE_CPUARCH} != "powerpc"
468 _syscons=       syscons
469 _vpo=           vpo
470 .endif
471
472 .if ${MACHINE_CPUARCH} != "mips"
473 # no BUS_SPACE_UNSPECIFIED
474 # No barrier instruction support (specific to this driver)
475 _sym=           sym
476 # intr_disable() is a macro, causes problems
477 .if ${MK_SOURCELESS_UCODE} != "no"
478 _cxgb=          cxgb
479 .endif
480 .endif
481
482 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
483 _agp=           agp
484 _an=            an
485 _aout=          aout
486 _bktr=          bktr
487 _bxe=           bxe
488 _cardbus=       cardbus
489 _cbb=           cbb
490 _cpuctl=        cpuctl
491 _cpufreq=       cpufreq
492 _cs=            cs
493 _dpms=          dpms
494 _drm=           drm
495 _drm2=          drm2
496 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
497 _dtrace=        dtrace
498 .endif
499 _ed=            ed
500 _em=            em
501 _ep=            ep
502 _et=            et
503 _exca=          exca
504 _fe=            fe
505 _filemon=       filemon
506 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
507 _ibcore=        ibcore
508 .endif
509 _if_ndis=       if_ndis
510 _igb=           igb
511 _io=            io
512 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
513 _ipoib=         ipoib
514 .endif
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 _ixl=           ixl
622 _ixlv=          ixlv
623 _linux64=       linux64
624 _linux_common=  linux_common
625 _ntb=           ntb
626 _qlxge=         qlxge
627 _qlxgb=         qlxgb
628 _qlxgbe=        qlxgbe
629 _sfxge=         sfxge
630
631 .if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
632 _vmm=           vmm
633 .endif
634 .endif
635
636 .if ${MACHINE_CPUARCH} == "i386"
637 # XXX some of these can move to the general case when de-i386'ed
638 # XXX some of these can move now, but are untested on other architectures.
639 _3dfx=          3dfx
640 _3dfx_linux=    3dfx_linux
641 _aic=           aic
642 _apm=           apm
643 _arcnet=        arcnet
644 .if ${MK_SOURCELESS_UCODE} != "no"
645 _ce=            ce
646 .endif
647 _coff=          coff
648 .if ${MK_SOURCELESS_UCODE} != "no"
649 _cp=            cp
650 .endif
651 _elink=         elink
652 _glxiic=        glxiic
653 _glxsb=         glxsb
654 _ibcs2=         ibcs2
655 _ie=            ie
656 _mse=           mse
657 _ncr=           ncr
658 _ncv=           ncv
659 _nsp=           nsp
660 _pcfclock=      pcfclock
661 _pst=           pst
662 _sbni=          sbni
663 _streams=       streams
664 _stg=           stg
665 _svr4=          svr4
666 _wds=           wds
667 .if ${MACHINE} == "i386"
668 .if ${MK_EISA} != "no"
669 _ahb=           ahb
670 .endif
671 _bios=          bios
672 _cm=            cm
673 .if ${MK_SOURCELESS_UCODE} != "no"
674 _ctau=          ctau
675 .endif
676 _dpt=           dpt
677 _ex=            ex
678 _wl=            wl
679 .elif ${MACHINE} == "pc98"
680 _canbepm=       canbepm
681 _canbus=        canbus
682 _ct=            ct
683 _pmc=           pmc
684 _snc=           snc
685 .endif
686 .endif
687
688 .if ${MACHINE_CPUARCH} == "arm"
689 _cfi=           cfi
690 _cpsw=          cpsw
691 .endif
692
693 .if ${MACHINE_CPUARCH} == "powerpc"
694 _agp=           agp
695 _an=            an
696 _bm=            bm
697 _cardbus=       cardbus
698 _cbb=           cbb
699 _cfi=           cfi
700 _cpufreq=       cpufreq
701 _drm=           drm
702 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
703 _dtrace=        dtrace
704 .endif
705 _exca=          exca
706 _nvram=         powermac_nvram
707 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
708 _opensolaris=   opensolaris
709 .endif
710 _pccard=        pccard
711 _wi=            wi
712 .endif
713
714 .if ${MACHINE_ARCH} == "powerpc64"
715 _drm2=          drm2
716 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
717 _zfs=           zfs
718 .endif
719 .endif
720
721 .if ${MACHINE_CPUARCH} == "sparc64"
722 _auxio=         auxio
723 _em=            em
724 _epic=          epic
725 _igb=           igb
726 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
727 _opensolaris=   opensolaris
728 .endif
729 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
730 _zfs=           zfs
731 .endif
732 .endif
733
734 .endif
735
736 SUBDIR+=${MODULES_EXTRA}
737
738 .for reject in ${WITHOUT_MODULES}
739 SUBDIR:= ${SUBDIR:N${reject}}
740 .endfor
741
742 # Calling kldxref(8) for each module is expensive.
743 .if !defined(NO_XREF)
744 .MAKEFLAGS+=    -DNO_XREF
745 afterinstall:
746         @if type kldxref >/dev/null 2>&1; then \
747                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
748                 kldxref ${DESTDIR}${KMODDIR}; \
749         fi
750 .endif
751
752 .include "${SYSDIR}/conf/config.mk"
753
754 SUBDIR:= ${SUBDIR:u:O}
755
756 .include <bsd.subdir.mk>