Makefile.intel.shared revision 2912:85ea316d9c18
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 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29#
30#	This makefile contains the common definitions for all intel
31#	implementation architecture independent modules.
32#
33
34#
35#	Machine type (implementation architecture):
36#
37PLATFORM	 = i86pc
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 i86pc
45#	because it is the reference port.
46#
47UNIX_DIR	 = $(UTSBASE)/i86pc/unix
48GENLIB_DIR	 = $(UTSBASE)/intel/genunix
49GENASSYM_DIR	 = $(UTSBASE)/intel/genassym
50IPDRV_DIR	 = $(UTSBASE)/intel/ip
51MODSTUBS_DIR	 = $(UNIX_DIR)
52DSF_DIR		 = $(UTSBASE)/$(PLATFORM)/genassym
53LINTS_DIR	 = $(OBJS_DIR)
54LINT_LIB_DIR	 = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
55
56UNIX_O		 = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
57GENLIB		 = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
58MODSTUBS_O	 = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
59LINT_LIB	 = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
60GEN_LINT_LIB	 = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
61
62#
63#	Include the makefiles which define build rule templates, the
64#	collection of files per module, and a few specific flags. Note
65#	that order is significant, just as with an include path. The
66#	first build rule template which matches the files name will be
67#	used. By including these in order from most machine dependent
68#	to most machine independent, we allow a machine dependent file
69#	to be used in preference over a machine independent version
70#	(Such as a machine specific optimization, which preserves the
71#	interfaces.)
72#
73include $(UTSTREE)/intel/Makefile.files
74include $(UTSTREE)/common/Makefile.files
75
76#
77# ----- TRANSITIONAL SECTION --------------------------------------------------
78#
79
80#
81#	Not everything which *should* be a module is a module yet. The
82#	following is a list of such objects which are currently part of
83#	genunix but which might someday become kmods.  This must be
84#	defined before we include Makefile.uts, or else genunix's build
85#	won't be as parallel as we might like.
86#
87NOT_YET_KMODS	 = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS)
88
89#
90# ----- END OF TRANSITIONAL SECTION -------------------------------------------
91#
92#	Include machine independent rules. Note that this does not imply
93#	that the resulting module from rules in Makefile.uts is	machine
94#	independent. Only that the build rules are machine independent.
95#
96include $(UTSBASE)/Makefile.uts
97
98#
99#	The following must be defined for all implementations:
100#
101MODSTUBS		= $(UTSBASE)/intel/ia32/ml/modstubs.s
102
103#
104#	Define supported builds
105#
106DEF_BUILDS		= $(DEF_BUILDS64) $(DEF_BUILDS32)
107ALL_BUILDS		= $(ALL_BUILDS64) $(ALL_BUILDS32)
108
109#
110#	x86 or amd64 inline templates
111#
112INLINES_32		= $(UTSBASE)/intel/ia32/ml/ia32.il
113INLINES_64		= $(UTSBASE)/intel/amd64/ml/amd64.il
114INLINES			+= $(INLINES_$(CLASS))
115
116#
117#	kernel-specific optimizations; override default in Makefile.master
118#
119
120CFLAGS_XARCH_32		= $(i386_CFLAGS)
121CFLAGS_XARCH_64		= $(amd64_CFLAGS)
122CFLAGS_XARCH		= $(CFLAGS_XARCH_$(CLASS))
123
124COPTFLAG_32		= $(COPTFLAG)
125COPTFLAG_64		= $(COPTFLAG64)
126COPTIMIZE		= $(COPTFLAG_$(CLASS))
127
128CFLAGS			= $(CFLAGS_XARCH)
129CFLAGS			+= $(COPTIMIZE)
130CFLAGS			+= $(INLINES) -D_ASM_INLINES
131CFLAGS			+= $(CCMODE)
132CFLAGS			+= $(SPACEFLAG)
133CFLAGS			+= $(CCUNBOUND)
134CFLAGS			+= $(CFLAGS_uts)
135
136ASFLAGS_XARCH_32	= $(i386_ASFLAGS)
137ASFLAGS_XARCH_64	= $(amd64_ASFLAGS)
138ASFLAGS_XARCH		= $(ASFLAGS_XARCH_$(CLASS))
139
140ASFLAGS			+= $(ASFLAGS_XARCH)
141AS_INC_PATH		+= -I$(GENASSYM_DIR)/$(OBJS_DIR)
142
143#
144#	Define the base directory for installation.
145#
146BASE_INS_DIR	= $(ROOT)
147
148#
149#
150# Simulator flag
151#
152i386_SIMULATOR		= -D_SIMULATOR_SUPPORT
153amd64_SIMULATOR		= -D_SIMULATOR_SUPPORT
154
155SIMULATOR		= $($(MACH)_SIMULATOR)
156
157
158#
159#	Debugging level
160#
161#	Special knowledge of which special debugging options affect which
162#	file is used to optimize the build if these flags are changed.
163#
164DEBUG_DEFS_OBJ32	=
165DEBUG_DEFS_DBG32	= -DDEBUG
166DEBUG_DEFS_DBG32	+= $(SIMULATOR)
167DEBUG_DEFS_OBJ64	=
168DEBUG_DEFS_DBG64	= -DDEBUG
169DEBUG_DEFS_DBG64	+= $(SIMULATOR)
170DEBUG_DEFS		= $(DEBUG_DEFS_$(BUILD_TYPE))
171
172DEBUG_COND_OBJ32	:sh = echo \\043
173DEBUG_COND_DBG32	=
174DEBUG_COND_OBJ64	:sh = echo \\043
175DEBUG_COND_DBG64	=
176IF_DEBUG_OBJ		= $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
177
178$(IF_DEBUG_OBJ)syscall.o	:=	DEBUG_DEFS	+= -DSYSCALLTRACE
179$(IF_DEBUG_OBJ)clock.o		:=	DEBUG_DEFS	+= -DKSLICE=1
180
181#
182# This rather strange collection of definitions ensures that lint sees
183# 'struct cpu' containing a fully declared embedded 'struct machcpu'
184#
185# There's something deeply dissatisfying about this.
186#
187LINTMACHFLAGS = -D_MACHDEP -I../../i86pc
188$(LINTS_DIR)/kcpc.ln	:=	LINTFLAGS += $(LINTMACHFLAGS)
189$(LINTS_DIR)/kdi.ln	:=	LINTFLAGS += $(LINTMACHFLAGS)
190$(LINTS_DIR)/msacct.ln	:=	LINTFLAGS += $(LINTMACHFLAGS)
191$(LINTS_DIR)/thread.ln	:=	LINTFLAGS += $(LINTMACHFLAGS)
192
193#
194#	Build `options'. These are entirely historical and the need for these
195#	is completely removed by the module technology.
196#
197OPTION_DEFS	 = -DC2_AUDIT
198
199#
200#	Collect the preprocessor definitions to be associated with *all*
201#	files.
202#
203ALL_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#	DRV_KMODS are built both 32-bit and 64-bit
213#	DRV_KMODS_32 are built only 32-bit
214#	DRV_KMODS_64 are built only 64-bit
215#
216DRV_KMODS	+= aac
217DRV_KMODS	+= aggr
218DRV_KMODS	+= amr
219DRV_KMODS	+= arp
220DRV_KMODS	+= asy
221DRV_KMODS	+= ath
222DRV_KMODS	+= bl 
223DRV_KMODS	+= bge
224DRV_KMODS	+= bofi
225DRV_KMODS	+= clone
226DRV_KMODS	+= cmdk
227DRV_KMODS	+= cn
228DRV_KMODS	+= conskbd
229DRV_KMODS	+= consms
230DRV_KMODS	+= cpuid
231DRV_KMODS	+= crypto
232DRV_KMODS	+= cryptoadm
233DRV_KMODS	+= devinfo
234DRV_KMODS	+= dld
235DRV_KMODS	+= dump
236DRV_KMODS	+= ecpp
237DRV_KMODS	+= fssnap
238DRV_KMODS	+= i8042
239DRV_KMODS	+= icmp
240DRV_KMODS	+= icmp6
241DRV_KMODS	+= ip
242DRV_KMODS	+= ip6
243DRV_KMODS	+= ipf
244DRV_KMODS	+= ippctl
245DRV_KMODS	+= ipsecah
246DRV_KMODS	+= ipsecesp
247DRV_KMODS	+= iwscn
248DRV_KMODS	+= keysock
249DRV_KMODS	+= kssl
250DRV_KMODS	+= kstat
251DRV_KMODS	+= ksyms
252DRV_KMODS	+= kmdb
253DRV_KMODS	+= llc1
254DRV_KMODS	+= lofi
255DRV_KMODS	+= log
256DRV_KMODS	+= logindmux
257DRV_KMODS	+= mm
258DRV_KMODS	+= mouse8042
259DRV_KMODS	+= nca
260DRV_KMODS	+= openeepr
261DRV_KMODS	+= pfil
262DRV_KMODS	+= pm
263DRV_KMODS	+= poll
264DRV_KMODS	+= pool
265DRV_KMODS	+= pseudo
266DRV_KMODS	+= ptc
267DRV_KMODS	+= ptm
268DRV_KMODS	+= pts
269DRV_KMODS	+= ptsl
270DRV_KMODS	+= ramdisk
271DRV_KMODS	+= random
272DRV_KMODS	+= rpcib
273DRV_KMODS	+= rsm
274DRV_KMODS	+= rts
275DRV_KMODS	+= sad
276DRV_KMODS	+= sctp
277DRV_KMODS	+= sctp6
278DRV_KMODS	+= sd
279DRV_KMODS	+= sgen
280DRV_KMODS	+= si3124
281DRV_KMODS	+= spdsock
282DRV_KMODS	+= smbios
283DRV_KMODS	+= sppp
284DRV_KMODS	+= sppptun
285DRV_KMODS	+= st
286DRV_KMODS	+= sy
287DRV_KMODS	+= sysevent
288DRV_KMODS	+= sysmsg
289DRV_KMODS	+= tcp
290DRV_KMODS	+= tcp6
291DRV_KMODS	+= tl
292DRV_KMODS	+= tnf
293DRV_KMODS	+= udp
294DRV_KMODS	+= udp6
295DRV_KMODS	+= vgatext
296DRV_KMODS	+= vni
297DRV_KMODS	+= wc
298DRV_KMODS	+= winlock
299DRV_KMODS	+= xge
300DRV_KMODS	+= zcons
301
302#
303# Don't build some of these for OpenSolaris, since they will be
304# replaced by binaries that are signed by Sun Release Engineering.
305#
306$(CLOSED_BUILD)DRV_KMODS	+= dca
307
308$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= chxge
309$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= glm
310$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= llc2
311$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= mpt
312$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= marvell88sx 
313
314#
315# Common code drivers
316#
317
318DRV_KMODS	+= rge
319$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= ixgb
320
321#
322#	DTrace and DTrace Providers
323#
324DRV_KMODS	+= dtrace
325DRV_KMODS	+= fbt
326DRV_KMODS	+= lockstat
327DRV_KMODS	+= profile
328DRV_KMODS	+= sdt
329DRV_KMODS	+= systrace
330DRV_KMODS	+= fasttrap
331
332#
333#	I/O framework test drivers
334#
335DRV_KMODS	+= pshot
336DRV_KMODS	+= gen_drv
337DRV_KMODS	+= tvhci tphci tclient
338DRV_KMODS	+= emul64
339
340#
341#	Machine Specific Driver Modules (/kernel/drv):
342#
343DRV_KMODS	+= options
344$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= scsi_vhci
345
346#
347#	PCMCIA specific module(s)
348#
349DRV_KMODS	+= pcs
350DRV_KMODS	+= pcata pcmem pcram
351DRV_KMODS	+= pem
352MISC_KMODS	+= cardbus
353$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= pcelx
354$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= pcser
355
356#
357#	I2O specific module(s)
358#
359DRV_KMODS_32	+= pci_to_i2o i2o_bs i2o_scsi
360
361#
362#	SCSI Enclosure Services driver
363#
364DRV_KMODS	+= ses
365
366#
367#	USB specific modules
368#
369DRV_KMODS	+= hid
370DRV_KMODS	+= hubd
371DRV_KMODS	+= uhci
372DRV_KMODS	+= ehci
373DRV_KMODS	+= ohci
374DRV_KMODS	+= usb_mid
375DRV_KMODS	+= scsa2usb
376DRV_KMODS	+= usbprn
377DRV_KMODS	+= ugen
378DRV_KMODS	+= usbser
379DRV_KMODS	+= usbsksp
380DRV_KMODS	+= usbsprl
381DRV_KMODS	+= usb_ac
382DRV_KMODS	+= usb_as
383DRV_KMODS	+= usbskel
384
385$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= usbser_edge
386
387#
388#	1394 modules
389#
390MISC_KMODS	+= s1394 sbp2
391DRV_KMODS	+= hci1394 scsa1394
392DRV_KMODS	+= av1394
393DRV_KMODS	+= dcam1394
394
395#
396#	InfiniBand pseudo drivers
397#
398DRV_KMODS	+= ib ibd
399
400#
401#	LVM modules
402#
403DRV_KMODS	+= md
404MISC_KMODS	+= md_stripe md_hotspares md_mirror md_raid md_trans md_notify
405MISC_KMODS	+= md_sp
406
407#
408#	Brand modules
409#
410MISC_KMODS	+= sn1_brand lx_brand
411DRV_KMODS	+= lx_systrace lx_ptm lx_audio
412STRMOD_KMODS	+= ldlinux
413
414#
415#	Exec Class Modules (/kernel/exec):
416#
417EXEC_KMODS	+= elfexec intpexec javaexec
418
419#
420#	Scheduling Class Modules (/kernel/sched):
421#
422SCHED_KMODS	+= IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL
423
424#
425#	File System Modules (/kernel/fs):
426#
427FS_KMODS	+= autofs cachefs ctfs dev devfs fdfs fifofs hsfs lofs
428FS_KMODS	+= lx_afs lx_proc mntfs namefs nfs objfs zfs
429FS_KMODS	+= pcfs procfs sockfs specfs tmpfs udfs ufs xmemfs
430
431#
432#	Streams Modules (/kernel/strmod):
433#
434STRMOD_KMODS	+= 6to4tun atun bufmod connld dedump ldterm pckt pfmod pipemod
435STRMOD_KMODS	+= ptem redirmod rpcmod rlmod telmod timod
436STRMOD_KMODS	+= spppasyn spppcomp
437STRMOD_KMODS	+= tirdwr ttcompat tun
438STRMOD_KMODS	+= usbkbm
439STRMOD_KMODS	+= usbms
440STRMOD_KMODS	+= usb_ah
441STRMOD_KMODS	+= drcompat
442STRMOD_KMODS	+= nattymod
443STRMOD_KMODS	+= cryptmod
444
445#
446#	'System' Modules (/kernel/sys):
447#
448SYS_KMODS	+= c2audit
449SYS_KMODS	+= doorfs
450SYS_KMODS	+= exacctsys
451SYS_KMODS	+= inst_sync
452SYS_KMODS	+= kaio
453SYS_KMODS	+= msgsys
454SYS_KMODS	+= pipe
455SYS_KMODS	+= portfs
456SYS_KMODS	+= pset
457SYS_KMODS	+= semsys
458SYS_KMODS	+= shmsys
459SYS_KMODS	+= sysacct
460SYS_KMODS	+= acctctl
461
462#
463#	'Misc' Modules (/kernel/misc)
464#	MISC_KMODS are built both 32-bit and 64-bit
465#	MISC_KMODS_32 are built only 32-bit
466#	MISC_KMODS_64 are built only 64-bit
467#
468MISC_KMODS	+= amsrc2
469MISC_KMODS	+= audiosup
470MISC_KMODS	+= busra
471MISC_KMODS	+= cmlb
472MISC_KMODS	+= consconfig
473MISC_KMODS	+= ctf
474MISC_KMODS	+= dadk
475MISC_KMODS	+= diaudio
476MISC_KMODS	+= dls
477MISC_KMODS	+= fssnap_if
478MISC_KMODS	+= gda
479MISC_KMODS	+= gld
480MISC_KMODS	+= hidparser
481MISC_KMODS	+= hpcsvc
482MISC_KMODS_32	+= i2o_msg
483MISC_KMODS	+= ibcm
484MISC_KMODS	+= ibdm
485MISC_KMODS	+= ibmf
486MISC_KMODS	+= ibtl
487MISC_KMODS	+= ipc
488MISC_KMODS	+= kbtrans
489MISC_KMODS	+= kcf
490MISC_KMODS	+= kgssapi
491MISC_KMODS	+= kmech_dummy
492MISC_KMODS	+= kmech_krb5
493MISC_KMODS	+= krtld
494MISC_KMODS	+= mac
495MISC_KMODS	+= mixer
496MISC_KMODS	+= nfs_dlboot
497MISC_KMODS	+= nfssrv
498MISC_KMODS	+= pcicfg
499MISC_KMODS	+= pcihp
500MISC_KMODS	+= pcmcia
501MISC_KMODS	+= rpcsec
502MISC_KMODS	+= rpcsec_gss
503MISC_KMODS	+= rsmops
504MISC_KMODS	+= sata
505MISC_KMODS	+= scsi
506MISC_KMODS	+= strategy
507MISC_KMODS	+= strplumb
508MISC_KMODS	+= sysinit
509MISC_KMODS	+= tem
510MISC_KMODS	+= tlimod
511MISC_KMODS	+= usba usba10 usbs49_fw
512MISC_KMODS	+= zmod
513
514$(CLOSED_BUILD)CLOSED_MISC_KMODS	+= amsrc1
515$(CLOSED_BUILD)CLOSED_MISC_KMODS	+= klmmod klmops
516$(CLOSED_BUILD)CLOSED_MISC_KMODS	+= phx
517
518#
519#	Software Cryptographic Providers (/kernel/crypto):
520#
521# Don't build some of these for OpenSolaris, since they will be
522# replaced by binaries that are signed by Sun RE.
523#
524$(CLOSED_BUILD)CRYPTO_KMODS	+= aes
525$(CLOSED_BUILD)CRYPTO_KMODS	+= arcfour
526$(CLOSED_BUILD)CRYPTO_KMODS	+= blowfish
527$(CLOSED_BUILD)CRYPTO_KMODS	+= des
528CRYPTO_KMODS	+= md5
529CRYPTO_KMODS	+= rsa
530CRYPTO_KMODS	+= sha1
531CRYPTO_KMODS	+= sha2
532CRYPTO_KMODS	+= swrand
533
534#
535#	IP Policy Modules (/kernel/ipp)
536#
537IPP_KMODS	+= dlcosmk
538IPP_KMODS	+= flowacct
539IPP_KMODS	+= ipgpc
540IPP_KMODS	+= dscpmk
541IPP_KMODS	+= tokenmt
542IPP_KMODS	+= tswtclmt
543
544#
545#	'Dacf' modules (/kernel/dacf)
546#
547DACF_KMODS	+= consconfig_dacf
548
549#
550#	generic-unix module (/kernel/genunix):
551#
552GENUNIX_KMODS	+= genunix
553
554#
555#	SVVS Testing Modules (/kernel/strmod):
556#
557#	These are streams and driver modules which are not to be
558#	delivered with a released system. However, during development
559#	it is convenient to build and install the SVVS kernel modules.
560#
561SVVS_KMODS	+= lmodb lmode lmodr lmodt lo tidg tivc tmux
562
563SVVS		+= svvs
564
565#
566#	Modules eXcluded from the product:
567#
568$(CLOSED_BUILD)CLOSED_XMODS =		\
569	adpu320		\
570	daplt		\
571	e1000g		\
572	lsimega		\
573	nge		\
574	tavor
575
576
577#
578#	'Dacf' Modules (/kernel/dacf):
579#
580DACF_KMODS	+= usb_ac_dacf
581
582#
583#	Performance Counter BackEnd modules (/usr/kernel/pcbe)
584#
585PCBE_KMODS	+= p123_pcbe p4_pcbe opteron_pcbe
586
587#
588#	MAC-Type Plugin Modules (/kernel/mac)
589#
590MAC_KMODS	+= mac_ether
591
592#
593# 'Devname' Modules (kernel/devname)
594#
595DEVNAME_KMODS	+= sdev_nsconfig_mod
596