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