xref: /titanic_51/usr/src/uts/sparc/Makefile.sparc (revision 7c5a457e2a179dbaf12f243b90fdb520254e0c18)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23# Copyright (c) 2013 Andrew Stormont.  All rights reserved.
24# Copyright (c) 2015, Joyent, Inc. All rights reserved.
25# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
26
27
28#
29#	This makefile contains the common definitions for all sparc
30#	implementation architecture independent modules.
31#
32
33#
34#	Define supported builds
35#
36DEF_BUILDS	= $(DEF_BUILDS64)
37ALL_BUILDS	= $(ALL_BUILDS64)
38
39#
40#	Everybody needs to know how to build modstubs.o and to locate unix.o.
41#	Note that unix.o must currently be selected from among the possible
42#	"implementation architectures". Note further, that unix.o is only
43#	used as an optional error check for undefines so (theoretically)
44#	any "implementation architectures" could be used. We choose sun4u
45#	because it is the reference port.
46#
47UNIX_DIR	 = $(UTSBASE)/sun4u/unix
48GENLIB_DIR	 = $(UTSBASE)/sun4u/genunix
49IPDRV_DIR	 = $(UTSBASE)/sparc/ip
50MODSTUBS_DIR	 = $(UNIX_DIR)
51DSF_DIR		 = $(UNIX_DIR)
52LINTS_DIR	 = $(OBJS_DIR)
53LINT_LIB_DIR	 = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
54
55UNIX_O		 = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
56MODSTUBS_O	 = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
57GENLIB		 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so
58
59LINT_LIB_32	 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
60GEN_LINT_LIB_32	 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
61
62LINT_LIB_64	 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
63GEN_LINT_LIB_64	 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
64
65LINT_LIB	 = $(LINT_LIB_$(CLASS))
66GEN_LINT_LIB	 = $(GEN_LINT_LIB_$(CLASS))
67
68LINT32_DIRS	 = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
69LINT32_FILES	 = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln)
70
71LINT64_DIRS	 = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
72LINT64_FILES	 = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
73
74#
75#	Include the makefiles which define build rule templates, the
76#	collection of files per module, and a few specific flags. Note
77#	that order is significant, just as with an include path. The
78#	first build rule template which matches the files name will be
79#	used. By including these in order from most machine dependent
80#	to most machine independent, we allow a machine dependent file
81#	to be used in preference over a machine independent version
82#	(Such as a machine specific optimization, which preserves the
83#	interfaces.)
84#
85include $(UTSBASE)/sparc/Makefile.files
86include $(UTSBASE)/sparc/v9/Makefile.files
87include $(UTSBASE)/sun/Makefile.files
88include $(UTSBASE)/common/Makefile.files
89
90#
91# ----- TRANSITIONAL SECTION --------------------------------------------------
92#
93
94#
95#	Not everything which *should* be a module is a module yet. The
96#	following is a list of such objects which are currently part of
97#	genunix but which might someday become kmods.   This must be
98#	defined before we include Makefile.uts, or else genunix's build
99#	won't be as parallel as we might like.
100#
101NOT_YET_KMODS	 = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
102
103#
104# ----- END OF TRANSITIONAL SECTION -------------------------------------------
105#
106#	Include machine independent rules. Note that this does not imply
107#	that the resulting module from rules in Makefile.uts is	machine
108#	independent. Only that the build rules are machine independent.
109#
110include $(UTSBASE)/Makefile.uts
111
112#
113#	machine specific optimization, override default in Makefile.master
114#
115XARCH_32	= -xarch=v8
116XARCH_64	= -m64
117XARCH		= $(XARCH_$(CLASS))
118
119COPTIMIZE_32	= -xO3
120COPTIMIZE_64	= -xO3
121COPTIMIZE	= $(COPTIMIZE_$(CLASS))
122
123CCMODE		= -Xa
124
125CFLAGS_32	= -xcg92
126CFLAGS_64	= -xchip=ultra $(CCABS32) $(CCREGSYM)
127CFLAGS		= $(CFLAGS_$(CLASS))
128
129CFLAGS		+= $(XARCH)
130CFLAGS		+= $(COPTIMIZE)
131CFLAGS		+= $(EXTRA_CFLAGS)
132CFLAGS		+= $(XAOPT)
133CFLAGS		+= $(INLINES) -D_ASM_INLINES
134CFLAGS		+= $(CCMODE)
135CFLAGS		+= $(SPACEFLAG)
136CFLAGS		+= $(CERRWARN)
137CFLAGS		+= $(CTF_FLAGS_$(CLASS))
138CFLAGS		+= $(C99MODE)
139CFLAGS		+= $(CCUNBOUND)
140CFLAGS		+= $(CCSTATICSYM)
141CFLAGS		+= $(CC32BITCALLERS)
142CFLAGS		+= $(CCNOAUTOINLINE)
143CFLAGS		+= $(IROPTFLAG)
144CFLAGS		+= $(CGLOBALSTATIC)
145CFLAGS		+= -xregs=no%float
146CFLAGS		+= -xstrconst
147CFLAGS		+= $(CSOURCEDEBUGFLAGS)
148CFLAGS		+= $(CUSERFLAGS)
149
150ASFLAGS		+= $(XARCH)
151
152LINT_DEFS_32	=
153LINT_DEFS_64	= -m64
154LINT_DEFS	+= $(LINT_DEFS_$(CLASS))
155
156#
157#	The following must be defined for all implementations:
158#
159#	MODSTUBS:	Module stubs source file.
160#
161MODSTUBS	 = $(UTSBASE)/sparc/ml/modstubs.s
162
163#
164#	Define the actual specific platforms - obviously none.
165#
166MACHINE_DEFS	 =
167
168#
169#	Debugging level
170#
171#	Special knowledge of which special debugging options effect which
172#	file is used to optimize the build if these flags are changed.
173#
174#	XXX: The above could possibly be done for more flags and files, but
175#	     is left as an experiment to the interested reader. Be forewarned,
176#	     that excessive use could lead to maintenance difficulties.
177#
178DEBUG_DEFS_OBJ32	=
179DEBUG_DEFS_DBG32	= -DDEBUG
180DEBUG_DEFS_OBJ64	=
181DEBUG_DEFS_DBG64	= -DDEBUG
182DEBUG_DEFS		= $(DEBUG_DEFS_$(BUILD_TYPE))
183
184DEBUG_COND_OBJ32	= $(POUND_SIGN)
185DEBUG_COND_DBG32	=
186DEBUG_COND_OBJ64	= $(POUND_SIGN)
187DEBUG_COND_DBG64	=
188IF_DEBUG_OBJ		= $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
189
190$(IF_DEBUG_OBJ)syscall.o	:=	DEBUG_DEFS	+= -DSYSCALLTRACE
191$(IF_DEBUG_OBJ)clock.o		:=	DEBUG_DEFS	+= -DKSLICE=1
192
193# Comment these out if you don't want dispatcher lock statistics.
194
195# $(IF_DEBUG_OBJ)disp_lock.o	:= DEBUG_DEFS	+= -DDISP_LOCK_STATS
196
197#
198#	Collect the preprocessor definitions to be associated with *all*
199#	files.
200#
201ALL_DEFS	 = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS)
202#
203#
204#	The kernels modules which are "implementation architecture"
205#	specific for this machine are enumerated below. Note that most
206#	of these modules must exist (in one form or another) for each
207#	architecture.
208#
209#	Common Drivers (usually pseudo drivers) (/kernel/drv):
210#
211DRV_KMODS	+= aggr arp audio bl blkdev bofi clone cn conskbd consms cpuid
212DRV_KMODS	+= crypto cryptoadm devinfo dump
213DRV_KMODS	+= dtrace fasttrap fbt lockstat profile sdt systrace dcpc
214DRV_KMODS	+= fssnap icmp icmp6 ip ip6 ipnet ipsecah
215DRV_KMODS	+= ipsecesp iptun iwscn keysock kmdb kstat ksyms llc1
216DRV_KMODS	+= lofi
217DRV_KMODS	+= log logindmux kssl mm nca physmem pm poll pool
218DRV_KMODS	+= pseudo ptc ptm pts ptsl ramdisk random rsm rts sad
219DRV_KMODS	+= simnet softmac sppp sppptun sy sysevent sysmsg
220DRV_KMODS	+= spdsock
221DRV_KMODS	+= tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons
222DRV_KMODS	+= ippctl
223DRV_KMODS	+= dld
224DRV_KMODS	+= ipd
225DRV_KMODS	+= ipf
226DRV_KMODS	+= rpcib
227DRV_KMODS	+= dlpistub
228DRV_KMODS	+= vnic
229DRV_KMODS	+= xge
230DRV_KMODS	+= rds
231DRV_KMODS	+= rdsv3
232DRV_KMODS	+= chxge
233DRV_KMODS	+= smbsrv
234DRV_KMODS	+= vscan
235DRV_KMODS	+= nsmb
236DRV_KMODS	+= fm
237DRV_KMODS	+= nulldriver
238DRV_KMODS	+= bridge trill
239DRV_KMODS	+= bpf
240DRV_KMODS	+= dca
241DRV_KMODS	+= eventfd
242
243#
244#       Hardware Drivers in common space
245#
246
247DRV_KMODS	+= afe
248DRV_KMODS	+= audio1575
249DRV_KMODS	+= audioens
250DRV_KMODS	+= audiols
251DRV_KMODS	+= audiop16x
252DRV_KMODS	+= audiopci
253DRV_KMODS	+= audiots
254DRV_KMODS	+= bnxe
255DRV_KMODS	+= e1000g
256DRV_KMODS	+= efe
257DRV_KMODS	+= hxge
258DRV_KMODS	+= mxfe
259DRV_KMODS	+= rge
260DRV_KMODS	+= rtls
261DRV_KMODS	+= sfe
262DRV_KMODS	+= aac
263DRV_KMODS	+= igb
264DRV_KMODS	+= ixgbe
265DRV_KMODS	+= vr
266DRV_KMODS	+= mr_sas
267DRV_KMODS	+= yge
268
269#
270#	Machine Specific Driver Modules (/kernel/drv):
271#
272DRV_KMODS	+= audiocs
273DRV_KMODS	+= bge dmfe eri fas hme qfe
274DRV_KMODS	+= openeepr options sd ses st
275DRV_KMODS	+= ssd
276DRV_KMODS	+= ecpp
277DRV_KMODS	+= hid hubd ehci ohci uhci usb_mid usb_ia scsa2usb usbprn ugen
278DRV_KMODS	+= usbser usbsacm usbsksp usbsprl
279DRV_KMODS	+= usb_as usb_ac
280DRV_KMODS	+= usbskel
281DRV_KMODS	+= usbvc
282DRV_KMODS	+= usbftdi
283DRV_KMODS	+= usbecm
284DRV_KMODS	+= hci1394 av1394 scsa1394 dcam1394
285DRV_KMODS	+= sbp2
286DRV_KMODS	+= ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
287DRV_KMODS	+= sol_umad
288DRV_KMODS	+= pci_pci pcieb pcieb_bcm
289DRV_KMODS	+= i8042 kb8042 mouse8042
290DRV_KMODS	+= fcode
291DRV_KMODS	+= mpt_sas
292DRV_KMODS	+= socal
293DRV_KMODS	+= sgen
294DRV_KMODS	+= myri10ge
295DRV_KMODS	+= smp
296DRV_KMODS	+= dad
297DRV_KMODS	+= scsi_vhci
298DRV_KMODS	+= fcp
299DRV_KMODS	+= fcip
300DRV_KMODS	+= fcsm
301DRV_KMODS	+= fp
302DRV_KMODS	+= qlc
303DRV_KMODS	+= qlge
304DRV_KMODS	+= stmf
305DRV_KMODS	+= stmf_sbd
306DRV_KMODS	+= fct
307DRV_KMODS	+= fcoe
308DRV_KMODS	+= fcoet
309DRV_KMODS	+= fcoei
310DRV_KMODS	+= qlt
311DRV_KMODS	+= iscsit
312DRV_KMODS	+= pppt
313DRV_KMODS	+= ncall nsctl sdbc nskern sv
314DRV_KMODS	+= ii rdc rdcsrv rdcstub
315DRV_KMODS	+= iscsi
316DRV_KMODS	+= emlxs
317DRV_KMODS	+= oce
318DRV_KMODS	+= srpt
319DRV_KMODS	+= pmcs
320DRV_KMODS	+= pmcs8001fw
321
322#
323#	I/O framework test drivers
324#
325DRV_KMODS	+= pshot
326DRV_KMODS	+= gen_drv
327DRV_KMODS	+= tvhci tphci tclient
328DRV_KMODS	+= emul64
329
330#
331# PCMCIA specific module(s)
332#
333DRV_KMODS	+= pcs
334MISC_KMODS	+= busra cardbus dada pcmcia
335DRV_KMODS	+= pcic
336
337# Add lvm
338#
339DRV_KMODS       += md
340MISC_KMODS      += md_mirror md_stripe md_hotspares md_raid md_trans md_notify
341MISC_KMODS      += md_sp
342
343#
344#	Exec Class Modules (/kernel/exec):
345#
346EXEC_KMODS	+= aoutexec elfexec intpexec shbinexec javaexec
347
348#
349#	Scheduling Class Modules (/kernel/sched):
350#
351SCHED_KMODS	+= RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL SDC
352
353#
354#	File System Modules (/kernel/fs):
355#
356FS_KMODS	+= dev devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs
357FS_KMODS	+= zut specfs udfs ufs autofs procfs sockfs mntfs
358FS_KMODS	+= ctfs objfs sharefs dcfs smbfs
359
360#
361#	Streams Modules (/kernel/strmod):
362#
363STRMOD_KMODS	+= bufmod connld dedump ldterm ms pckt pfmod
364STRMOD_KMODS	+= pipemod ptem redirmod rpcmod rlmod telmod timod
365STRMOD_KMODS	+= spppasyn spppcomp
366STRMOD_KMODS	+= tirdwr ttcompat
367STRMOD_KMODS	+= usbkbm usbms usbwcm usb_ah
368STRMOD_KMODS	+= drcompat
369STRMOD_KMODS	+= cryptmod
370STRMOD_KMODS	+= vuid3ps2
371
372#
373#	'System' Modules (/kernel/sys):
374#
375SYS_KMODS	+= c2audit
376SYS_KMODS	+= exacctsys
377SYS_KMODS	+= inst_sync kaio msgsys semsys shmsys sysacct pipe
378SYS_KMODS	+= doorfs pset acctctl portfs
379
380#
381#	'User' Modules (/kernel/misc):
382#
383MISC_KMODS	+= ac97
384MISC_KMODS	+= bignum
385MISC_KMODS	+= consconfig gld ipc nfs_dlboot nfssrv scsi
386MISC_KMODS	+= strplumb swapgeneric tlimod
387MISC_KMODS	+= rpcsec rpcsec_gss kgssapi kmech_dummy
388MISC_KMODS	+= kmech_krb5
389MISC_KMODS	+= fssnap_if
390MISC_KMODS	+= hidparser kbtrans usba usba10 usbs49_fw
391MISC_KMODS	+= s1394
392MISC_KMODS	+= hpcsvc pcihp
393MISC_KMODS	+= rsmops
394MISC_KMODS	+= kcf
395MISC_KMODS	+= ksocket
396MISC_KMODS	+= ibcm
397MISC_KMODS	+= ibdm
398MISC_KMODS	+= ibdma
399MISC_KMODS	+= ibmf
400MISC_KMODS	+= ibtl
401MISC_KMODS	+= sol_ofs
402MISC_KMODS	+= idm
403MISC_KMODS	+= idmap
404MISC_KMODS	+= hook
405MISC_KMODS	+= neti
406MISC_KMODS	+= ctf
407MISC_KMODS	+= mac dls
408MISC_KMODS	+= cmlb
409MISC_KMODS	+= tem
410MISC_KMODS	+= pcicfg fcodem fcpci
411MISC_KMODS	+= scsi_vhci_f_sym scsi_vhci_f_tpgs scsi_vhci_f_asym_sun
412MISC_KMODS	+= scsi_vhci_f_sym_hds
413MISC_KMODS	+= scsi_vhci_f_tape scsi_vhci_f_tpgs_tape
414MISC_KMODS	+= fctl
415MISC_KMODS	+= emlxs_fw
416MISC_KMODS	+= qlc_fw_2200
417MISC_KMODS	+= qlc_fw_2300
418MISC_KMODS	+= qlc_fw_2400
419MISC_KMODS	+= qlc_fw_2500
420MISC_KMODS	+= qlc_fw_6322
421MISC_KMODS	+= qlc_fw_8100
422MISC_KMODS	+= spuni
423MISC_KMODS	+= mii
424
425MISC_KMODS	+= klmmod klmops
426
427#
428#	Software Cryptographic Providers (/kernel/crypto):
429#
430CRYPTO_KMODS	+= aes
431CRYPTO_KMODS	+= arcfour
432CRYPTO_KMODS	+= blowfish
433CRYPTO_KMODS	+= des
434CRYPTO_KMODS	+= ecc
435CRYPTO_KMODS	+= edonr
436CRYPTO_KMODS	+= md4
437CRYPTO_KMODS	+= md5
438CRYPTO_KMODS	+= rsa
439CRYPTO_KMODS	+= sha1
440CRYPTO_KMODS	+= sha2
441CRYPTO_KMODS	+= skein
442CRYPTO_KMODS	+= swrand
443
444#
445# IP Policy Modules (/kernel/ipp):
446#
447IPP_KMODS	+= dlcosmk
448IPP_KMODS	+= flowacct
449IPP_KMODS	+= ipgpc
450IPP_KMODS	+= dscpmk
451IPP_KMODS	+= tokenmt
452IPP_KMODS	+= tswtclmt
453
454#
455# 'Dacf' modules (/kernel/dacf)
456DACF_KMODS	+= consconfig_dacf
457
458#
459#	SVVS Testing Modules (/kernel/strmod):
460#
461#	These are streams and driver modules which are not to be
462#	delivered with a released system. However, during development
463#	it is convenient to build and install the SVVS kernel modules.
464#
465SVVS_KMODS	+= lmodb lmode lmodr lmodt svvslo tidg tivc tmux
466
467#
468#	Modules eXcluded from the product:
469#
470XMODS		+=
471
472#
473#	'Dacf' Modules (/kernel/dacf):
474#
475DACF_KMODS	+= net_dacf
476
477#
478#	MAC-Type Plugin Modules (/kernel/mac)
479#
480MAC_KMODS	+= mac_6to4
481MAC_KMODS	+= mac_ether
482MAC_KMODS	+= mac_ipv4
483MAC_KMODS	+= mac_ipv6
484MAC_KMODS	+= mac_wifi
485MAC_KMODS	+= mac_ib
486
487#
488# socketmod (kernel/socketmod)
489#
490SOCKET_KMODS	+= sockpfp
491SOCKET_KMODS	+= socksctp
492SOCKET_KMODS	+= socksdp
493SOCKET_KMODS	+= sockrds
494SOCKET_KMODS	+= ksslf
495
496#
497#	kiconv modules (/kernel/kiconv):
498#
499KICONV_KMODS	+= kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
500
501#
502# Ensure that the variable member of the cpu_t (cpu_m) is defined
503# for the lint builds so as not to cause lint errors during the
504# global cross check.
505#
506$(LINTFLAGSUPPRESS)LINTFLAGS	+= -D_MACHDEP -I$(UTSBASE)/sun4 \
507				   -I$(UTSBASE)/sun4u -I$(UTSBASE)/sfmmu
508