Makefile.intel.shared revision 2712:f74a135872bc
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	+= vol
298DRV_KMODS	+= wc
299DRV_KMODS	+= winlock
300DRV_KMODS	+= xge
301DRV_KMODS	+= zcons
302
303#
304# Don't build some of these for OpenSolaris, since they will be
305# replaced by binaries that are signed by Sun Release Engineering.
306#
307$(CLOSED_BUILD)DRV_KMODS	+= dca
308
309$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= chxge
310$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= glm
311$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= llc2
312$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= mpt
313$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= marvell88sx 
314
315#
316# Common code drivers
317#
318
319DRV_KMODS	+= rge
320$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= ixgb
321
322#
323#	DTrace and DTrace Providers
324#
325DRV_KMODS	+= dtrace
326DRV_KMODS	+= fbt
327DRV_KMODS	+= lockstat
328DRV_KMODS	+= profile
329DRV_KMODS	+= sdt
330DRV_KMODS	+= systrace
331DRV_KMODS	+= fasttrap
332
333#
334#	I/O framework test drivers
335#
336DRV_KMODS	+= pshot
337DRV_KMODS	+= gen_drv
338DRV_KMODS	+= tvhci tphci tclient
339DRV_KMODS	+= emul64
340
341#
342#	Machine Specific Driver Modules (/kernel/drv):
343#
344DRV_KMODS	+= pci_pci
345DRV_KMODS	+= options
346$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= scsi_vhci
347
348#
349#	PCMCIA specific module(s)
350#
351DRV_KMODS	+= pcs
352DRV_KMODS	+= pcata pcmem pcram
353DRV_KMODS	+= pem
354MISC_KMODS	+= cardbus
355$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= pcelx
356$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= pcser
357
358#
359#	I2O specific module(s)
360#
361DRV_KMODS_32	+= pci_to_i2o i2o_bs i2o_scsi
362
363#
364#	SCSI Enclosure Services driver
365#
366DRV_KMODS	+= ses
367
368#
369#	USB specific modules
370#
371DRV_KMODS	+= hid
372DRV_KMODS	+= hubd
373DRV_KMODS	+= uhci
374DRV_KMODS	+= ehci
375DRV_KMODS	+= ohci
376DRV_KMODS	+= usb_mid
377DRV_KMODS	+= scsa2usb
378DRV_KMODS	+= usbprn
379DRV_KMODS	+= ugen
380DRV_KMODS	+= usbser
381DRV_KMODS	+= usbsksp
382DRV_KMODS	+= usbsprl
383DRV_KMODS	+= usb_ac
384DRV_KMODS	+= usb_as
385DRV_KMODS	+= usbskel
386
387$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= usbser_edge
388
389#
390#	1394 modules
391#
392MISC_KMODS	+= s1394 sbp2
393DRV_KMODS	+= hci1394 scsa1394
394DRV_KMODS	+= av1394
395DRV_KMODS	+= dcam1394
396
397#
398#	InfiniBand pseudo drivers
399#
400DRV_KMODS	+= ib ibd
401
402#
403#	LVM modules
404#
405DRV_KMODS	+= md
406MISC_KMODS	+= md_stripe md_hotspares md_mirror md_raid md_trans md_notify
407MISC_KMODS	+= md_sp
408
409#
410#	Brand modules
411#
412MISC_KMODS	+= sn1_brand lx_brand
413DRV_KMODS	+= lx_systrace lx_ptm lx_audio
414STRMOD_KMODS	+= ldlinux
415
416#
417#	Exec Class Modules (/kernel/exec):
418#
419EXEC_KMODS	+= elfexec intpexec javaexec
420
421#
422#	Scheduling Class Modules (/kernel/sched):
423#
424SCHED_KMODS	+= IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL
425
426#
427#	File System Modules (/kernel/fs):
428#
429FS_KMODS	+= autofs cachefs ctfs dev devfs fdfs fifofs hsfs lofs
430FS_KMODS	+= lx_afs lx_proc mntfs namefs nfs objfs zfs
431FS_KMODS	+= pcfs procfs sockfs specfs tmpfs udfs ufs xmemfs
432
433#
434#	Streams Modules (/kernel/strmod):
435#
436STRMOD_KMODS	+= 6to4tun atun bufmod connld dedump ldterm pckt pfmod pipemod
437STRMOD_KMODS	+= ptem redirmod rpcmod rlmod telmod timod
438STRMOD_KMODS	+= spppasyn spppcomp
439STRMOD_KMODS	+= tirdwr ttcompat tun
440STRMOD_KMODS	+= usbkbm
441STRMOD_KMODS	+= usbms
442STRMOD_KMODS	+= usb_ah
443STRMOD_KMODS	+= drcompat
444STRMOD_KMODS	+= nattymod
445STRMOD_KMODS	+= cryptmod
446
447#
448#	'System' Modules (/kernel/sys):
449#
450SYS_KMODS	+= c2audit
451SYS_KMODS	+= doorfs
452SYS_KMODS	+= exacctsys
453SYS_KMODS	+= inst_sync
454SYS_KMODS	+= kaio
455SYS_KMODS	+= msgsys
456SYS_KMODS	+= pipe
457SYS_KMODS	+= portfs
458SYS_KMODS	+= pset
459SYS_KMODS	+= semsys
460SYS_KMODS	+= shmsys
461SYS_KMODS	+= sysacct
462SYS_KMODS	+= acctctl
463
464#
465#	'Misc' Modules (/kernel/misc)
466#	MISC_KMODS are built both 32-bit and 64-bit
467#	MISC_KMODS_32 are built only 32-bit
468#	MISC_KMODS_64 are built only 64-bit
469#
470MISC_KMODS	+= amsrc2
471MISC_KMODS	+= audiosup
472MISC_KMODS	+= busra
473MISC_KMODS	+= cmlb
474MISC_KMODS	+= consconfig
475MISC_KMODS	+= ctf
476MISC_KMODS	+= dadk
477MISC_KMODS	+= diaudio
478MISC_KMODS	+= dls
479MISC_KMODS	+= fssnap_if
480MISC_KMODS	+= gda
481MISC_KMODS	+= gld
482MISC_KMODS	+= hidparser
483MISC_KMODS	+= hpcsvc
484MISC_KMODS_32	+= i2o_msg
485MISC_KMODS	+= ibcm
486MISC_KMODS	+= ibdm
487MISC_KMODS	+= ibmf
488MISC_KMODS	+= ibtl
489MISC_KMODS	+= ipc
490MISC_KMODS	+= kbtrans
491MISC_KMODS	+= kcf
492MISC_KMODS	+= kgssapi
493MISC_KMODS	+= kmech_dummy
494MISC_KMODS	+= kmech_krb5
495MISC_KMODS	+= krtld
496MISC_KMODS	+= mac
497MISC_KMODS	+= mixer
498MISC_KMODS	+= nfs_dlboot
499MISC_KMODS	+= nfssrv
500MISC_KMODS	+= pcicfg
501MISC_KMODS	+= pcihp
502MISC_KMODS	+= pcmcia
503MISC_KMODS	+= rpcsec
504MISC_KMODS	+= rpcsec_gss
505MISC_KMODS	+= rsmops
506MISC_KMODS	+= sata
507MISC_KMODS	+= scsi
508MISC_KMODS	+= strategy
509MISC_KMODS	+= strplumb
510MISC_KMODS	+= sysinit
511MISC_KMODS	+= tem
512MISC_KMODS	+= tlimod
513MISC_KMODS	+= usba usba10 usbs49_fw
514MISC_KMODS	+= zmod
515
516$(CLOSED_BUILD)CLOSED_MISC_KMODS	+= amsrc1
517$(CLOSED_BUILD)CLOSED_MISC_KMODS	+= klmmod klmops
518$(CLOSED_BUILD)CLOSED_MISC_KMODS	+= phx
519
520#
521#	Software Cryptographic Providers (/kernel/crypto):
522#
523# Don't build some of these for OpenSolaris, since they will be
524# replaced by binaries that are signed by Sun RE.
525#
526$(CLOSED_BUILD)CRYPTO_KMODS	+= aes
527$(CLOSED_BUILD)CRYPTO_KMODS	+= arcfour
528$(CLOSED_BUILD)CRYPTO_KMODS	+= blowfish
529$(CLOSED_BUILD)CRYPTO_KMODS	+= des
530CRYPTO_KMODS	+= md5
531CRYPTO_KMODS	+= rsa
532CRYPTO_KMODS	+= sha1
533CRYPTO_KMODS	+= sha2
534CRYPTO_KMODS	+= swrand
535
536#
537#	IP Policy Modules (/kernel/ipp)
538#
539IPP_KMODS	+= dlcosmk
540IPP_KMODS	+= flowacct
541IPP_KMODS	+= ipgpc
542IPP_KMODS	+= dscpmk
543IPP_KMODS	+= tokenmt
544IPP_KMODS	+= tswtclmt
545
546#
547#	'Dacf' modules (/kernel/dacf)
548#
549DACF_KMODS	+= consconfig_dacf
550
551#
552#	generic-unix module (/kernel/genunix):
553#
554GENUNIX_KMODS	+= genunix
555
556#
557#	SVVS Testing Modules (/kernel/strmod):
558#
559#	These are streams and driver modules which are not to be
560#	delivered with a released system. However, during development
561#	it is convenient to build and install the SVVS kernel modules.
562#
563SVVS_KMODS	+= lmodb lmode lmodr lmodt lo tidg tivc tmux
564
565SVVS		+= svvs
566
567#
568#	Modules eXcluded from the product:
569#
570$(CLOSED_BUILD)CLOSED_XMODS =		\
571	adpu320		\
572	daplt		\
573	e1000g		\
574	lsimega		\
575	nge		\
576	tavor
577
578
579#
580#	'Dacf' Modules (/kernel/dacf):
581#
582DACF_KMODS	+= usb_ac_dacf
583
584#
585#	Performance Counter BackEnd modules (/usr/kernel/pcbe)
586#
587PCBE_KMODS	+= p123_pcbe p4_pcbe opteron_pcbe
588
589#
590#	MAC-Type Plugin Modules (/kernel/mac)
591#
592MAC_KMODS	+= mac_ether
593
594#
595# 'Devname' Modules (kernel/devname)
596#
597DEVNAME_KMODS	+= sdev_nsconfig_mod
598