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