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