3 # The contents of this file are subject to the terms of the
4 # Common Development and Distribution License (the "License").
5 # You may not use this file except in compliance with the License.
7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 # or http://www.opensolaris.org/os/licensing.
9 # See the License for the specific language governing permissions
10 # and limitations under the License.
12 # When distributing Covered Code, include this CDDL HEADER in each
13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 # If applicable, add the following below this CDDL HEADER, with the
15 # fields enclosed by brackets "[]" replaced with your own identifying
16 # information: Portions Copyright [yyyy] [name of copyright owner]
21 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
22 # Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved.
23 # Copyright (c) 2013 Andrew Stormont. All rights reserved.
26 # This makefile contains the common definitions for all intel
27 # implementation architecture independent modules.
31 # Machine type (implementation architecture):
36 # Everybody needs to know how to build modstubs.o and to locate unix.o.
37 # Note that unix.o must currently be selected from among the possible
38 # "implementation architectures". Note further, that unix.o is only
39 # used as an optional error check for undefines so (theoretically)
40 # any "implementation architectures" could be used. We choose i86pc
41 # because it is the reference port.
43 UNIX_DIR = $(UTSBASE)/i86pc/unix
44 GENLIB_DIR = $(UTSBASE)/intel/genunix
45 IPDRV_DIR = $(UTSBASE)/intel/ip
46 MODSTUBS_DIR = $(UNIX_DIR)
47 DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
48 LINTS_DIR = $(OBJS_DIR)
49 LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
51 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
52 GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
53 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
54 LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
55 GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
58 # Include the makefiles which define build rule templates, the
59 # collection of files per module, and a few specific flags. Note
60 # that order is significant, just as with an include path. The
61 # first build rule template which matches the files name will be
62 # used. By including these in order from most machine dependent
63 # to most machine independent, we allow a machine dependent file
64 # to be used in preference over a machine independent version
65 # (Such as a machine specific optimization, which preserves the
68 include $(UTSTREE)/intel/Makefile.files
69 include $(UTSTREE)/common/Makefile.files
72 # ----- TRANSITIONAL SECTION --------------------------------------------------
76 # Not everything which *should* be a module is a module yet. The
77 # following is a list of such objects which are currently part of
78 # genunix but which might someday become kmods. This must be
79 # defined before we include Makefile.uts, or else genunix's build
80 # won't be as parallel as we might like.
82 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
85 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
87 # Include machine independent rules. Note that this does not imply
88 # that the resulting module from rules in Makefile.uts is machine
89 # independent. Only that the build rules are machine independent.
91 include $(UTSBASE)/Makefile.uts
94 # The following must be defined for all implementations:
96 MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
99 # Define supported builds
101 DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
102 ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
105 # x86 or amd64 inline templates
107 INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
108 INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
109 INLINES += $(INLINES_$(CLASS))
112 # kernel-specific optimizations; override default in Makefile.master
115 CFLAGS_XARCH_32 = $(i386_CFLAGS)
116 CFLAGS_XARCH_64 = $(amd64_CFLAGS)
117 CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
119 COPTFLAG_32 = $(COPTFLAG)
120 COPTFLAG_64 = $(COPTFLAG64)
121 COPTIMIZE = $(COPTFLAG_$(CLASS))
123 CFLAGS = $(CFLAGS_XARCH)
124 CFLAGS += $(COPTIMIZE)
125 CFLAGS += $(INLINES) -D_ASM_INLINES
127 CFLAGS += $(SPACEFLAG)
128 CFLAGS += $(CCUNBOUND)
129 CFLAGS += $(CFLAGS_uts)
132 ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
133 ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
134 ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
136 ASFLAGS += $(ASFLAGS_XARCH)
139 # Define the base directory for installation.
141 BASE_INS_DIR = $(ROOT)
146 # Special knowledge of which special debugging options affect which
147 # file is used to optimize the build if these flags are changed.
150 DEBUG_DEFS_DBG32 = -DDEBUG
152 DEBUG_DEFS_DBG64 = -DDEBUG
153 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
155 DEBUG_COND_OBJ32 = $(POUND_SIGN)
157 DEBUG_COND_OBJ64 = $(POUND_SIGN)
159 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
161 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
162 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
165 # Collect the preprocessor definitions to be associated with *all*
168 ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
171 # The kernels modules which are "implementation architecture"
172 # specific for this machine are enumerated below. Note that most
173 # of these modules must exist (in one form or another) for each
176 # Common Drivers (usually pseudo drivers) (/kernel/drv)
177 # DRV_KMODS are built both 32-bit and 64-bit
178 # DRV_KMODS_32 are built only 32-bit
179 # DRV_KMODS_64 are built only 64-bit
184 DRV_KMODS += amd64_gart
188 DRV_KMODS += agptarget
196 DRV_KMODS += audio1575
197 DRV_KMODS += audio810
198 DRV_KMODS += audiocmi
199 DRV_KMODS += audiocmihd
200 DRV_KMODS += audioemu10k
201 DRV_KMODS += audioens
203 DRV_KMODS += audioixp
205 DRV_KMODS += audiop16x
206 DRV_KMODS += audiopci
207 DRV_KMODS += audiosolo
209 DRV_KMODS += audiovia823x
210 DRV_KMODS_32 += audiovia97
222 DRV_KMODS += myri10ge
232 DRV_KMODS += cryptoadm
236 DRV_KMODS += dlpistub
250 DRV_KMODS += intel_nb5000
251 DRV_KMODS += intel_nhm
259 DRV_KMODS += ipsecesp
275 DRV_KMODS += logindmux
276 DRV_KMODS += mega_sas
279 DRV_KMODS += mouse8042
285 DRV_KMODS += nulldriver
289 DRV_KMODS += openeepr
294 DRV_KMODS += pit_beep
333 DRV_KMODS += sysevent
360 DRV_KMODS += stmf_sbd
368 DRV_KMODS += ncall nsctl sdbc nskern sv
369 DRV_KMODS += ii rdc rdcsrv rdcstub
373 # Common code drivers
390 DRV_KMODS += amd8111s
404 # Virtio block driver
408 # DTrace and DTrace Providers
412 DRV_KMODS += lockstat
415 DRV_KMODS += systrace
416 DRV_KMODS += fasttrap
420 # I/O framework test drivers
424 DRV_KMODS += tvhci tphci tclient
428 # Machine Specific Driver Modules (/kernel/drv):
431 DRV_KMODS += scsi_vhci
433 DRV_KMODS += pmcs8001fw
443 # PCMCIA specific module(s)
446 MISC_KMODS += cardbus
449 # SCSI Enclosure Services driver
454 # USB specific modules
457 DRV_KMODS += hwarc hwahc
464 DRV_KMODS += scsa2usb
483 MISC_KMODS += s1394 sbp2
484 DRV_KMODS += hci1394 scsa1394
486 DRV_KMODS += dcam1394
489 # InfiniBand pseudo drivers
491 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
492 DRV_KMODS += sol_umad
498 MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify
504 BRAND_KMODS += sn1_brand s10_brand
507 # Exec Class Modules (/kernel/exec):
509 EXEC_KMODS += elfexec intpexec shbinexec javaexec
512 # Scheduling Class Modules (/kernel/sched):
514 SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL SDC
517 # File System Modules (/kernel/fs):
519 FS_KMODS += autofs cachefs ctfs dcfs dev devfs fdfs fifofs hsfs lofs
520 FS_KMODS += mntfs namefs nfs objfs zfs zut
521 FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs
525 # Streams Modules (/kernel/strmod):
527 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
528 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
529 STRMOD_KMODS += spppasyn spppcomp
530 STRMOD_KMODS += tirdwr ttcompat
531 STRMOD_KMODS += usbkbm
532 STRMOD_KMODS += usbms
533 STRMOD_KMODS += usbwcm
534 STRMOD_KMODS += usb_ah
535 STRMOD_KMODS += drcompat
536 STRMOD_KMODS += cryptmod
537 STRMOD_KMODS += vuid2ps2
538 STRMOD_KMODS += vuid3ps2
539 STRMOD_KMODS += vuidm3p
540 STRMOD_KMODS += vuidm4p
541 STRMOD_KMODS += vuidm5p
544 # 'System' Modules (/kernel/sys):
548 SYS_KMODS += exacctsys
549 SYS_KMODS += inst_sync
561 # 'Misc' Modules (/kernel/misc)
562 # MISC_KMODS are built both 32-bit and 64-bit
563 # MISC_KMODS_32 are built only 32-bit
564 # MISC_KMODS_64 are built only 64-bit
568 MISC_KMODS += agpmaster
570 MISC_KMODS += bootdev
573 MISC_KMODS += consconfig
579 MISC_KMODS += fssnap_if
582 MISC_KMODS += hidparser
592 MISC_KMODS += iommulib
594 MISC_KMODS += kbtrans
596 MISC_KMODS += kgssapi
597 MISC_KMODS += kmech_dummy
598 MISC_KMODS += kmech_krb5
599 MISC_KMODS += ksocket
603 MISC_KMODS += net80211
604 MISC_KMODS += nfs_dlboot
607 MISC_KMODS += pci_autoconfig
612 MISC_KMODS += rpcsec_gss
617 MISC_KMODS += sol_ofs
619 MISC_KMODS += strategy
620 MISC_KMODS += strplumb
623 MISC_KMODS += usba usba10 usbs49_fw
624 MISC_KMODS += scsi_vhci_f_sym_hds
625 MISC_KMODS += scsi_vhci_f_sym
626 MISC_KMODS += scsi_vhci_f_tpgs
627 MISC_KMODS += scsi_vhci_f_asym_sun
628 MISC_KMODS += scsi_vhci_f_tape
629 MISC_KMODS += scsi_vhci_f_tpgs_tape
631 MISC_KMODS += emlxs_fw
632 MISC_KMODS += qlc_fw_2200
633 MISC_KMODS += qlc_fw_2300
634 MISC_KMODS += qlc_fw_2400
635 MISC_KMODS += qlc_fw_2500
636 MISC_KMODS += qlc_fw_6322
637 MISC_KMODS += qlc_fw_8100
638 MISC_KMODS += hwa1480_fw
642 MISC_KMODS += klmmod klmops
645 # Software Cryptographic Providers (/kernel/crypto):
648 CRYPTO_KMODS += arcfour
649 CRYPTO_KMODS += blowfish
657 CRYPTO_KMODS += swrand
660 # IP Policy Modules (/kernel/ipp)
663 IPP_KMODS += flowacct
667 IPP_KMODS += tswtclmt
670 # generic-unix module (/kernel/genunix):
672 GENUNIX_KMODS += genunix
675 # Modules eXcluded from the product:
679 # 'Dacf' Modules (/kernel/dacf):
683 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
685 PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe core_pcbe
688 # MAC-Type Plugin Modules (/kernel/mac)
690 MAC_KMODS += mac_6to4
691 MAC_KMODS += mac_ether
692 MAC_KMODS += mac_ipv4
693 MAC_KMODS += mac_ipv6
694 MAC_KMODS += mac_wifi
698 # socketmod (kernel/socketmod)
700 SOCKET_KMODS += sockpfp
701 SOCKET_KMODS += socksctp
702 SOCKET_KMODS += socksdp
703 SOCKET_KMODS += sockrds
704 SOCKET_KMODS += ksslf
707 # kiconv modules (/kernel/kiconv):
709 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
712 # 'Dacf' Modules (/kernel/dacf):
714 DACF_KMODS += net_dacf