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