Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Common Development and Distribution License, Version 1.0 only
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# (the "License"). You may not use this file except in compliance
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# or http://www.opensolaris.org/os/licensing.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# uts/sun4u/cheetahplus/Makefile
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Use is subject to license terms.
e6c3a72a023407f5d1fface64356e1cc81f1af31Phill Cunnington#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#pragma ident "%Z%%M% %I% %E% SMI"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# This makefile drives the production of the sun4u UltraSPARC driver module.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden# sun4u implementation architecture dependent
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden#
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden#
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden# Path to the base of the uts directory tree (usually /usr/src/uts).
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterUTSBASE = ../..
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Define the module and object file sets.
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden#
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonMODULE = SUNW,UltraSPARC-III+
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonOBJECTS = $(CHEETAHPLUS_OBJS:%=$(OBJS_DIR)/%)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonLINTS = $(CHEETAHPLUS_OBJS:%.o=$(LINTS_DIR)/%.ln)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonROOTMODULE = $(ROOT_PSM_CPU_DIR)/$(MODULE)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonSOFTLINKS = SUNW,UltraSPARC-IV SUNW,UltraSPARC-IV+
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil MaddenROOTSOFTLINKS = $(SOFTLINKS:%=$(ROOT_PSM_CPU_DIR)/%)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonCPU_DIR = .
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonHERE = ../cheetahplus
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Include common rules.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude $(UTSBASE)/sun4u/Makefile.sun4u
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Override defaults
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonCLEANFILES += $(CPULIB) $(SYM_MOD)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Define targets
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonALL_TARGET = $(SYM_MOD)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonLINT_TARGET = $(MODULE).lint
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill CunningtonINSTALL_TARGET = def $(BINARY) $(ROOTMODULE) $(ROOTSOFTLINKS)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# lint pass one enforcement
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterCFLAGS += $(CCVERBOSE) -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterASFLAGS += -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# cpu-module-specific flags
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterCPPFLAGS += -DCPU_MODULE -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterAS_CPPFLAGS += -DCPU_MODULE -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Default build targets.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster.KEEP_STATE:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterdef: $(DEF_DEPS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunningtonall: $(ALL_DEPS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Maddenclean: $(CLEAN_DEPS)
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunningtonclobber: $(CLOBBER_DEPS)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunningtonlint: $(LINT_DEPS)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostermodlintlib: $(MODLINTLIB_DEPS)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunningtonclean.lint: $(CLEAN_LINT_DEPS)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunningtoninstall: $(INSTALL_DEPS)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington$(CPULIB): $(BINARY)
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden $(LD) -o $(CPULIB) -G $(BINARY)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington$(SYM_MOD): $(UNIX_O) $(CPULIB)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington @echo "resolving symbols against unix.o"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster @(cd $(UNIX_DIR); pwd; \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster CPU_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(ROOTSOFTLINKS): $(ROOTMODULE)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $@; $(SYMLINK) $(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden# Include common targets.
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden#
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Maddeninclude $(UTSBASE)/sun4u/Makefile.targ
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden