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.
25 # This makefile contains the common definitions for all intel
26 # implementation architecture independent modules.
30 # Machine type (implementation architecture):
35 # Everybody needs to know how to build modstubs.o and to locate unix.o.
36 # Note that unix.o must currently be selected from among the possible
37 # "implementation architectures". Note further, that unix.o is only
38 # used as an optional error check for undefines so (theoretically)
39 # any "implementation architectures" could be used. We choose i86pc
40 # because it is the reference port.
42 UNIX_DIR = $(UTSBASE)/i86pc/unix
43 GENLIB_DIR = $(UTSBASE)/intel/genunix
44 IPDRV_DIR = $(UTSBASE)/intel/ip
45 MODSTUBS_DIR = $(UNIX_DIR)
46 DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
47 LINTS_DIR = $(OBJS_DIR)
48 LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
50 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
51 GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
52 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
53 LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
54 GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
57 # Include the makefiles which define build rule templates, the
58 # collection of files per module, and a few specific flags. Note
59 # that order is significant, just as with an include path. The
60 # first build rule template which matches the files name will be
61 # used. By including these in order from most machine dependent
62 # to most machine independent, we allow a machine dependent file
63 # to be used in preference over a machine independent version
64 # (Such as a machine specific optimization, which preserves the
67 include $(UTSTREE)/intel/Makefile.files
68 include $(UTSTREE)/common/Makefile.files
71 # ----- TRANSITIONAL SECTION --------------------------------------------------
75 # Not everything which *should* be a module is a module yet. The
76 # following is a list of such objects which are currently part of
77 # genunix but which might someday become kmods. This must be
78 # defined before we include Makefile.uts, or else genunix's build
79 # won't be as parallel as we might like.
81 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
84 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
86 # Include machine independent rules. Note that this does not imply
87 # that the resulting module from rules in Makefile.uts is machine
88 # independent. Only that the build rules are machine independent.
90 include $(UTSBASE)/Makefile.uts
93 # The following must be defined for all implementations:
95 MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
98 # Define supported builds
100 DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
101 ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
104 # x86 or amd64 inline templates
106 INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
107 INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
108 INLINES += $(INLINES_$(CLASS))
111 # kernel-specific optimizations; override default in Makefile.master
114 CFLAGS_XARCH_32 = $(i386_CFLAGS)
115 CFLAGS_XARCH_64 = $(amd64_CFLAGS)
116 CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
118 COPTFLAG_32 = $(COPTFLAG)
119 COPTFLAG_64 = $(COPTFLAG64)
120 COPTIMIZE = $(COPTFLAG_$(CLASS))
122 CFLAGS = $(CFLAGS_XARCH)
123 CFLAGS += $(COPTIMIZE)
124 CFLAGS += $(INLINES) -D_ASM_INLINES
126 CFLAGS += $(SPACEFLAG)
127 CFLAGS += $(CCUNBOUND)
128 CFLAGS += $(CFLAGS_uts)
131 ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
132 ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
133 ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
135 ASFLAGS += $(ASFLAGS_XARCH)
138 # Define the base directory for installation.
140 BASE_INS_DIR = $(ROOT)
145 # Special knowledge of which special debugging options affect which
146 # file is used to optimize the build if these flags are changed.
149 DEBUG_DEFS_DBG32 = -DDEBUG
151 DEBUG_DEFS_DBG64 = -DDEBUG
152 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
154 DEBUG_COND_OBJ32 :sh = echo \\043
156 DEBUG_COND_OBJ64 :sh = echo \\043
158 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
160 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
161 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
164 # Collect the preprocessor definitions to be associated with *all*
167 ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
170 # The kernels modules which are "implementation architecture"
171 # specific for this machine are enumerated below. Note that most
172 # of these modules must exist (in one form or another) for each
175 # Common Drivers (usually pseudo drivers) (/kernel/drv)
176 # DRV_KMODS are built both 32-bit and 64-bit
177 # DRV_KMODS_32 are built only 32-bit
178 # DRV_KMODS_64 are built only 64-bit
183 DRV_KMODS += amd64_gart
187 DRV_KMODS += agptarget
195 DRV_KMODS += audio1575
196 DRV_KMODS += audio810
197 DRV_KMODS += audiocmi
198 DRV_KMODS += audiocmihd
199 DRV_KMODS += audioemu10k
200 DRV_KMODS += audioens
202 DRV_KMODS += audioixp
204 DRV_KMODS += audiop16x
205 DRV_KMODS += audiopci
206 DRV_KMODS += audiosolo
208 DRV_KMODS += audiovia823x
209 DRV_KMODS_32 += audiovia97
221 DRV_KMODS += myri10ge
230 DRV_KMODS += cryptoadm
234 DRV_KMODS += dlpistub
248 DRV_KMODS += intel_nb5000
249 DRV_KMODS += intel_nhm
256 DRV_KMODS += ipsecesp
272 DRV_KMODS += logindmux
273 DRV_KMODS += mega_sas
276 DRV_KMODS += mouse8042
282 DRV_KMODS += nulldriver
286 DRV_KMODS += openeepr
293 DRV_KMODS += pit_beep
332 DRV_KMODS += sysevent
359 DRV_KMODS += stmf_sbd
367 DRV_KMODS += ncall nsctl sdbc nskern sv
368 DRV_KMODS += ii rdc rdcsrv rdcstub
371 $(CLOSED_BUILD)CLOSED_DRV_KMODS += bmc
372 $(CLOSED_BUILD)CLOSED_DRV_KMODS += glm
373 $(CLOSED_BUILD)CLOSED_DRV_KMODS += intel_nhmex
374 $(CLOSED_BUILD)CLOSED_DRV_KMODS += cpqary3
375 $(CLOSED_BUILD)CLOSED_DRV_KMODS += marvell88sx
376 $(CLOSED_BUILD)CLOSED_DRV_KMODS += bcm_sata
377 $(CLOSED_BUILD)CLOSED_DRV_KMODS += memtest
378 $(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt
379 $(CLOSED_BUILD)CLOSED_DRV_KMODS += atiatom
380 $(CLOSED_BUILD)CLOSED_DRV_KMODS += acpi_toshiba
383 # Common code drivers
400 DRV_KMODS += amd8111s
406 $(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb
415 # Virtio block driver
419 # DTrace and DTrace Providers
423 DRV_KMODS += lockstat
426 DRV_KMODS += systrace
427 DRV_KMODS += fasttrap
431 # I/O framework test drivers
435 DRV_KMODS += tvhci tphci tclient
439 # Machine Specific Driver Modules (/kernel/drv):
442 DRV_KMODS += scsi_vhci
444 DRV_KMODS += pmcs8001fw
454 # PCMCIA specific module(s)
458 MISC_KMODS += cardbus
459 $(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser
462 # SCSI Enclosure Services driver
467 # USB specific modules
470 DRV_KMODS += hwarc hwahc
477 DRV_KMODS += scsa2usb
493 $(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge
498 MISC_KMODS += s1394 sbp2
499 DRV_KMODS += hci1394 scsa1394
501 DRV_KMODS += dcam1394
504 # InfiniBand pseudo drivers
506 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
507 DRV_KMODS += sol_umad
513 MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify
519 BRAND_KMODS += sn1_brand s10_brand
522 # Exec Class Modules (/kernel/exec):
524 EXEC_KMODS += elfexec intpexec shbinexec javaexec
527 # Scheduling Class Modules (/kernel/sched):
529 SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL SDC
532 # File System Modules (/kernel/fs):
534 FS_KMODS += autofs cachefs ctfs dcfs dev devfs fdfs fifofs hsfs lofs
535 FS_KMODS += mntfs namefs nfs objfs zfs zut
536 FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs
540 # Streams Modules (/kernel/strmod):
542 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
543 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
544 STRMOD_KMODS += spppasyn spppcomp
545 STRMOD_KMODS += tirdwr ttcompat
546 STRMOD_KMODS += usbkbm
547 STRMOD_KMODS += usbms
548 STRMOD_KMODS += usbwcm
549 STRMOD_KMODS += usb_ah
550 STRMOD_KMODS += drcompat
551 STRMOD_KMODS += cryptmod
552 STRMOD_KMODS += vuid2ps2
553 STRMOD_KMODS += vuid3ps2
554 STRMOD_KMODS += vuidm3p
555 STRMOD_KMODS += vuidm4p
556 STRMOD_KMODS += vuidm5p
559 # 'System' Modules (/kernel/sys):
563 SYS_KMODS += exacctsys
564 SYS_KMODS += inst_sync
576 # 'Misc' Modules (/kernel/misc)
577 # MISC_KMODS are built both 32-bit and 64-bit
578 # MISC_KMODS_32 are built only 32-bit
579 # MISC_KMODS_64 are built only 64-bit
583 MISC_KMODS += agpmaster
585 MISC_KMODS += bootdev
588 MISC_KMODS += consconfig
594 MISC_KMODS += fssnap_if
597 MISC_KMODS += hidparser
607 MISC_KMODS += iommulib
609 MISC_KMODS += kbtrans
611 MISC_KMODS += kgssapi
612 MISC_KMODS += kmech_dummy
613 MISC_KMODS += kmech_krb5
614 MISC_KMODS += ksocket
618 MISC_KMODS += net80211
619 MISC_KMODS += nfs_dlboot
622 MISC_KMODS += pci_autoconfig
627 MISC_KMODS += rpcsec_gss
632 MISC_KMODS += sol_ofs
634 MISC_KMODS += strategy
635 MISC_KMODS += strplumb
638 MISC_KMODS += usba usba10 usbs49_fw
639 MISC_KMODS += scsi_vhci_f_sym_hds
640 MISC_KMODS += scsi_vhci_f_sym
641 MISC_KMODS += scsi_vhci_f_tpgs
642 MISC_KMODS += scsi_vhci_f_asym_sun
643 MISC_KMODS += scsi_vhci_f_tape
644 MISC_KMODS += scsi_vhci_f_tpgs_tape
646 MISC_KMODS += emlxs_fw
647 MISC_KMODS += qlc_fw_2200
648 MISC_KMODS += qlc_fw_2300
649 MISC_KMODS += qlc_fw_2400
650 MISC_KMODS += qlc_fw_2500
651 MISC_KMODS += qlc_fw_6322
652 MISC_KMODS += qlc_fw_8100
653 MISC_KMODS += hwa1480_fw
657 MISC_KMODS += klmmod klmops
659 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_lsi
660 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_emc
661 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_sym_emc
664 # Software Cryptographic Providers (/kernel/crypto):
667 CRYPTO_KMODS += arcfour
668 CRYPTO_KMODS += blowfish
676 CRYPTO_KMODS += swrand
679 # IP Policy Modules (/kernel/ipp)
682 IPP_KMODS += flowacct
686 IPP_KMODS += tswtclmt
689 # generic-unix module (/kernel/genunix):
691 GENUNIX_KMODS += genunix
694 # SVVS Testing Modules (/kernel/strmod):
696 # These are streams and driver modules which are not to be
697 # delivered with a released system. However, during development
698 # it is convenient to build and install the SVVS kernel modules.
700 SVVS_KMODS += lmodb lmode lmodr lmodt svvslo tidg tivc tmux
702 $(CLOSED_BUILD)SVVS += svvs
705 # Modules eXcluded from the product:
707 $(CLOSED_BUILD)CLOSED_XMODS = \
716 # 'Dacf' Modules (/kernel/dacf):
720 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
722 PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe core_pcbe
725 # MAC-Type Plugin Modules (/kernel/mac)
727 MAC_KMODS += mac_6to4
728 MAC_KMODS += mac_ether
729 MAC_KMODS += mac_ipv4
730 MAC_KMODS += mac_ipv6
731 MAC_KMODS += mac_wifi
735 # socketmod (kernel/socketmod)
737 SOCKET_KMODS += sockpfp
738 SOCKET_KMODS += socksctp
739 SOCKET_KMODS += socksdp
740 SOCKET_KMODS += sockrds
741 SOCKET_KMODS += ksslf
744 # kiconv modules (/kernel/kiconv):
746 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
749 # 'Dacf' Modules (/kernel/dacf):
751 DACF_KMODS += net_dacf