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