Makefile revision 315514
1# $FreeBSD: stable/11/sys/modules/Makefile 315514 2017-03-18 22:04:20Z ae $
2
3SYSDIR?=${.CURDIR}/..
4.include "${SYSDIR}/conf/kern.opts.mk"
5
6SUBDIR_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)
12SUBDIR=${MODULES_OVERRIDE}
13.else
14SUBDIR=	\
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	alc \
35	ale \
36	alq \
37	${_amdsbwd} \
38	${_amdtemp} \
39	amr \
40	${_an} \
41	${_aout} \
42	${_apm} \
43	${_arcmsr} \
44	${_arcnet} \
45	${_asmc} \
46	ata \
47	ath \
48	ath_pci \
49	${_autofs} \
50	${_auxio} \
51	${_bce} \
52	bfe \
53	bge \
54	bhnd \
55	${_bxe} \
56	${_bios} \
57	${_bktr} \
58	${_bm} \
59	bnxt \
60	bridgestp \
61	bwi \
62	bwn \
63	bwn_pci \
64	${_bytgpio} \
65	cam \
66	${_canbepm} \
67	${_canbus} \
68	${_cardbus} \
69	${_carp} \
70	cas \
71	${_cbb} \
72	cc \
73	cd9660 \
74	cd9660_iconv \
75	${_ce} \
76	${_cfi} \
77	${_chromebook_platform} \
78	${_ciss} \
79	cloudabi \
80	${_cloudabi32} \
81	${_cloudabi64} \
82	${_cm} \
83	${_cmx} \
84	${_coff} \
85	${_coretemp} \
86	${_cp} \
87	${_cpsw} \
88	${_cpuctl} \
89	${_cpufreq} \
90	${_crypto} \
91	${_cryptodev} \
92	${_cs} \
93	${_ct} \
94	${_ctau} \
95	ctl \
96	${_cxgb} \
97	${_cxgbe} \
98	dc \
99	dcons \
100	dcons_crom \
101	de \
102	${_dpms} \
103	${_dpt} \
104	${_drm} \
105	${_drm2} \
106	dummynet \
107	${_ed} \
108	${_efirt} \
109	${_elink} \
110	${_em} \
111	en \
112	${_ep} \
113	${_epic} \
114	esp \
115	${_et} \
116	evdev \
117	${_ex} \
118	${_exca} \
119	ext2fs \
120	${_fatm} \
121	fdc \
122	fdescfs \
123	${_fe} \
124	filemon \
125	firewire \
126	firmware \
127	fuse \
128	${_fxp} \
129	gem \
130	geom \
131	${_glxiic} \
132	${_glxsb} \
133	gpio \
134	hatm \
135	hifn \
136	hme \
137	${_hpt27xx} \
138	${_hptiop} \
139	${_hptmv} \
140	${_hptnr} \
141	${_hptrr} \
142	hwpmc \
143	${_hyperv} \
144	i2c \
145        ${_ibcore} \
146	${_ibcs2} \
147	${_ichwd} \
148	${_ida} \
149	${_ie} \
150	if_bridge \
151	if_disc \
152	if_edsc \
153	${_if_enc} \
154	if_epair \
155	${_if_gif} \
156	${_if_gre} \
157	${_if_me} \
158	if_lagg \
159	${_if_ndis} \
160	${_if_stf} \
161	if_tap \
162	if_tun \
163	if_vlan \
164	if_vxlan \
165	${_igb} \
166	${_iir} \
167	imgact_binmisc \
168	${_intelspi} \
169	${_io} \
170	${_ioat} \
171        ${_ipoib} \
172	${_ipdivert} \
173	${_ipfilter} \
174	${_ipfw} \
175	ipfw_nat \
176	${_ipmi} \
177	ip6_mroute_mod \
178	ip_mroute_mod \
179	${_ips} \
180	${_ipsec} \
181	${_ipw} \
182	${_ipwfw} \
183	${_isci} \
184	${_iser} \
185	isp \
186	${_ispfw} \
187	${_iwi} \
188	${_iwifw} \
189	${_iwm} \
190	${_iwmfw} \
191	${_iwn} \
192	${_iwnfw} \
193	${_ix} \
194	${_ixv} \
195	${_ixgb} \
196	${_ixl} \
197	${_ixlv} \
198	jme \
199	joy \
200	kbdmux \
201	kgssapi \
202	kgssapi_krb5 \
203	khelp \
204	krpc \
205	ksyms \
206	le \
207	lge \
208	libalias \
209	libiconv \
210	libmbpool \
211	libmchain \
212	${_linprocfs} \
213	${_linsysfs} \
214	${_linux} \
215	${_linux_common} \
216	${_linux64} \
217	linuxkpi \
218	lmc \
219	lpt \
220	mac_biba \
221	mac_bsdextended \
222	mac_ifoff \
223	mac_lomac \
224	mac_mls \
225	mac_none \
226	mac_partition \
227	mac_portacl \
228	mac_seeotheruids \
229	mac_stub \
230	mac_test \
231	malo \
232	mcd \
233	md \
234	mdio \
235	mem \
236	mfi \
237	mii \
238	mlx \
239	${_mlx4} \
240	${_mlx4ib} \
241	${_mlxen} \
242	${_mlx5} \
243	${_mlx5en} \
244	${_mly} \
245	mmc \
246	mmcsd \
247	mpr \
248	mps \
249	mpt \
250	mqueue \
251	mrsas \
252	msdosfs \
253	msdosfs_iconv \
254	${_mse} \
255	msk \
256	${_mthca} \
257	mvs \
258	mwl \
259	${_mwlfw} \
260	mxge \
261	my \
262	${_nandfs} \
263	${_nandsim} \
264	${_ncr} \
265	${_nctgpio} \
266	${_ncv} \
267	${_ndis} \
268	netfpga10g \
269	${_netgraph} \
270	${_nfe} \
271	nfscl \
272	nfscommon \
273	nfsd \
274	nfslock \
275	nfslockd \
276	nfssvc \
277	nge \
278	nmdm \
279	${_nsp} \
280	nullfs \
281	${_ntb} \
282	${_nvd} \
283	${_nvme} \
284	${_nvram} \
285	${_nxge} \
286	oce \
287	otus \
288	${_otusfw} \
289	ow \
290	${_padlock} \
291	${_padlock_rng} \
292	patm \
293	${_pccard} \
294	${_pcfclock} \
295	pcn \
296	${_pf} \
297	${_pflog} \
298	${_pfsync} \
299	plip \
300	${_pmc} \
301	${_pms} \
302	ppbus \
303	ppc \
304	ppi \
305	pps \
306	procfs \
307	proto \
308	pseudofs \
309	${_pst} \
310	pty  \
311	puc \
312	${_qlxge} \
313	${_qlxgb} \
314	${_qlxgbe} \
315	ral \
316	${_ralfw} \
317	${_random_fortuna} \
318	${_random_yarrow} \
319	${_random_other} \
320	rc4 \
321	${_rdma} \
322	${_rdrand_rng} \
323	re \
324	rl \
325	rtwn \
326	${_rtwnfw} \
327	${_s3} \
328	${_safe} \
329	${_sbni} \
330	scc \
331	scd \
332	${_scsi_low} \
333	sdhci \
334	${_sdhci_acpi} \
335	sdhci_pci \
336	sem \
337	send \
338	${_sf} \
339	${_sfxge} \
340	sge \
341	${_si} \
342	siba_bwn \
343	siftr \
344	siis \
345	sis \
346	sk \
347	smbfs \
348	sn \
349	${_snc} \
350	snp \
351	sound \
352	${_speaker} \
353	${_splash} \
354	${_sppp} \
355	ste \
356	${_stg} \
357	stge \
358	${_streams} \
359	${_svr4} \
360	${_sym} \
361	${_syscons} \
362	sysvipc \
363	${_ti} \
364	${_tcp_fastpath} \
365	${_tcpmd5} \
366	tests/framework \
367	tests/callout_test \
368	tl \
369	tmpfs \
370	${_toecore} \
371	${_tpm} \
372	trm \
373	${_twa} \
374	twe \
375	tws \
376	tx \
377	${_txp} \
378	uart \
379	ubsec \
380	udf \
381	udf_iconv \
382	ufs \
383	uinput \
384	unionfs \
385	urtwn \
386	${_urtwnfw} \
387	usb \
388	utopia \
389	${_vesa} \
390	${_virtio} \
391	vge \
392	${_viawd} \
393	videomode \
394	vkbd \
395	${_vmm} \
396	${_vmware} \
397	${_vpo} \
398	vr \
399	vte \
400	vx \
401	${_vxge} \
402	wb \
403	${_wbwd} \
404	${_wds} \
405	${_wi} \
406	${_wl} \
407	wlan \
408	wlan_acl \
409	wlan_amrr \
410	wlan_ccmp \
411	wlan_rssadapt \
412	wlan_tkip \
413	wlan_wep \
414	wlan_xauth \
415	${_wpi} \
416	${_wpifw} \
417	${_x86bios} \
418	${_xe} \
419	xl \
420	zlib
421
422.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES)
423_autofs=	autofs
424.endif
425
426.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
427.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
428	${MACHINE_CPUARCH} != "mips" && \
429	${MACHINE_CPUARCH} != "sparc64"
430SUBDIR+=	dtrace
431.endif
432SUBDIR+=	opensolaris
433.endif
434
435.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
436.if exists(${.CURDIR}/../opencrypto)
437_crypto=	crypto
438_cryptodev=	cryptodev
439_random_fortuna=random_fortuna
440_random_yarrow=	random_yarrow
441_random_other=	random_other
442.endif
443.endif
444
445.if ${MK_CUSE} != "no" || defined(ALL_MODULES)
446SUBDIR+=	cuse
447.endif
448
449.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES)
450_tcp_fastpath=	tcp/fastpath
451.endif
452
453.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
454	defined(ALL_MODULES)
455_carp=		carp
456_toecore=	toecore
457_if_enc=	if_enc
458_if_gif=	if_gif
459_if_gre=	if_gre
460.if ${MK_IPSEC_SUPPORT} != "no"
461_ipsec=		ipsec
462_tcpmd5=	tcp/tcpmd5
463.endif
464.endif
465
466.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
467	defined(ALL_MODULES)
468_if_stf=	if_stf
469.endif
470
471.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
472_if_me=		if_me
473_ipdivert=	ipdivert
474_ipfw=		ipfw
475.endif
476
477.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
478_ipfilter=	ipfilter
479.endif
480
481.if ${MK_ISCSI} != "no" || defined(ALL_MODULES)
482SUBDIR+=	iscsi
483SUBDIR+=	iscsi_initiator
484.endif
485
486.if ${MK_NAND} != "no" || defined(ALL_MODULES)
487_nandfs=	nandfs
488_nandsim=	nandsim
489.endif
490
491.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
492_netgraph=	netgraph
493.endif
494
495.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
496	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
497_pf=		pf
498_pflog=		pflog
499.if ${MK_INET_SUPPORT} != "no"
500_pfsync=	pfsync
501.endif
502.endif
503
504.if ${MK_SOURCELESS_UCODE} != "no"
505_bce=		bce
506_fatm=		fatm
507_fxp=		fxp
508_ispfw=		ispfw
509_mwlfw=		mwlfw
510_otusfw=	otusfw
511_ralfw=		ralfw
512_rtwnfw=	rtwnfw
513_urtwnfw=	urtwnfw
514_sf=		sf
515_ti=		ti
516_txp=		txp
517.endif
518
519.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \
520	${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \
521	${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "riscv"
522_cxgbe=		cxgbe
523.endif
524
525.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
526SUBDIR+=	zfs
527.endif
528
529.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \
530	${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \
531	${MACHINE_CPUARCH} != "riscv"
532_syscons=	syscons
533_vpo=		vpo
534.endif
535
536.if ${MACHINE_CPUARCH} != "mips"
537# no BUS_SPACE_UNSPECIFIED
538# No barrier instruction support (specific to this driver)
539_sym=		sym
540# intr_disable() is a macro, causes problems
541.if ${MK_SOURCELESS_UCODE} != "no"
542_cxgb=		cxgb
543.endif
544.endif
545
546.if ${MACHINE_CPUARCH} == "aarch64"
547_em=		em
548_igb=		igb
549.endif
550
551.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
552_agp=		agp
553_an=		an
554_aout=		aout
555_bios=		bios
556_bktr=		bktr
557_bxe=		bxe
558_cardbus=	cardbus
559_cbb=		cbb
560_cpuctl=	cpuctl
561_cpufreq=	cpufreq
562_cs=		cs
563_dpms=		dpms
564_drm=		drm
565_drm2=		drm2
566_ed=		ed
567_em=		em
568_ep=		ep
569_et=		et
570_exca=		exca
571_fe=		fe
572.if ${MK_OFED} != "no" || defined(ALL_MODULES)
573_ibcore=        ibcore
574.endif
575_if_ndis=	if_ndis
576_igb=		igb
577_io=		io
578.if ${MK_OFED} != "no" || defined(ALL_MODULES)
579_ipoib=         ipoib
580_iser=		iser
581.endif
582_ix=		ix
583_ixv=		ixv
584_linprocfs=	linprocfs
585_linsysfs=	linsysfs
586_linux=		linux
587_nctgpio=	nctgpio
588_ndis=		ndis
589_pccard=	pccard
590.if ${MK_OFED} != "no" || defined(ALL_MODULES)
591_rdma=		rdma
592.endif
593_safe=		safe
594_scsi_low=	scsi_low
595_si=		si
596_speaker=	speaker
597_splash=	splash
598_sppp=		sppp
599_vmware=	vmware
600_vxge=  	vxge
601_wbwd=		wbwd
602_wi=		wi
603_xe=		xe
604.if ${MACHINE} != "pc98"
605_aac=		aac
606_aacraid=	aacraid
607_acpi=		acpi
608.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
609_aesni=		aesni
610.endif
611_amdsbwd=	amdsbwd
612_amdtemp=	amdtemp
613_arcmsr=	arcmsr
614_asmc=		asmc
615_bytgpio=	bytgpio
616_ciss=		ciss
617_chromebook_platform=	chromebook_platform
618_cmx=		cmx
619_coretemp=	coretemp
620.if ${MK_SOURCELESS_HOST} != "no"
621_hpt27xx=	hpt27xx
622.endif
623_hptiop=	hptiop
624.if ${MK_SOURCELESS_HOST} != "no"
625_hptmv=		hptmv
626_hptnr=		hptnr
627_hptrr=		hptrr
628.endif
629_hyperv=	hyperv
630_ichwd=		ichwd
631_ida=		ida
632_iir=		iir
633_intelspi=	intelspi
634_ipmi=		ipmi
635_ips=		ips
636_isci=		isci
637_ipw=		ipw
638_iwi=		iwi
639_iwm=		iwm
640_iwn=		iwn
641_ixgb=		ixgb
642.if ${MK_SOURCELESS_UCODE} != "no"
643_ipwfw=		ipwfw
644_iwifw=		iwifw
645_iwmfw=		iwmfw
646_iwnfw=		iwnfw
647.endif
648.if ${MK_OFED} != "no" || defined(ALL_MODULES)
649_mlx4=		mlx4
650_mlx4ib=	mlx4ib
651_mlxen=		mlxen
652.endif
653_mlx5=		mlx5
654.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
655	defined(ALL_MODULES)
656_mlx5en=	mlx5en
657.endif
658_mly=		mly
659.if ${MK_OFED} != "no" || defined(ALL_MODULES)
660_mthca=		mthca
661.endif
662_nfe=		nfe
663_nvd=		nvd
664_nvme=		nvme
665_nvram=		nvram
666_nxge=		nxge
667.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
668_padlock=	padlock
669_padlock_rng=	padlock_rng
670_rdrand_rng=	rdrand_rng
671.endif
672_s3=		s3
673_sdhci_acpi=	sdhci_acpi
674_tpm=		tpm
675_twa=		twa
676_vesa=		vesa
677_viawd=		viawd
678_virtio=	virtio
679_wpi=		wpi
680.if ${MK_SOURCELESS_UCODE} != "no"
681_wpifw=		wpifw
682.endif
683_x86bios=	x86bios
684.endif
685.endif
686
687.if ${MACHINE_CPUARCH} == "amd64"
688_efirt=		efirt
689_ioat=		ioat
690_ixl=		ixl
691_ixlv=		ixlv
692_linux64=	linux64
693_linux_common=	linux_common
694_ntb=		ntb
695_pms=		pms
696_qlxge=		qlxge
697_qlxgb=		qlxgb
698_qlxgbe=	qlxgbe
699_sfxge=		sfxge
700
701.if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
702_vmm=		vmm
703.endif
704.endif
705
706.if ${MACHINE_CPUARCH} == "i386"
707# XXX some of these can move to the general case when de-i386'ed
708# XXX some of these can move now, but are untested on other architectures.
709_3dfx=		3dfx
710_3dfx_linux=	3dfx_linux
711_aic=		aic
712_apm=		apm
713_arcnet=	arcnet
714.if ${MK_SOURCELESS_UCODE} != "no"
715_ce=		ce
716.endif
717_coff=		coff
718.if ${MK_SOURCELESS_UCODE} != "no"
719_cp=		cp
720.endif
721_elink=		elink
722_glxiic=	glxiic
723_glxsb=		glxsb
724#_ibcs2=		ibcs2
725_ie=		ie
726_mse=		mse
727_ncr=		ncr
728_ncv=		ncv
729_nsp=		nsp
730_pcfclock=	pcfclock
731_pst=		pst
732_sbni=		sbni
733_streams=	streams
734_stg=		stg
735_svr4=		svr4
736_wds=		wds
737.if ${MACHINE} == "i386"
738.if ${MK_EISA} != "no"
739_ahb=		ahb
740.endif
741_cm=		cm
742.if ${MK_SOURCELESS_UCODE} != "no"
743_ctau=		ctau
744.endif
745_dpt=		dpt
746_ex=		ex
747_wl=		wl
748.elif ${MACHINE} == "pc98"
749_canbepm=	canbepm
750_canbus=	canbus
751_ct=		ct
752_pmc=		pmc
753_snc=		snc
754.endif
755.endif
756
757.if ${MACHINE_CPUARCH} == "arm"
758_cfi=		cfi
759_cpsw=		cpsw
760.endif
761
762.if ${MACHINE_CPUARCH} == "powerpc"
763_agp=		agp
764_an=		an
765_bm=		bm
766_cardbus=	cardbus
767_cbb=		cbb
768_cfi=		cfi
769_cpufreq=	cpufreq
770_drm=		drm
771_exca=		exca
772_nvram=		powermac_nvram
773_pccard=	pccard
774_wi=		wi
775.endif
776
777.if ${MACHINE_ARCH} == "powerpc64"
778_drm2=		drm2
779.endif
780
781.if ${MACHINE_CPUARCH} == "sparc64"
782_auxio=		auxio
783_em=		em
784_epic=		epic
785_igb=		igb
786.endif
787
788.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
789     ${MACHINE_CPUARCH} == "i386")
790_cloudabi32=	cloudabi32
791.endif
792.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64"
793_cloudabi64=	cloudabi64
794.endif
795
796.endif
797
798SUBDIR+=${MODULES_EXTRA}
799
800.for reject in ${WITHOUT_MODULES}
801SUBDIR:= ${SUBDIR:N${reject}}
802.endfor
803
804# Calling kldxref(8) for each module is expensive.
805.if !defined(NO_XREF)
806.MAKEFLAGS+=	-DNO_XREF
807afterinstall: .PHONY
808	@if type kldxref >/dev/null 2>&1; then \
809		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
810		kldxref ${DESTDIR}${KMODDIR}; \
811	fi
812.endif
813
814.include "${SYSDIR}/conf/config.mk"
815
816SUBDIR:= ${SUBDIR:u:O}
817
818.include <bsd.subdir.mk>
819