Makefile.sparc.shared revision 0205780bc43902d17f94f07ceacb0cd8d5eab20f
199767f8919635c4928607450d9e0abb932109ceToomas Soome# CDDL HEADER START
199767f8919635c4928607450d9e0abb932109ceToomas Soome# The contents of this file are subject to the terms of the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Common Development and Distribution License (the "License").
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You may not use this file except in compliance with the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
199767f8919635c4928607450d9e0abb932109ceToomas Soome# See the License for the specific language governing permissions
199767f8919635c4928607450d9e0abb932109ceToomas Soome# and limitations under the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# When distributing Covered Code, include this CDDL HEADER in each
199767f8919635c4928607450d9e0abb932109ceToomas Soome# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# If applicable, add the following below this CDDL HEADER, with the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# fields enclosed by brackets "[]" replaced with your own identifying
199767f8919635c4928607450d9e0abb932109ceToomas Soome# information: Portions Copyright [yyyy] [name of copyright owner]
199767f8919635c4928607450d9e0abb932109ceToomas Soome# CDDL HEADER END
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Use is subject to license terms.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# ident "%Z%%M% %I% %E% SMI"
199767f8919635c4928607450d9e0abb932109ceToomas Soome# This makefile contains the common definitions for all sparc
199767f8919635c4928607450d9e0abb932109ceToomas Soome# implementation architecture independent modules.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Define supported builds
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEF_BUILDS = $(DEF_BUILDS64)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeALL_BUILDS = $(ALL_BUILDS64)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Everybody needs to know how to build modstubs.o and to locate unix.o.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Note that unix.o must currently be selected from among the possible
199767f8919635c4928607450d9e0abb932109ceToomas Soome# "implementation architectures". Note further, that unix.o is only
199767f8919635c4928607450d9e0abb932109ceToomas Soome# used as an optional error check for undefines so (theoretically)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# any "implementation architectures" could be used. We choose sun4u
199767f8919635c4928607450d9e0abb932109ceToomas Soome# because it is the reference port.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeUNIX_DIR = $(UTSBASE)/sun4u/unix
199767f8919635c4928607450d9e0abb932109ceToomas SoomeGENLIB_DIR = $(UTSBASE)/sun4u/genunix
199767f8919635c4928607450d9e0abb932109ceToomas SoomeIPDRV_DIR = $(UTSBASE)/sparc/ip
199767f8919635c4928607450d9e0abb932109ceToomas SoomeMODSTUBS_DIR = $(UNIX_DIR)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDSF_DIR = $(UNIX_DIR)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINTS_DIR = $(OBJS_DIR)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeUNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
199767f8919635c4928607450d9e0abb932109ceToomas SoomeMODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
199767f8919635c4928607450d9e0abb932109ceToomas SoomeGENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
199767f8919635c4928607450d9e0abb932109ceToomas SoomeGEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
199767f8919635c4928607450d9e0abb932109ceToomas SoomeGEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_LIB = $(LINT_LIB_$(CLASS))
199767f8919635c4928607450d9e0abb932109ceToomas SoomeGEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS))
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Include the makefiles which define build rule templates, the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# collection of files per module, and a few specific flags. Note
199767f8919635c4928607450d9e0abb932109ceToomas Soome# that order is significant, just as with an include path. The
199767f8919635c4928607450d9e0abb932109ceToomas Soome# first build rule template which matches the files name will be
199767f8919635c4928607450d9e0abb932109ceToomas Soome# used. By including these in order from most machine dependent
199767f8919635c4928607450d9e0abb932109ceToomas Soome# to most machine independent, we allow a machine dependent file
199767f8919635c4928607450d9e0abb932109ceToomas Soome# to be used in preference over a machine independent version
199767f8919635c4928607450d9e0abb932109ceToomas Soome# (Such as a machine specific optimization, which preserves the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# interfaces.)
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(UTSTREE)/sun/Makefile.files
199767f8919635c4928607450d9e0abb932109ceToomas Soome# ----- TRANSITIONAL SECTION --------------------------------------------------
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Not everything which *should* be a module is a module yet. The
199767f8919635c4928607450d9e0abb932109ceToomas Soome# following is a list of such objects which are currently part of
199767f8919635c4928607450d9e0abb932109ceToomas Soome# genunix but which might someday become kmods. This must be
199767f8919635c4928607450d9e0abb932109ceToomas Soome# defined before we include Makefile.uts, or else genunix's build
199767f8919635c4928607450d9e0abb932109ceToomas Soome# won't be as parallel as we might like.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeNOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# ----- END OF TRANSITIONAL SECTION -------------------------------------------
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Include machine independent rules. Note that this does not imply
199767f8919635c4928607450d9e0abb932109ceToomas Soome# that the resulting module from rules in Makefile.uts is machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome# independent. Only that the build rules are machine independent.
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(UTSBASE)/Makefile.uts
199767f8919635c4928607450d9e0abb932109ceToomas Soome# machine specific optimization, override default in Makefile.master
199767f8919635c4928607450d9e0abb932109ceToomas SoomeXARCH_32 = -xarch=v8
199767f8919635c4928607450d9e0abb932109ceToomas SoomeXARCH_64 = -xarch=v9
199767f8919635c4928607450d9e0abb932109ceToomas SoomeXARCH = $(XARCH_$(CLASS))
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOPTIMIZE_32 = -xO3
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOPTIMIZE_64 = -xO3
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOPTIMIZE = $(COPTIMIZE_$(CLASS))
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS_32 = -xcg92
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS = $(CFLAGS_$(CLASS))
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(XARCH)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(COPTIMIZE)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(EXTRA_CFLAGS)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(XAOPT)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(INLINES) -D_ASM_INLINES
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(CCMODE)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(SPACEFLAG)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(CERRWARN)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(CTF_FLAGS)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(C99MODE)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(CCUNBOUND)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(CCSTATICSYM)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(IROPTFLAG)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += $(CGLOBALSTATIC)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -xregs=no%float
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -xstrconst
199767f8919635c4928607450d9e0abb932109ceToomas SoomeASFLAGS += $(XARCH)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_DEFS_32 =
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_DEFS_64 = -Xarch=v9
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINT_DEFS += $(LINT_DEFS_$(CLASS))
199767f8919635c4928607450d9e0abb932109ceToomas Soome# The following must be defined for all implementations:
199767f8919635c4928607450d9e0abb932109ceToomas Soome# MODSTUBS: Module stubs source file.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeMODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Define the actual specific platforms - obviously none.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeMACHINE_DEFS =
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Debugging level
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Special knowledge of which special debugging options effect which
199767f8919635c4928607450d9e0abb932109ceToomas Soome# file is used to optimize the build if these flags are changed.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# XXX: The above could possibly be done for more flags and files, but
199767f8919635c4928607450d9e0abb932109ceToomas Soome# is left as an experiment to the interested reader. Be forewarned,
199767f8919635c4928607450d9e0abb932109ceToomas Soome# that excessive use could lead to maintenance difficulties.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_DEFS_OBJ32 =
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_DEFS_DBG32 = -DDEBUG
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_DEFS_OBJ64 =
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_DEFS_DBG64 = -DDEBUG
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_COND_OBJ32 :sh = echo \\043
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_COND_DBG32 =
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_COND_OBJ64 :sh = echo \\043
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDEBUG_COND_DBG64 =
199767f8919635c4928607450d9e0abb932109ceToomas SoomeIF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Comment these out if you don't want dispatcher lock statistics.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS
199767f8919635c4928607450d9e0abb932109ceToomas Soome# This rather strange collection of definitions ensures that lint sees
199767f8919635c4928607450d9e0abb932109ceToomas Soome# 'struct cpu' containing a fully declared embedded 'struct machcpu'
199767f8919635c4928607450d9e0abb932109ceToomas Soome# There's something deeply dissatisfying about this.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Collect the preprocessor definitions to be associated with *all*
199767f8919635c4928607450d9e0abb932109ceToomas SoomeALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome# The kernels modules which are "implementation architecture"
199767f8919635c4928607450d9e0abb932109ceToomas Soome# specific for this machine are enumerated below. Note that most
199767f8919635c4928607450d9e0abb932109ceToomas Soome# of these modules must exist (in one form or another) for each
199767f8919635c4928607450d9e0abb932109ceToomas Soome# architecture.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Common Drivers (usually pseudo drivers) (/kernel/drv):
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += aggr arp bl bofi clone cn conskbd consms cpuid
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += crypto cryptoadm devinfo dump
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += fssnap icmp icmp6 ip ip6 ipsecah
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += ipsecesp iwscn keysock kmdb kstat ksyms llc1
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += lofi
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += log logindmux kssl mm nca physmem pm poll pool
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += softmac sppp sppptun sy sysevent sysmsg
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += spdsock
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += ippctl sctp sctp6
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += dld
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += ipf
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += rpcib
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += vni vnic
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += xge
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += rds
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += chxge
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += smbsrv
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += vscan
199767f8919635c4928607450d9e0abb932109ceToomas SoomeDRV_KMODS += nsmb
# Machine Specific Driver Modules (/kernel/drv):
# Exec Class Modules (/kernel/exec):
# Scheduling Class Modules (/kernel/sched):
# File System Modules (/kernel/fs):
# Streams Modules (/kernel/strmod):
# 'System' Modules (/kernel/sys):
# 'User' Modules (/kernel/misc):
MISC_KMODS += pcicfg.e fcodem fcpci
# Software Cryptographic Providers (/kernel/crypto):
# IP Policy Modules (/kernel/ipp):
# 'Dacf' modules (/kernel/dacf)
# SVVS Testing Modules (/kernel/strmod):
# 'Dacf' Modules (/kernel/dacf):
# MAC-Type Plugin Modules (/kernel/mac)
# 'Devname' Modules (kernel/devname)
# kiconv modules (/kernel/kiconv):