xref: /titanic_44/usr/src/uts/sun4u/starcat/cheetahplus/Makefile (revision 09f67678c27dda8a89f87f1f408a87dd49ceb0e1)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# uts/sun4u/starcat/cheetahplus/Makefile
24# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#pragma ident	"%Z%%M%	%I%	%E% SMI"
28#
29#	This makefile drives the production of the Starcat specific
30#	UltraSPARC-III+ driver module.
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE	= ../../..
37
38#
39#	Define the module and object file sets.
40#
41MODULE		= SUNW,UltraSPARC-III+
42OBJECTS		= $(CHEETAHPLUS_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(CHEETAHPLUS_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_STARCAT_CPU_DIR)/$(MODULE)
45SOFTLINKS	= SUNW,UltraSPARC-IV SUNW,UltraSPARC-IV+
46ROOTSOFTLINKS	= $(SOFTLINKS:%=$(ROOT_STARCAT_CPU_DIR)/%)
47
48CPU_DIR		= .
49HERE		= ../cheetahplus
50
51#
52#	Include common rules.
53#
54include $(UTSBASE)/sun4u/starcat/Makefile.starcat
55
56#
57#	Override defaults
58#
59CLEANFILES	+= $(CPULIB) $(SYM_MOD)
60
61#
62#	Define targets
63#
64ALL_TARGET	= $(SYM_MOD)
65LINT_TARGET	= $(MODULE).lint
66INSTALL_TARGET	= def $(BINARY) $(ROOTMODULE) $(ROOTSOFTLINKS)
67
68#
69#       Overrides
70#
71ALL_BUILDS      = $(ALL_BUILDSONLY64)
72DEF_BUILDS      = $(DEF_BUILDSONLY64)
73CLEANLINTFILES  += $(LINT32_FILES)
74
75#
76# lint pass one enforcement
77#
78CFLAGS += $(CCVERBOSE) -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
79	     -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
80ASFLAGS +=  -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
81	    -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
82
83#
84# cpu-module-specific flags
85#
86CPPFLAGS += -DCPU_MODULE -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
87	    -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
88AS_CPPFLAGS += -DCPU_MODULE -DCHEETAH -DCHEETAH_PLUS -DCPU_IMP_L1_CACHE_PARITY \
89	       -DCPU_IMP_ECACHE_ASSOC -DCPU_IMP_DUAL_PAGESIZE -DCPU_IMP_AFSR_EXT
90
91#
92#	Default build targets.
93#
94.KEEP_STATE:
95
96def:		$(DEF_DEPS)
97
98all:		$(ALL_DEPS)
99
100clean:		$(CLEAN_DEPS)
101
102clobber:	$(CLOBBER_DEPS)
103
104lint:		$(LINT_DEPS)
105
106modlintlib:	$(MODLINTLIB_DEPS) lint32
107
108clean.lint:	$(CLEAN_LINT_DEPS)
109
110install:	$(INSTALL_DEPS)
111
112$(CPULIB):	$(BINARY)
113	$(LD) -o $(CPULIB) -G $(BINARY)
114
115$(SYM_MOD):	$(UNIX_O) $(CPULIB)
116	@echo "resolving symbols against unix.o"
117	@(cd $(UNIX_DIR); pwd; \
118	    CPU_DIR=$(HERE) SYM_MOD=$(HERE)/$(SYM_MOD) $(MAKE) symcheck)
119
120$(ROOTSOFTLINKS): $(ROOTMODULE)
121	$(RM) $@; $(SYMLINK) $(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
122
123#	Include common targets.
124#
125include $(UTSBASE)/sun4u/starcat/Makefile.targ
126