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