1*2063d9c0SJosef 'Jeff' Sipek# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*2063d9c0SJosef 'Jeff' Sipek# Common Development and Distribution License (the "License"). 6*2063d9c0SJosef 'Jeff' Sipek# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 21*2063d9c0SJosef 'Jeff' Sipek 22*2063d9c0SJosef 'Jeff' Sipek# 23*2063d9c0SJosef 'Jeff' Sipek# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*2063d9c0SJosef 'Jeff' Sipek# Copyright (c) 2013 Andrew Stormont. All rights reserved. 267c478bd9Sstevel@tonic-gate# 27*2063d9c0SJosef 'Jeff' Sipek# This makefile contains the common definitions for the sun4u unix 28*2063d9c0SJosef 'Jeff' Sipek# and all sun4u implementation architecture dependent modules. 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gate 31*2063d9c0SJosef 'Jeff' Sipek# 32*2063d9c0SJosef 'Jeff' Sipek# Machine type (implementation architecture): 33*2063d9c0SJosef 'Jeff' Sipek# 34*2063d9c0SJosef 'Jeff' SipekPLATFORM = sun4u 35*2063d9c0SJosef 'Jeff' SipekPROMIF = ieee1275 36*2063d9c0SJosef 'Jeff' SipekPSMBASE = $(UTSBASE)/../psm 377c478bd9Sstevel@tonic-gate 38*2063d9c0SJosef 'Jeff' Sipek# 39*2063d9c0SJosef 'Jeff' Sipek# uname -m value 40*2063d9c0SJosef 'Jeff' Sipek# 41*2063d9c0SJosef 'Jeff' SipekUNAME_M = $(PLATFORM) 42*2063d9c0SJosef 'Jeff' Sipek 43*2063d9c0SJosef 'Jeff' Sipek# 44*2063d9c0SJosef 'Jeff' Sipek# Definitions for the platform-specific /platform directories. 45*2063d9c0SJosef 'Jeff' Sipek# 46*2063d9c0SJosef 'Jeff' Sipek# PLATFORMS designates those sun4u machines which have no platform 47*2063d9c0SJosef 'Jeff' Sipek# specific code. 48*2063d9c0SJosef 'Jeff' Sipek# 49*2063d9c0SJosef 'Jeff' Sipek# IMPLEMENTATIONS is used to designate sun4u machines which do have 50*2063d9c0SJosef 'Jeff' Sipek# platform specific modules (perhaps including their own unix). All 51*2063d9c0SJosef 'Jeff' Sipek# code specific to a given implementation resides in the appropriately 52*2063d9c0SJosef 'Jeff' Sipek# named subdirectory. This requires these platforms to have their 53*2063d9c0SJosef 'Jeff' Sipek# own Makefiles to define ROOT_PLAT_DIRS, USR_PLAT_DIRS, etc. 54*2063d9c0SJosef 'Jeff' Sipek# 55*2063d9c0SJosef 'Jeff' Sipek# So if we had an implementation named 'foo', we would need the following 56*2063d9c0SJosef 'Jeff' Sipek# Makefiles in the foo subdirectory: 57*2063d9c0SJosef 'Jeff' Sipek# 58*2063d9c0SJosef 'Jeff' Sipek# sun4u/foo/Makefile 59*2063d9c0SJosef 'Jeff' Sipek# sun4u/foo/Makefile.foo 60*2063d9c0SJosef 'Jeff' Sipek# sun4u/foo/Makefile.targ 61*2063d9c0SJosef 'Jeff' Sipek# 62*2063d9c0SJosef 'Jeff' Sipek 63*2063d9c0SJosef 'Jeff' Sipek# 64*2063d9c0SJosef 'Jeff' Sipek# /usr/platform/$(IMPLEMENTED_PLATFORM) is created as a directory that 65*2063d9c0SJosef 'Jeff' Sipek# all the $(LINKED_PLATFORMS) link to. 66*2063d9c0SJosef 'Jeff' Sipek# 67*2063d9c0SJosef 'Jeff' SipekIMPLEMENTED_PLATFORM = SUNW,Ultra-2 68*2063d9c0SJosef 'Jeff' Sipek 69*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Ultra-30 70*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Ultra-60 71*2063d9c0SJosef 'Jeff' Sipek 72*2063d9c0SJosef 'Jeff' Sipek# 73*2063d9c0SJosef 'Jeff' Sipek# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list 74*2063d9c0SJosef 'Jeff' Sipek# ie. all desktop platforms 75*2063d9c0SJosef 'Jeff' Sipek# 76*2063d9c0SJosef 'Jeff' SipekPLATFORMS = $(IMPLEMENTED_PLATFORM) 77*2063d9c0SJosef 'Jeff' SipekPLATFORMS += $(LINKED_PLATFORMS) 78*2063d9c0SJosef 'Jeff' Sipek 79*2063d9c0SJosef 'Jeff' SipekROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%) 80*2063d9c0SJosef 'Jeff' SipekUSR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%) 81*2063d9c0SJosef 'Jeff' Sipek 82*2063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM) 83*2063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include 84*2063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin 85*2063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib 86*2063d9c0SJosef 'Jeff' Sipek 87*2063d9c0SJosef 'Jeff' Sipek# 88*2063d9c0SJosef 'Jeff' Sipek# Welcome to SPARC V9. 89*2063d9c0SJosef 'Jeff' Sipek# 90*2063d9c0SJosef 'Jeff' Sipek 91*2063d9c0SJosef 'Jeff' Sipek# 92*2063d9c0SJosef 'Jeff' Sipek# Define supported builds 93*2063d9c0SJosef 'Jeff' Sipek# 94*2063d9c0SJosef 'Jeff' SipekDEF_BUILDS = $(DEF_BUILDS64) 95*2063d9c0SJosef 'Jeff' SipekALL_BUILDS = $(ALL_BUILDS64) 96*2063d9c0SJosef 'Jeff' Sipek 97*2063d9c0SJosef 'Jeff' Sipek# 98*2063d9c0SJosef 'Jeff' Sipek# Everybody needs to know how to build modstubs.o and to locate unix.o 99*2063d9c0SJosef 'Jeff' Sipek# 100*2063d9c0SJosef 'Jeff' SipekUNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix 101*2063d9c0SJosef 'Jeff' SipekGENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix 102*2063d9c0SJosef 'Jeff' SipekMODSTUBS_DIR = $(UNIX_DIR) 103*2063d9c0SJosef 'Jeff' SipekDSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym 104*2063d9c0SJosef 'Jeff' SipekLINTS_DIR = $(OBJS_DIR) 105*2063d9c0SJosef 'Jeff' SipekLINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR) 106*2063d9c0SJosef 'Jeff' Sipek 107*2063d9c0SJosef 'Jeff' SipekDTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o 108*2063d9c0SJosef 'Jeff' SipekDTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so 109*2063d9c0SJosef 'Jeff' Sipek 110*2063d9c0SJosef 'Jeff' SipekUNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 111*2063d9c0SJosef 'Jeff' SipekMODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 112*2063d9c0SJosef 'Jeff' SipekGENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so 113*2063d9c0SJosef 'Jeff' Sipek 114*2063d9c0SJosef 'Jeff' SipekLINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln 115*2063d9c0SJosef 'Jeff' SipekGEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln 116*2063d9c0SJosef 'Jeff' Sipek 117*2063d9c0SJosef 'Jeff' SipekLINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%) 118*2063d9c0SJosef 'Jeff' SipekLINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) 119*2063d9c0SJosef 'Jeff' Sipek 120*2063d9c0SJosef 'Jeff' Sipek# 121*2063d9c0SJosef 'Jeff' Sipek# cpu and platform modules need to know how to build their own symcheck module 122*2063d9c0SJosef 'Jeff' Sipek# 123*2063d9c0SJosef 'Jeff' SipekPLATMOD = platmod 124*2063d9c0SJosef 'Jeff' SipekPLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so 125*2063d9c0SJosef 'Jeff' Sipek 126*2063d9c0SJosef 'Jeff' SipekCPUNAME = cpu 127*2063d9c0SJosef 'Jeff' SipekCPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so 128*2063d9c0SJosef 'Jeff' Sipek 129*2063d9c0SJosef 'Jeff' SipekSYM_MOD = $(OBJS_DIR)/unix.sym 130*2063d9c0SJosef 'Jeff' Sipek 131*2063d9c0SJosef 'Jeff' Sipek# 132*2063d9c0SJosef 'Jeff' Sipek# Include the makefiles which define build rule templates, the 133*2063d9c0SJosef 'Jeff' Sipek# collection of files per module, and a few specific flags. Note 134*2063d9c0SJosef 'Jeff' Sipek# that order is significant, just as with an include path. The 135*2063d9c0SJosef 'Jeff' Sipek# first build rule template which matches the files name will be 136*2063d9c0SJosef 'Jeff' Sipek# used. By including these in order from most machine dependent 137*2063d9c0SJosef 'Jeff' Sipek# to most machine independent, we allow a machine dependent file 138*2063d9c0SJosef 'Jeff' Sipek# to be used in preference over a machine independent version 139*2063d9c0SJosef 'Jeff' Sipek# (Such as a machine specific optimization, which preserves the 140*2063d9c0SJosef 'Jeff' Sipek# interfaces.) 141*2063d9c0SJosef 'Jeff' Sipek# 142*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sun4/Makefile.files 143*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/$(PLATFORM)/Makefile.files 144*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sfmmu/Makefile.files 145*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sparc/v9/Makefile.files 146*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sparc/Makefile.files 147*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sun/Makefile.files 148*2063d9c0SJosef 'Jeff' Sipekinclude $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files 149*2063d9c0SJosef 'Jeff' Sipekinclude $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files 150*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/common/Makefile.files 151*2063d9c0SJosef 'Jeff' Sipek 152*2063d9c0SJosef 'Jeff' Sipek# 153*2063d9c0SJosef 'Jeff' Sipek# Include machine independent rules. Note that this does not imply 154*2063d9c0SJosef 'Jeff' Sipek# that the resulting module from rules in Makefile.uts is machine 155*2063d9c0SJosef 'Jeff' Sipek# independent. Only that the build rules are machine independent. 156*2063d9c0SJosef 'Jeff' Sipek# 157*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/Makefile.uts 158*2063d9c0SJosef 'Jeff' Sipek 159*2063d9c0SJosef 'Jeff' Sipek# These come after Makefile.uts. 160*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS = tazmo 161*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += starfire 162*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += javelin 163*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += darwin 164*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += quasar 165*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += grover 166*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += enchilada 167*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += taco 168*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += mpxu 169*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += excalibur 170*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += montecarlo 171*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += serengeti 172*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += littleneck 173*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += starcat 174*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += daktari 175*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += cherrystone 176*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += fjlite 177*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += snowbird 178*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += schumacher 179*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += blade 180*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += boston 181*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += seattle 182*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += chicago 183*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += sunfire 184*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += lw8 185*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += makaha 186*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += opl 187*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS += lw2plus 188*2063d9c0SJosef 'Jeff' Sipek 189*2063d9c0SJosef 'Jeff' Sipek# 190*2063d9c0SJosef 'Jeff' Sipek# machine specific optimization, override default in Makefile.master 191*2063d9c0SJosef 'Jeff' Sipek# 192*2063d9c0SJosef 'Jeff' SipekCC_XARCH = -m64 -xarch=sparcvis 193*2063d9c0SJosef 'Jeff' SipekAS_XARCH = -xarch=v9a 194*2063d9c0SJosef 'Jeff' SipekCOPTIMIZE = -xO3 195*2063d9c0SJosef 'Jeff' SipekCCMODE = -Xa 196*2063d9c0SJosef 'Jeff' Sipek 197*2063d9c0SJosef 'Jeff' SipekCFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM) 198*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CC_XARCH) 199*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(COPTIMIZE) 200*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(EXTRA_CFLAGS) 201*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(XAOPT) 202*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(INLINES) -D_ASM_INLINES 203*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCMODE) 204*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(SPACEFLAG) 205*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CERRWARN) 206*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CTF_FLAGS_$(CLASS)) 207*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(C99MODE) 208*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCUNBOUND) 209*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCNOAUTOINLINE) 210*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCSTATICSYM) 211*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CC32BITCALLERS) 212*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(IROPTFLAG) 213*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CGLOBALSTATIC) 214*2063d9c0SJosef 'Jeff' SipekCFLAGS += -xregs=no%float 215*2063d9c0SJosef 'Jeff' SipekCFLAGS += -xstrconst 216*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CSOURCEDEBUGFLAGS) 217*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CUSERFLAGS) 218*2063d9c0SJosef 'Jeff' Sipek 219*2063d9c0SJosef 'Jeff' SipekASFLAGS += $(AS_XARCH) 220*2063d9c0SJosef 'Jeff' Sipek 221*2063d9c0SJosef 'Jeff' SipekAS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR) 222*2063d9c0SJosef 'Jeff' Sipek 223*2063d9c0SJosef 'Jeff' SipekLINT_KMODS += $(GENUNIX_KMODS) 224*2063d9c0SJosef 'Jeff' Sipek 225*2063d9c0SJosef 'Jeff' SipekLINT_DEFS = -m64 226*2063d9c0SJosef 'Jeff' Sipek 227*2063d9c0SJosef 'Jeff' Sipek# 228*2063d9c0SJosef 'Jeff' Sipek# The following must be defined for all implementations: 229*2063d9c0SJosef 'Jeff' Sipek# 230*2063d9c0SJosef 'Jeff' Sipek# MAPFILE: ld mapfile for the build of kernel/unix. 231*2063d9c0SJosef 'Jeff' Sipek# MODSTUBS: Module stubs source file. 232*2063d9c0SJosef 'Jeff' Sipek# GENCONST_SRC: genconst.c 233*2063d9c0SJosef 'Jeff' Sipek# OFFSETS: offsets.in 234*2063d9c0SJosef 'Jeff' Sipek# PLATFORM_OFFSETS: Platform specific mach_offsets.in 235*2063d9c0SJosef 'Jeff' Sipek# FDOFFSETS: fd_offsets.in 236*2063d9c0SJosef 'Jeff' Sipek# 237*2063d9c0SJosef 'Jeff' SipekMAPFILE = $(UTSBASE)/sun4/conf/Mapfile 238*2063d9c0SJosef 'Jeff' SipekMODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 239*2063d9c0SJosef 'Jeff' SipekGENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c 240*2063d9c0SJosef 'Jeff' SipekOFFSETS = $(UTSBASE)/sun4/ml/offsets.in 241*2063d9c0SJosef 'Jeff' SipekPLATFORM_OFFSETS = $(UTSBASE)/sun4u/ml/mach_offsets.in 242*2063d9c0SJosef 'Jeff' SipekFDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in 243*2063d9c0SJosef 'Jeff' Sipek 244*2063d9c0SJosef 'Jeff' Sipek# 245*2063d9c0SJosef 'Jeff' Sipek# Define the actual specific platforms 246*2063d9c0SJosef 'Jeff' Sipek# 247*2063d9c0SJosef 'Jeff' Sipek 248*2063d9c0SJosef 'Jeff' SipekMACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU 249*2063d9c0SJosef 'Jeff' Sipek 250*2063d9c0SJosef 'Jeff' Sipek# 251*2063d9c0SJosef 'Jeff' Sipek# Software workarounds for hardware "features" 252*2063d9c0SJosef 'Jeff' Sipek# 253*2063d9c0SJosef 'Jeff' Sipek 254*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/$(PLATFORM)/Makefile.workarounds 255*2063d9c0SJosef 'Jeff' Sipek 256*2063d9c0SJosef 'Jeff' Sipek# 257*2063d9c0SJosef 'Jeff' Sipek# Debugging level 258*2063d9c0SJosef 'Jeff' Sipek# 259*2063d9c0SJosef 'Jeff' Sipek# Special knowledge of which special debugging options effect which 260*2063d9c0SJosef 'Jeff' Sipek# file is used to optimize the build if these flags are changed. 261*2063d9c0SJosef 'Jeff' Sipek# 262*2063d9c0SJosef 'Jeff' Sipek# XXX: The above could possibly be done for more flags and files, but 263*2063d9c0SJosef 'Jeff' Sipek# is left as an experiment to the interested reader. Be forewarned, 264*2063d9c0SJosef 'Jeff' Sipek# that excessive use could lead to maintenance difficulties. 265*2063d9c0SJosef 'Jeff' Sipek# 266*2063d9c0SJosef 'Jeff' Sipek# Note: kslice can be enabled for the sun4u, but is disabled by default 267*2063d9c0SJosef 'Jeff' Sipek# in all cases. 268*2063d9c0SJosef 'Jeff' Sipek# 269*2063d9c0SJosef 'Jeff' Sipek 270*2063d9c0SJosef 'Jeff' SipekDEBUG_DEFS_OBJ64 = 271*2063d9c0SJosef 'Jeff' SipekDEBUG_DEFS_DBG64 = -DDEBUG 272*2063d9c0SJosef 'Jeff' SipekDEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 273*2063d9c0SJosef 'Jeff' Sipek 274*2063d9c0SJosef 'Jeff' SipekDEBUG_COND_OBJ64 = $(POUND_SIGN) 275*2063d9c0SJosef 'Jeff' SipekDEBUG_COND_DBG64 = 276*2063d9c0SJosef 'Jeff' SipekIF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 277*2063d9c0SJosef 'Jeff' Sipek 278*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG 279*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG 280*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE 281*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0 282*2063d9c0SJosef 'Jeff' Sipek 283*2063d9c0SJosef 'Jeff' SipekIF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ) 284*2063d9c0SJosef 'Jeff' Sipek# comment this out for a non-debug kernel with TRAPTRACE 285*2063d9c0SJosef 'Jeff' Sipek#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/ 286*2063d9c0SJosef 'Jeff' Sipek 287*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE 288*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE 289*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE 290*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE 291*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE 292*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE 293*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE 294*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE 295*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE 296*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE 297*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE 298*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE 299*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE 300*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE 301*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE 302*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE 303*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE 304*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)x_call.o := DEBUG_DEFS += -DTRAPTRACE 305*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)spitfire_asm.o := DEBUG_DEFS += -DTRAPTRACE 306*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_common_asm.o := DEBUG_DEFS += -DTRAPTRACE 307*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_cheetah_asm.o := DEBUG_DEFS += -DTRAPTRACE 308*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_cheetahplus_asm.o := DEBUG_DEFS += -DTRAPTRACE 309*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_jalapeno_asm.o := DEBUG_DEFS += -DTRAPTRACE 310*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)opl_olympus_asm.o := DEBUG_DEFS += -DTRAPTRACE 311*2063d9c0SJosef 'Jeff' Sipek 312*2063d9c0SJosef 'Jeff' Sipek# Comment these out if you don't want dispatcher lock statistics. 313*2063d9c0SJosef 'Jeff' Sipek 314*2063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS 315*2063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS 316*2063d9c0SJosef 'Jeff' Sipek 317*2063d9c0SJosef 'Jeff' Sipek# Comment these out if you don't want dispatcher debugging 318*2063d9c0SJosef 'Jeff' Sipek 319*2063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG 320*2063d9c0SJosef 'Jeff' Sipek 321*2063d9c0SJosef 'Jeff' Sipek# 322*2063d9c0SJosef 'Jeff' Sipek# Collect the preprocessor definitions to be associated with *all* 323*2063d9c0SJosef 'Jeff' Sipek# files. 324*2063d9c0SJosef 'Jeff' Sipek# 325*2063d9c0SJosef 'Jeff' SipekALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \ 326*2063d9c0SJosef 'Jeff' Sipek $(OPTION_DEFS) 327*2063d9c0SJosef 'Jeff' SipekGENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS) 328*2063d9c0SJosef 'Jeff' Sipek 329*2063d9c0SJosef 'Jeff' Sipek# 330*2063d9c0SJosef 'Jeff' Sipek# ----- TRANSITIONAL SECTION -------------------------------------------------- 331*2063d9c0SJosef 'Jeff' Sipek# 332*2063d9c0SJosef 'Jeff' Sipek 333*2063d9c0SJosef 'Jeff' Sipek# 334*2063d9c0SJosef 'Jeff' Sipek# Not everything which *should* be a module is a module yet. The 335*2063d9c0SJosef 'Jeff' Sipek# following is a list of such objects which are currently part of 336*2063d9c0SJosef 'Jeff' Sipek# the base kernel but should soon become kmods. 337*2063d9c0SJosef 'Jeff' Sipek# 338*2063d9c0SJosef 'Jeff' SipekMACH_NOT_YET_KMODS = $(AUTOCONF_OBJS) 339*2063d9c0SJosef 'Jeff' Sipek 340*2063d9c0SJosef 'Jeff' Sipek# 341*2063d9c0SJosef 'Jeff' Sipek# ----- END OF TRANSITIONAL SECTION ------------------------------------------- 342*2063d9c0SJosef 'Jeff' Sipek# 343*2063d9c0SJosef 'Jeff' Sipek 344*2063d9c0SJosef 'Jeff' Sipek# 345*2063d9c0SJosef 'Jeff' Sipek# The kernels modules which are "implementation architecture" 346*2063d9c0SJosef 'Jeff' Sipek# specific for this machine are enumerated below. Note that most 347*2063d9c0SJosef 'Jeff' Sipek# of these modules must exist (in one form or another) for each 348*2063d9c0SJosef 'Jeff' Sipek# architecture. 349*2063d9c0SJosef 'Jeff' Sipek# 350*2063d9c0SJosef 'Jeff' Sipek# Common Drivers (usually pseudo drivers) (/kernel/drv): 351*2063d9c0SJosef 'Jeff' Sipek# 352*2063d9c0SJosef 'Jeff' Sipek 353*2063d9c0SJosef 'Jeff' Sipek# 354*2063d9c0SJosef 'Jeff' Sipek# Machine Specific Driver Modules (/kernel/drv): 355*2063d9c0SJosef 'Jeff' Sipek# 356*2063d9c0SJosef 'Jeff' Sipek# XXX: How many of these are really machine specific? 357*2063d9c0SJosef 'Jeff' Sipek# 358*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += bbc_beep 359*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += cpc 360*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += fd 361*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += rootnex sbusmem upa64s zs zsh 362*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += sbus 363*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pcisch pcipsy simba 364*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += px 365*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ebus 366*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += su 367*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += tod 368*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += power 369*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += epic 370*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += grbeep 371*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pcf8584 max1617 seeprom tda8444 pca9556 372*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ics951601 adm1031 373*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += lm75 ltc1427 pcf8591 pcf8574 ssc050 ssc100 374*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pic16f819 375*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pic16f747 376*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += adm1026 377*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += us 378*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ppm schppm jbusppm 379*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += mc-us3 380*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += mc-us3i 381*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += smbus 382*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += db21554 383*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += gpio_87317 384*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += isadma 385*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += sbbc 386*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pmubus 387*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pmugpio 388*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += pmc 389*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += trapstat 390*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += rmc_comm 391*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += rmcadm 392*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += rmclomv 393*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += sf 394*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += nxge 395*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += i2bsc 396*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += mem_cache 397*2063d9c0SJosef 'Jeff' Sipek 398*2063d9c0SJosef 'Jeff' Sipek# 399*2063d9c0SJosef 'Jeff' Sipek# Exec Class Modules (/kernel/exec): 400*2063d9c0SJosef 'Jeff' Sipek# 401*2063d9c0SJosef 'Jeff' SipekEXEC_KMODS += 402*2063d9c0SJosef 'Jeff' Sipek 403*2063d9c0SJosef 'Jeff' Sipek# 404*2063d9c0SJosef 'Jeff' Sipek# Scheduling Class Modules (/kernel/sched): 405*2063d9c0SJosef 'Jeff' Sipek# 406*2063d9c0SJosef 'Jeff' SipekSCHED_KMODS += 407*2063d9c0SJosef 'Jeff' Sipek 408*2063d9c0SJosef 'Jeff' Sipek# 409*2063d9c0SJosef 'Jeff' Sipek# File System Modules (/kernel/fs): 410*2063d9c0SJosef 'Jeff' Sipek# 411*2063d9c0SJosef 'Jeff' SipekFS_KMODS += 412*2063d9c0SJosef 'Jeff' Sipek 413*2063d9c0SJosef 'Jeff' Sipek# 414*2063d9c0SJosef 'Jeff' Sipek# Streams Modules (/kernel/strmod): 415*2063d9c0SJosef 'Jeff' Sipek# 416*2063d9c0SJosef 'Jeff' SipekSTRMOD_KMODS += kb 417*2063d9c0SJosef 'Jeff' Sipek 418*2063d9c0SJosef 'Jeff' Sipek# 419*2063d9c0SJosef 'Jeff' Sipek# 'System' Modules (/kernel/sys): 420*2063d9c0SJosef 'Jeff' Sipek# 421*2063d9c0SJosef 'Jeff' SipekSYS_KMODS += 422*2063d9c0SJosef 'Jeff' Sipek 423*2063d9c0SJosef 'Jeff' Sipek# 424*2063d9c0SJosef 'Jeff' Sipek# 'User' Modules (/kernel/misc): 425*2063d9c0SJosef 'Jeff' Sipek# 426*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += bignum 427*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += obpsym bootdev vis cpr platmod md5 sha1 i2c_svc 428*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += sbd 429*2063d9c0SJosef 'Jeff' Sipek 430*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += opl_cfg 431*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += gptwo_cpu gptwocfg 432*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += pcie 433*2063d9c0SJosef 'Jeff' Sipek 434*2063d9c0SJosef 'Jeff' Sipek# 435*2063d9c0SJosef 'Jeff' Sipek# Brand modules 436*2063d9c0SJosef 'Jeff' Sipek# 437*2063d9c0SJosef 'Jeff' SipekBRAND_KMODS += sn1_brand s10_brand 438*2063d9c0SJosef 'Jeff' Sipek 439*2063d9c0SJosef 'Jeff' Sipek# 440*2063d9c0SJosef 'Jeff' Sipek# Software Cryptographic Providers (/kernel/crypto): 441*2063d9c0SJosef 'Jeff' Sipek# 442*2063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS += aes 443*2063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS += arcfour 444*2063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS += des 445*2063d9c0SJosef 'Jeff' Sipek 446*2063d9c0SJosef 'Jeff' Sipek# 447*2063d9c0SJosef 'Jeff' Sipek# generic-unix module (/kernel/genunix): 448*2063d9c0SJosef 'Jeff' Sipek# 449*2063d9c0SJosef 'Jeff' SipekGENUNIX_KMODS += genunix 450*2063d9c0SJosef 'Jeff' Sipek 451*2063d9c0SJosef 'Jeff' Sipek# 'User' "Modules" excluded from the Full Kernel lint target: 452*2063d9c0SJosef 'Jeff' Sipek# 453*2063d9c0SJosef 'Jeff' Sipek 454*2063d9c0SJosef 'Jeff' Sipek# 455*2063d9c0SJosef 'Jeff' Sipek# Modules eXcluded from the product: 456*2063d9c0SJosef 'Jeff' Sipek# 457*2063d9c0SJosef 'Jeff' SipekXMODS += 458*2063d9c0SJosef 'Jeff' Sipek 459*2063d9c0SJosef 'Jeff' Sipek# 460*2063d9c0SJosef 'Jeff' Sipek# cpu modules 461*2063d9c0SJosef 'Jeff' Sipek# 462*2063d9c0SJosef 'Jeff' SipekCPU_KMODS += cheetah cheetahplus jalapeno serrano spitfire hummingbird 463*2063d9c0SJosef 'Jeff' Sipek 464*2063d9c0SJosef 'Jeff' Sipek# 465*2063d9c0SJosef 'Jeff' Sipek# sun4u 'TOD' Modules (/platform/.../kernel/tod): 466*2063d9c0SJosef 'Jeff' Sipek# 467*2063d9c0SJosef 'Jeff' SipekTOD_KMODS += todds1287 todds1337 todmostek todstarfire 468*2063d9c0SJosef 'Jeff' SipekTOD_KMODS += todm5819 todblade todbq4802 todsg todopl 469*2063d9c0SJosef 'Jeff' SipekTOD_KMODS += todm5819p_rmc todstarcat 470*2063d9c0SJosef 'Jeff' Sipek 471*2063d9c0SJosef 'Jeff' Sipek# 472*2063d9c0SJosef 'Jeff' Sipek# Performance Counter BackEnd Modules (/usr/kernel/pcbe): 473*2063d9c0SJosef 'Jeff' Sipek# 474*2063d9c0SJosef 'Jeff' SipekPCBE_KMODS += us234_pcbe 475*2063d9c0SJosef 'Jeff' SipekPCBE_KMODS += opl_pcbe 476