Makefile revision 580:70dfd36fd02c
166458Sdfr#
266458Sdfr# CDDL HEADER START
366458Sdfr#
466458Sdfr# The contents of this file are subject to the terms of the
566458Sdfr# Common Development and Distribution License (the "License").
666458Sdfr# You may not use this file except in compliance with the License.
766458Sdfr#
866458Sdfr# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
966458Sdfr# or http://www.opensolaris.org/os/licensing.
1066458Sdfr# See the License for the specific language governing permissions
1166458Sdfr# and limitations under the License.
1266458Sdfr#
1366458Sdfr# When distributing Covered Code, include this CDDL HEADER in each
1466458Sdfr# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1566458Sdfr# If applicable, add the following below this CDDL HEADER, with the
1666458Sdfr# fields enclosed by brackets "[]" replaced with your own identifying
1766458Sdfr# information: Portions Copyright [yyyy] [name of copyright owner]
1866458Sdfr#
1966458Sdfr# CDDL HEADER END
2066458Sdfr#
2166458Sdfr
2266458Sdfr#
2366458Sdfr# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2466458Sdfr# Use is subject to license terms.
2566458Sdfr#
2666458Sdfr# ident	"%Z%%M%	%I%	%E% SMI"
2766458Sdfr#
2866458Sdfr
2966458Sdfr#
3066458Sdfr#	This makefile drives the production of the sun4u UltraSPARC driver
3166458Sdfr#	module.
3266458Sdfr#
3366458Sdfr#	sun4u implementation architecture dependent
3466458Sdfr#
3566458Sdfr
3666458Sdfr#
3766458Sdfr#	Path to the base of the uts directory tree (usually /usr/src/uts).
3866458Sdfr#
3966458SdfrUTSBASE	= ../..
4066458Sdfr
4166458Sdfr#
4266458Sdfr#	Define the module and object file sets.
4366458Sdfr#
4466458SdfrMODULE		= SUNW,UltraSPARC-IIIi
4566458SdfrOBJECTS		= $(JALAPENO_OBJS:%=$(OBJS_DIR)/%)
4666458SdfrLINTS		= $(JALAPENO_OBJS:%.o=$(LINTS_DIR)/%.ln)
4766458SdfrROOTMODULE	= $(ROOT_PSM_CPU_DIR)/$(MODULE)
4866458SdfrROOTSOFTLINKS	= $(SOFTLINKS:%=$(ROOT_PSM_CPU_DIR)/%)
4966458Sdfr
5066458SdfrCPU_DIR		= .
5166458SdfrHERE		= ../jalapeno
5266458Sdfr
5366458Sdfr#
5466458Sdfr#	Include common rules.
5566458Sdfr#
5666458Sdfrinclude $(UTSBASE)/sun4u/Makefile.sun4u
5766458Sdfr
5866458Sdfr#
5966458Sdfr#	Override defaults
6066458Sdfr#
6166458SdfrCLEANFILES	+= $(CPULIB) $(SYM_MOD)
6266458Sdfr
6366458Sdfr#
6466458Sdfr#	Define targets
6566458Sdfr#
6666633SdfrALL_TARGET	= $(SYM_MOD)
6766458SdfrLINT_TARGET	= $(MODULE).lint
6866633SdfrINSTALL_TARGET	= def $(BINARY) $(ROOTMODULE) $(ROOTSOFTLINKS)
6966633Sdfr
7066633Sdfr#
7166458Sdfr# lint pass one enforcement
7266633Sdfr#
7366633SdfrCFLAGS += $(CCVERBOSE) -DCHEETAH -DJALAPENO -DCPU_IMP_L1_CACHE_PARITY \
7466633Sdfr	     -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE
7566633SdfrASFLAGS +=  -DCHEETAH -DJALAPENO -DCPU_IMP_L1_CACHE_PARITY \
7666633Sdfr	    -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE
7766633Sdfr
7866633Sdfr#
7966633Sdfr# cpu-module-specific flags
8066633Sdfr#
8166633SdfrCPPFLAGS += -DCPU_MODULE -DCHEETAH -DJALAPENO -DCPU_IMP_L1_CACHE_PARITY \
8266633Sdfr	    -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE
8366633SdfrAS_CPPFLAGS += -DCPU_MODULE -DCHEETAH -DJALAPENO -DCPU_IMP_L1_CACHE_PARITY \
8466633Sdfr	       -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE
8566633Sdfr
8666633Sdfr#
8766633Sdfr#	Default build targets.
8866458Sdfr#
8966633Sdfr.KEEP_STATE:
9066633Sdfr
9166458Sdfrdef:		$(DEF_DEPS)
9266486Sdfr
9366458Sdfrall:		$(ALL_DEPS)
9466633Sdfr
9566458Sdfrclean:		$(CLEAN_DEPS)
9666633Sdfr
9766633Sdfrclobber:	$(CLOBBER_DEPS)
9866633Sdfr
9966458Sdfrlint:		$(LINT_DEPS)
10066633Sdfr
10166633Sdfrmodlintlib:	$(MODLINTLIB_DEPS)
10266633Sdfr
10366633Sdfrclean.lint:	$(CLEAN_LINT_DEPS)
10466633Sdfr
10566633Sdfrinstall:	$(INSTALL_DEPS)
10666633Sdfr
10766633Sdfr$(CPULIB):	$(BINARY)
10866633Sdfr	$(BUILD.SO) $(BINARY)
10966633Sdfr
11066633Sdfr$(SYM_MOD):	$(UNIX_O) $(CPULIB)
11166633Sdfr	@echo "resolving symbols against unix.o"
11266633Sdfr	@(cd $(UNIX_DIR); pwd; \
11366633Sdfr	    CPU_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
11466633Sdfr
11566633Sdfr$(ROOTSOFTLINKS): $(ROOTMODULE)
11666458Sdfr	$(RM) $@; $(SYMLINK) $(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
11766633Sdfr
11866633Sdfr#	Include common targets.
11966458Sdfr#
12066486Sdfrinclude $(UTSBASE)/sun4u/Makefile.targ
12166458Sdfr