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