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