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.
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.
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]
22 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
27 # This makefile contains the common definitions for all intel
28 # implementation architecture independent modules.
32 # Machine type (implementation architecture):
37 # Everybody needs to know how to build modstubs.o and to locate unix.o.
38 # Note that unix.o must currently be selected from among the possible
39 # "implementation architectures". Note further, that unix.o is only
40 # used as an optional error check for undefines so (theoretically)
41 # any "implementation architectures" could be used. We choose i86pc
42 # because it is the reference port.
44 UNIX_DIR = $(UTSBASE)/i86pc/unix
45 GENLIB_DIR = $(UTSBASE)/intel/genunix
46 IPDRV_DIR = $(UTSBASE)/intel/ip
47 MODSTUBS_DIR = $(UNIX_DIR)
48 DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
49 LINTS_DIR = $(OBJS_DIR)
50 LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
52 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
53 GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
54 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
55 LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
56 GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
59 # Include the makefiles which define build rule templates, the
60 # collection of files per module, and a few specific flags. Note
61 # that order is significant, just as with an include path. The
62 # first build rule template which matches the files name will be
63 # used. By including these in order from most machine dependent
64 # to most machine independent, we allow a machine dependent file
65 # to be used in preference over a machine independent version
66 # (Such as a machine specific optimization, which preserves the
69 include $(UTSTREE)/intel/Makefile.files
70 include $(UTSTREE)/common/Makefile.files
73 # ----- TRANSITIONAL SECTION --------------------------------------------------
77 # Not everything which *should* be a module is a module yet. The
78 # following is a list of such objects which are currently part of
79 # genunix but which might someday become kmods. This must be
80 # defined before we include Makefile.uts, or else genunix's build
81 # won't be as parallel as we might like.
83 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
86 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
88 # Include machine independent rules. Note that this does not imply
89 # that the resulting module from rules in Makefile.uts is machine
90 # independent. Only that the build rules are machine independent.
92 include $(UTSBASE)/Makefile.uts
95 # The following must be defined for all implementations:
97 MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
100 # Define supported builds
102 DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
103 ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
106 # x86 or amd64 inline templates
108 INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
109 INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
110 INLINES += $(INLINES_$(CLASS))
113 # kernel-specific optimizations; override default in Makefile.master
116 CFLAGS_XARCH_32 = $(i386_CFLAGS)
117 CFLAGS_XARCH_64 = $(amd64_CFLAGS)
118 CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
120 COPTFLAG_32 = $(COPTFLAG)
121 COPTFLAG_64 = $(COPTFLAG64)
122 COPTIMIZE = $(COPTFLAG_$(CLASS))
124 CFLAGS = $(CFLAGS_XARCH)
125 CFLAGS += $(COPTIMIZE)
126 CFLAGS += $(INLINES) -D_ASM_INLINES
128 CFLAGS += $(SPACEFLAG)
129 CFLAGS += $(CCUNBOUND)
130 CFLAGS += $(CFLAGS_uts)
133 ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
134 ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
135 ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
137 ASFLAGS += $(ASFLAGS_XARCH)
140 # Define the base directory for installation.
142 BASE_INS_DIR = $(ROOT)
147 # Special knowledge of which special debugging options affect which
148 # file is used to optimize the build if these flags are changed.
151 DEBUG_DEFS_DBG32 = -DDEBUG
153 DEBUG_DEFS_DBG64 = -DDEBUG
154 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
156 DEBUG_COND_OBJ32 :sh = echo \\043
158 DEBUG_COND_OBJ64 :sh = echo \\043
160 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
162 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
163 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
166 # Collect the preprocessor definitions to be associated with *all*
169 ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
172 # The kernels modules which are "implementation architecture"
173 # specific for this machine are enumerated below. Note that most
174 # of these modules must exist (in one form or another) for each
177 # Common Drivers (usually pseudo drivers) (/kernel/drv)
178 # DRV_KMODS are built both 32-bit and 64-bit
179 # DRV_KMODS_32 are built only 32-bit
180 # DRV_KMODS_64 are built only 64-bit
185 DRV_KMODS += amd64_gart
189 DRV_KMODS += agptarget
197 DRV_KMODS += audio1575
198 DRV_KMODS += audio810
199 DRV_KMODS += audiocmi
200 DRV_KMODS += audiocmihd
201 DRV_KMODS += audioemu10k
202 DRV_KMODS += audioens
204 DRV_KMODS += audioixp
206 DRV_KMODS += audiop16x
207 DRV_KMODS += audiopci
208 DRV_KMODS += audiosolo
210 DRV_KMODS += audiovia823x
211 DRV_KMODS_32 += audiovia97
222 DRV_KMODS += myri10ge
231 DRV_KMODS += cryptoadm
235 DRV_KMODS += dlpistub
249 DRV_KMODS += intel_nb5000
250 DRV_KMODS += intel_nhm
257 DRV_KMODS += ipsecesp
273 DRV_KMODS += logindmux
274 DRV_KMODS += mega_sas
277 DRV_KMODS += mouse8042
283 DRV_KMODS += nulldriver
287 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
372 $(CLOSED_BUILD)CLOSED_DRV_KMODS += bmc
373 $(CLOSED_BUILD)CLOSED_DRV_KMODS += glm
374 $(CLOSED_BUILD)CLOSED_DRV_KMODS += intel_nhmex
375 $(CLOSED_BUILD)CLOSED_DRV_KMODS += cpqary3
376 $(CLOSED_BUILD)CLOSED_DRV_KMODS += marvell88sx
377 $(CLOSED_BUILD)CLOSED_DRV_KMODS += bcm_sata
378 $(CLOSED_BUILD)CLOSED_DRV_KMODS += memtest
379 $(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt
380 $(CLOSED_BUILD)CLOSED_DRV_KMODS += pcn
381 $(CLOSED_BUILD)CLOSED_DRV_KMODS += atiatom
382 $(CLOSED_BUILD)CLOSED_DRV_KMODS += acpi_toshiba
385 # Common code drivers
401 DRV_KMODS += amd8111s
406 $(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb
409 # DTrace and DTrace Providers
413 DRV_KMODS += lockstat
416 DRV_KMODS += systrace
417 DRV_KMODS += fasttrap
421 # I/O framework test drivers
425 DRV_KMODS += tvhci tphci tclient
429 # Machine Specific Driver Modules (/kernel/drv):
432 DRV_KMODS += scsi_vhci
434 DRV_KMODS += pmcs8001fw
444 # PCMCIA specific module(s)
448 MISC_KMODS += cardbus
449 $(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser
452 # SCSI Enclosure Services driver
457 # USB specific modules
460 DRV_KMODS += hwarc hwahc
467 DRV_KMODS += scsa2usb
483 $(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge
488 MISC_KMODS += s1394 sbp2
489 DRV_KMODS += hci1394 scsa1394
491 DRV_KMODS += dcam1394
494 # InfiniBand pseudo drivers
496 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
497 DRV_KMODS += sol_umad
503 MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify
509 BRAND_KMODS += sn1_brand s10_brand
512 # Exec Class Modules (/kernel/exec):
514 EXEC_KMODS += elfexec intpexec shbinexec javaexec
517 # Scheduling Class Modules (/kernel/sched):
519 SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL SDC
522 # File System Modules (/kernel/fs):
524 FS_KMODS += autofs cachefs ctfs dcfs dev devfs fdfs fifofs hsfs lofs
525 FS_KMODS += mntfs namefs nfs objfs zfs zut
526 FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs
530 # Streams Modules (/kernel/strmod):
532 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
533 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
534 STRMOD_KMODS += spppasyn spppcomp
535 STRMOD_KMODS += tirdwr ttcompat
536 STRMOD_KMODS += usbkbm
537 STRMOD_KMODS += usbms
538 STRMOD_KMODS += usbwcm
539 STRMOD_KMODS += usb_ah
540 STRMOD_KMODS += drcompat
541 STRMOD_KMODS += cryptmod
542 STRMOD_KMODS += vuid2ps2
543 STRMOD_KMODS += vuid3ps2
544 STRMOD_KMODS += vuidm3p
545 STRMOD_KMODS += vuidm4p
546 STRMOD_KMODS += vuidm5p
549 # 'System' Modules (/kernel/sys):
553 SYS_KMODS += exacctsys
554 SYS_KMODS += inst_sync
566 # 'Misc' Modules (/kernel/misc)
567 # MISC_KMODS are built both 32-bit and 64-bit
568 # MISC_KMODS_32 are built only 32-bit
569 # MISC_KMODS_64 are built only 64-bit
573 MISC_KMODS += agpmaster
575 MISC_KMODS += bootdev
578 MISC_KMODS += consconfig
584 MISC_KMODS += fssnap_if
587 MISC_KMODS += hidparser
597 MISC_KMODS += iommulib
599 MISC_KMODS += kbtrans
601 MISC_KMODS += kgssapi
602 MISC_KMODS += kmech_dummy
603 MISC_KMODS += kmech_krb5
604 MISC_KMODS += ksocket
608 MISC_KMODS += net80211
609 MISC_KMODS += nfs_dlboot
612 MISC_KMODS += pci_autoconfig
617 MISC_KMODS += rpcsec_gss
622 MISC_KMODS += sol_ofs
624 MISC_KMODS += strategy
625 MISC_KMODS += strplumb
628 MISC_KMODS += usba usba10 usbs49_fw
629 MISC_KMODS += scsi_vhci_f_sym_hds
630 MISC_KMODS += scsi_vhci_f_sym
631 MISC_KMODS += scsi_vhci_f_tpgs
632 MISC_KMODS += scsi_vhci_f_asym_sun
633 MISC_KMODS += scsi_vhci_f_tape
634 MISC_KMODS += scsi_vhci_f_tpgs_tape
636 MISC_KMODS += emlxs_fw
637 MISC_KMODS += qlc_fw_2200
638 MISC_KMODS += qlc_fw_2300
639 MISC_KMODS += qlc_fw_2400
640 MISC_KMODS += qlc_fw_2500
641 MISC_KMODS += qlc_fw_6322
642 MISC_KMODS += qlc_fw_8100
643 MISC_KMODS += hwa1480_fw
647 $(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops
648 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_lsi
649 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_emc
650 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_sym_emc
653 # Software Cryptographic Providers (/kernel/crypto):
656 CRYPTO_KMODS += arcfour
657 CRYPTO_KMODS += blowfish
665 CRYPTO_KMODS += swrand
668 # IP Policy Modules (/kernel/ipp)
671 IPP_KMODS += flowacct
675 IPP_KMODS += tswtclmt
678 # generic-unix module (/kernel/genunix):
680 GENUNIX_KMODS += genunix
683 # SVVS Testing Modules (/kernel/strmod):
685 # These are streams and driver modules which are not to be
686 # delivered with a released system. However, during development
687 # it is convenient to build and install the SVVS kernel modules.
689 SVVS_KMODS += lmodb lmode lmodr lmodt svvslo tidg tivc tmux
691 $(CLOSED_BUILD)SVVS += svvs
694 # Modules eXcluded from the product:
696 $(CLOSED_BUILD)CLOSED_XMODS = \
705 # 'Dacf' Modules (/kernel/dacf):
709 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
711 PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe core_pcbe
714 # MAC-Type Plugin Modules (/kernel/mac)
716 MAC_KMODS += mac_6to4
717 MAC_KMODS += mac_ether
718 MAC_KMODS += mac_ipv4
719 MAC_KMODS += mac_ipv6
720 MAC_KMODS += mac_wifi
724 # socketmod (kernel/socketmod)
726 SOCKET_KMODS += sockpfp
727 SOCKET_KMODS += socksctp
728 SOCKET_KMODS += socksdp
729 SOCKET_KMODS += sockrds
730 SOCKET_KMODS += ksslf
733 # kiconv modules (/kernel/kiconv):
735 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
738 # 'Dacf' Modules (/kernel/dacf):
740 DACF_KMODS += net_dacf