]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/modules/Makefile
Start importing the basic OFED linux compatibility layer changes made
[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         cuse \
90         ${_cxgb} \
91         ${_cxgbe} \
92         dc \
93         dcons \
94         dcons_crom \
95         de \
96         ${_dpms} \
97         ${_dpt} \
98         ${_drm} \
99         ${_drm2} \
100         ${_dtrace} \
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_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         ${_ipoib} \
161         ${_ipdivert} \
162         ${_ipfilter} \
163         ${_ipfw} \
164         ipfw_nat \
165         ${_ipmi} \
166         ip6_mroute_mod \
167         ip_mroute_mod \
168         ${_ips} \
169         ${_ipw} \
170         ${_ipwfw} \
171         ${_isci} \
172         iscsi \
173         iscsi_initiator \
174         isp \
175         ${_ispfw} \
176         ${_iwi} \
177         ${_iwifw} \
178         ${_iwn} \
179         ${_iwnfw} \
180         ${_ixgb} \
181         ${_ixgbe} \
182         ${_ixl} \
183         ${_ixlv} \
184         jme \
185         joy \
186         kbdmux \
187         kgssapi \
188         kgssapi_krb5 \
189         khelp \
190         krpc \
191         ksyms \
192         le \
193         lge \
194         libalias \
195         libiconv \
196         libmbpool \
197         libmchain \
198         ${_linprocfs} \
199         ${_linsysfs} \
200         ${_linux} \
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         ${_random} \
295         rc4 \
296         ${_rdma} \
297         ${_rdrand_rng} \
298         re \
299         reiserfs \
300         rl \
301         ${_s3} \
302         ${_safe} \
303         ${_sbni} \
304         scc \
305         scd \
306         ${_scsi_low} \
307         sdhci \
308         sdhci_pci \
309         sem \
310         send \
311         ${_sf} \
312         ${_sfxge} \
313         sge \
314         ${_si} \
315         siba_bwn \
316         siftr \
317         siis \
318         sis \
319         sk \
320         ${_smbfs} \
321         sn \
322         ${_snc} \
323         snp \
324         ${_sound} \
325         ${_speaker} \
326         ${_splash} \
327         ${_sppp} \
328         ste \
329         ${_stg} \
330         stge \
331         ${_streams} \
332         ${_svr4} \
333         ${_sym} \
334         ${_syscons} \
335         sysvipc \
336         ${_ti} \
337         tl \
338         tmpfs \
339         ${_toecore} \
340         ${_tpm} \
341         trm \
342         ${_twa} \
343         twe \
344         tws \
345         tx \
346         ${_txp} \
347         uart \
348         ubsec \
349         udf \
350         udf_iconv \
351         ufs \
352         unionfs \
353         usb \
354         utopia \
355         ${_vesa} \
356         ${_virtio} \
357         vge \
358         ${_viawd} \
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_CRYPT} != "no" || defined(ALL_MODULES)
389 .if exists(${.CURDIR}/../opencrypto)
390 _crypto=        crypto
391 _cryptodev=     cryptodev
392 .endif
393 .if exists(${.CURDIR}/../crypto)
394 _random=        random
395 .endif
396 .endif
397
398 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
399         defined(ALL_MODULES)
400 _carp=          carp
401 _toecore=       toecore
402 _if_gif=        if_gif
403 _if_gre=        if_gre
404 .endif
405
406 .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
407 _if_me=         if_me
408 _ipdivert=      ipdivert
409 _ipfw=          ipfw
410 .endif
411
412 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
413 _ipfilter=      ipfilter
414 .endif
415
416 .if ${MK_NAND} != "no" || defined(ALL_MODULES)
417 _nandfs=        nandfs
418 _nandsim=       nandsim
419 .endif
420
421 .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
422 _netgraph=      netgraph
423 .endif
424
425 .if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
426         ${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
427 _pf=            pf
428 _pflog=         pflog
429 .if ${MK_INET_SUPPORT} != "no"
430 _pfsync=        pfsync
431 .endif
432 .endif
433
434 .if ${MK_SOURCELESS_UCODE} != "no"
435 _bce=           bce
436 _fatm=          fatm
437 _fxp=           fxp
438 _ispfw=         ispfw
439 _mwlfw=         mwlfw
440 _ralfw=         ralfw
441 _sf=            sf
442 _ti=            ti
443 _txp=           txp
444 .endif
445
446 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
447         ${MACHINE_ARCH} != "powerpc"
448 _cxgbe=         cxgbe
449 .endif
450
451 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
452         ${MACHINE_CPUARCH} != "powerpc"
453 _syscons=       syscons
454 _vpo=           vpo
455 .endif
456
457 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
458 # no BUS_SPACE_UNSPECIFIED
459 # No barrier instruction support (specific to this driver)
460 _sym=           sym
461 # intr_disable() is a macro, causes problems
462 .if ${MK_SOURCELESS_UCODE} != "no"
463 _cxgb=          cxgb
464 .endif
465 .endif
466
467 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
468 _agp=           agp
469 _an=            an
470 _aout=          aout
471 _bktr=          bktr
472 _bxe=           bxe
473 _cardbus=       cardbus
474 _cbb=           cbb
475 _cpuctl=        cpuctl
476 _cpufreq=       cpufreq
477 _cs=            cs
478 _dpms=          dpms
479 _drm=           drm
480 _drm2=          drm2
481 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
482 _dtrace=        dtrace
483 .endif
484 _ed=            ed
485 _em=            em
486 _ep=            ep
487 _et=            et
488 _exca=          exca
489 _ext2fs=        ext2fs
490 _fe=            fe
491 _filemon=       filemon
492 _i2c=           i2c
493 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
494 _ibcore=        ibcore
495 .endif
496 _if_ndis=       if_ndis
497 _igb=           igb
498 _io=            io
499 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
500 _ipoib=         ipoib
501 .endif
502 _linprocfs=     linprocfs
503 _linsysfs=      linsysfs
504 _linux=         linux
505 _linuxapi=      linuxapi
506 _ndis=          ndis
507 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
508 _opensolaris=   opensolaris
509 .endif
510 _pccard=        pccard
511 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
512 _rdma=          rdma
513 .endif
514 _safe=          safe
515 _scsi_low=      scsi_low
516 _si=            si
517 _smbfs=         smbfs
518 _sound=         sound
519 _speaker=       speaker
520 _splash=        splash
521 _sppp=          sppp
522 _vmware=        vmware
523 _vxge=          vxge
524 _wbwd=          wbwd
525 _wi=            wi
526 _xe=            xe
527 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
528 _zfs=           zfs
529 .endif
530 .if ${MACHINE} != "pc98"
531 _aac=           aac
532 _aacraid=       aacraid
533 _acpi=          acpi
534 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
535 _aesni=         aesni
536 .endif
537 _amdsbwd=       amdsbwd
538 _amdtemp=       amdtemp
539 _arcmsr=        arcmsr
540 _asmc=          asmc
541 _ciss=          ciss
542 _cmx=           cmx
543 _coretemp=      coretemp
544 .if ${MK_SOURCELESS_HOST} != "no"
545 _hpt27xx=       hpt27xx
546 .endif
547 _hptiop=        hptiop
548 .if ${MK_SOURCELESS_HOST} != "no"
549 _hptmv=         hptmv
550 _hptnr=         hptnr
551 _hptrr=         hptrr
552 .endif
553 _hyperv=        hyperv
554 _ichwd=         ichwd
555 _ida=           ida
556 _iir=           iir
557 _ipmi=          ipmi
558 _ips=           ips
559 _ipw=           ipw
560 .if ${MK_SOURCELESS_UCODE} != "no"
561 _ipwfw=         ipwfw
562 .endif
563 _isci=          isci
564 _iwi=           iwi
565 .if ${MK_SOURCELESS_UCODE} != "no"
566 _iwifw=         iwifw
567 .endif
568 _iwn=           iwn
569 .if ${MK_SOURCELESS_UCODE} != "no"
570 _iwnfw=         iwnfw
571 .endif
572 _ixgb=          ixgb
573 _ixgbe=         ixgbe
574 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
575 _mlx4=          mlx4
576 _mlx4ib=        mlx4ib
577 _mlxen=         mlxen
578 .endif
579 _mly=           mly
580 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
581 _mthca=         mthca
582 .endif
583 _nfe=           nfe
584 _nvd=           nvd
585 _nvme=          nvme
586 _nvram=         nvram
587 _nxge=          nxge
588 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
589 _padlock=       padlock
590 _padlock_rng=   padlock_rng
591 _rdrand_rng=    rdrand_rng
592 .endif
593 _s3=            s3
594 _tpm=           tpm
595 _twa=           twa
596 _vesa=          vesa
597 _viawd=         viawd
598 _virtio=        virtio
599 _wpi=           wpi
600 .if ${MK_SOURCELESS_UCODE} != "no"
601 _wpifw=         wpifw
602 .endif
603 _x86bios=       x86bios
604 .endif
605 .endif
606
607 .if ${MACHINE_CPUARCH} == "amd64"
608 _ixl=           ixl
609 _ixlv=          ixlv
610 _ntb=           ntb
611 _qlxge=         qlxge
612 _qlxgb=         qlxgb
613 _qlxgbe=        qlxgbe
614 _sfxge=         sfxge
615 _vmm=           vmm
616 .endif
617
618 .if ${MACHINE_CPUARCH} == "i386"
619 # XXX some of these can move to the general case when de-i386'ed
620 # XXX some of these can move now, but are untested on other architectures.
621 _3dfx=          3dfx
622 _3dfx_linux=    3dfx_linux
623 _aic=           aic
624 _apm=           apm
625 _arcnet=        arcnet
626 .if ${MK_SOURCELESS_UCODE} != "no"
627 _ce=            ce
628 .endif
629 _coff=          coff
630 .if ${MK_SOURCELESS_UCODE} != "no"
631 _cp=            cp
632 .endif
633 _elink=         elink
634 _glxiic=        glxiic
635 _glxsb=         glxsb
636 _ibcs2=         ibcs2
637 _ie=            ie
638 _mse=           mse
639 _ncr=           ncr
640 _ncv=           ncv
641 _nsp=           nsp
642 _pcfclock=      pcfclock
643 _pst=           pst
644 _sbni=          sbni
645 _streams=       streams
646 _stg=           stg
647 _svr4=          svr4
648 _wds=           wds
649 .if ${MACHINE} == "i386"
650 .if ${MK_EISA} != "no"
651 _ahb=           ahb
652 .endif
653 _bios=          bios
654 _cm=            cm
655 .if ${MK_SOURCELESS_UCODE} != "no"
656 _ctau=          ctau
657 .endif
658 _dpt=           dpt
659 _ex=            ex
660 _wl=            wl
661 .elif ${MACHINE} == "pc98"
662 _canbepm=       canbepm
663 _canbus=        canbus
664 _ct=            ct
665 _pmc=           pmc
666 _snc=           snc
667 .endif
668 .endif
669
670 .if ${MACHINE_CPUARCH} == "arm"
671 _cfi=           cfi
672 _cpsw=          cpsw
673 _sound=         sound
674 .endif
675
676 .if ${MACHINE_CPUARCH} == "powerpc"
677 _agp=           agp
678 _an=            an
679 _bm=            bm
680 _cardbus=       cardbus
681 _cbb=           cbb
682 _cfi=           cfi
683 _cpufreq=       cpufreq
684 _drm=           drm
685 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
686 _dtrace=        dtrace
687 .endif
688 _exca=          exca
689 _nvram=         powermac_nvram
690 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
691 _opensolaris=   opensolaris
692 .endif
693 _pccard=        pccard
694 _smbfs=         smbfs
695 _sound=         sound
696 _wi=            wi
697 .endif
698
699 .if ${MACHINE_ARCH} == "powerpc64"
700 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
701 _zfs=           zfs
702 .endif
703 .endif
704
705 .if ${MACHINE_CPUARCH} == "sparc64"
706 _auxio=         auxio
707 _em=            em
708 _epic=          epic
709 _i2c=           i2c
710 _igb=           igb
711 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
712 _opensolaris=   opensolaris
713 .endif
714 _smbfs=         smbfs
715 _sound=         sound
716 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
717 _zfs=           zfs
718 .endif
719 .endif
720
721 .endif
722
723 .for reject in ${WITHOUT_MODULES}
724 SUBDIR:= ${SUBDIR:N${reject}}
725 .endfor
726
727 # Calling kldxref(8) for each module is expensive.
728 .if !defined(NO_XREF)
729 .MAKEFLAGS+=    -DNO_XREF
730 afterinstall:
731         @if type kldxref >/dev/null 2>&1; then \
732                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
733                 kldxref ${DESTDIR}${KMODDIR}; \
734         fi
735 .endif
736
737 .include <bsd.subdir.mk>