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