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