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