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