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