xref: /titanic_44/usr/src/uts/sun4u/chicago/fpc/Makefile (revision 327151705b7439cb7ab35c370f682cac7ef9523a)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27#
28#	uts/sun4u/chicago/fpc/Makefile
29#
30#	This makefile drives the production of the sun4u
31#	fire performance counter kernel module
32#
33#	sun4u implementation architecture dependent
34#
35
36#
37#	Path to the base of the uts directory tree (usually /usr/src/uts).
38#
39UTSBASE	= ../../..
40
41#
42#	Define the module and object file sets.
43#
44MODULE		= fpc
45OBJECTS		= $(FPC_OBJS:%=$(OBJS_DIR)/%)
46LINTS		= $(FPC_OBJS:%.o=$(LINTS_DIR)/%.ln)
47ROOTMODULE	= $(ROOT_CHICAGO_DRV_DIR)/$(MODULE)
48CONF_SRCDIR	= $(UTSBASE)/sun4/io/fpc
49
50ROOT_BOSTON_DIR		= $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-V445
51ROOT_BOSTON_MOD_DIR	= $(ROOT_BOSTON_DIR)/kernel
52ROOT_BOSTON_DRV_DIR_32	= $(ROOT_BOSTON_MOD_DIR)/drv
53ROOT_BOSTON_DRV_DIR_64	= $(ROOT_BOSTON_DRV_DIR_32)/$(SUBDIR64)
54
55ROOT_SEATTLE_DIR	= $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-V215
56ROOT_SEATTLE_MOD_DIR	= $(ROOT_SEATTLE_DIR)/kernel
57ROOT_SEATTLE_DRV_DIR_32	= $(ROOT_SEATTLE_MOD_DIR)/drv
58ROOT_SEATTLE_DRV_DIR_64	= $(ROOT_SEATTLE_DRV_DIR_32)/$(SUBDIR64)
59
60ROOTMODULE_SOFTLINK	= $(ROOT_BOSTON_DRV_DIR_64:$(ROOT_BOSTON_DIR)%=../../../../SUNW,A70%/$(MODULE))
61
62CONFFILE_SOFTLINK	= $(ROOT_BOSTON_DRV_DIR_32:$(ROOT_BOSTON_DIR)%=../../../SUNW,A70%/$(CONFFILE))
63
64BOSTON_ROOTMODULE	= $(ROOT_BOSTON_DRV_DIR_64)/$(MODULE)
65BOSTON_CONFFILE		= $(ROOT_BOSTON_DRV_DIR_32)/$(CONFFILE)
66
67SEATTLE_ROOTMODULE	= $(ROOT_SEATTLE_DRV_DIR_64)/$(MODULE)
68SEATTLE_CONFFILE	= $(ROOT_SEATTLE_DRV_DIR_32)/$(CONFFILE)
69
70#
71#	Include common rules.
72#
73include $(UTSBASE)/sun4u/chicago/Makefile.chicago
74
75#
76#	Define targets
77#
78ALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
79LINT_TARGET	= $(MODULE).lint
80INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) \
81			$(BOSTON_ROOTMODULE) $(BOSTON_CONFFILE) \
82			$(SEATTLE_ROOTMODULE) $(SEATTLE_CONFFILE)
83
84#
85#	Include SUN4 and SUN4U specific headers files
86#
87INC_PATH	+= -I$(UTSBASE)/sun4/io/fpc
88
89#
90# lint pass one enforcement
91#
92CFLAGS += $(CCVERBOSE)
93
94#
95# Turn on doubleword alignment for 64 bit registers
96#
97CFLAGS += -dalign
98
99#
100# For now, disable these lint checks; maintainers should endeavor
101# to investigate and remove these for maximum lint coverage.
102# Please do not carry these forward to new Makefiles.
103#
104LINTTAGS	+= -erroff=E_STATIC_UNUSED
105
106#
107#	Default build targets.
108#
109.KEEP_STATE:
110
111def:		$(DEF_DEPS)
112
113all:		$(ALL_DEPS)
114
115clean:		$(CLEAN_DEPS)
116
117clobber:	$(CLOBBER_DEPS)
118
119lint:		$(LINT_DEPS)
120
121modlintlib:	$(MODLINTLIB_DEPS)
122
123clean.lint:	$(CLEAN_LINT_DEPS)
124
125install:	$(INSTALL_DEPS)
126
127$(ROOT_BOSTON_DIR): $(ROOT_PLAT_DIR)
128	-$(INS.dir)
129
130$(ROOT_BOSTON_MOD_DIR): $(ROOT_BOSTON_DIR)
131	-$(INS.dir)
132
133$(ROOT_BOSTON_DRV_DIR_32): $(ROOT_BOSTON_MOD_DIR)
134	-$(INS.dir)
135
136$(ROOT_BOSTON_DRV_DIR_64): $(ROOT_BOSTON_DRV_DIR_32)
137	-$(INS.dir)
138
139$(ROOT_SEATTLE_DIR): $(ROOT_PLAT_DIR)
140	-$(INS.dir)
141
142$(ROOT_SEATTLE_MOD_DIR): $(ROOT_SEATTLE_DIR)
143	-$(INS.dir)
144
145$(ROOT_SEATTLE_DRV_DIR_32): $(ROOT_SEATTLE_MOD_DIR)
146	-$(INS.dir)
147
148$(ROOT_SEATTLE_DRV_DIR_64): $(ROOT_SEATTLE_DRV_DIR_32)
149	-$(INS.dir)
150
151$(BOSTON_ROOTMODULE): $(ROOTMODULE) $(ROOT_BOSTON_DRV_DIR_64)
152	$(RM) $@; $(SYMLINK) $(ROOTMODULE_SOFTLINK) $@
153
154$(BOSTON_CONFFILE): $(ROOT_CONFFILE) $(ROOT_BOSTON_DRV_DIR_32)
155	$(RM) $@; $(SYMLINK) $(CONFFILE_SOFTLINK) $@
156
157$(SEATTLE_ROOTMODULE): $(ROOTMODULE) $(ROOT_SEATTLE_DRV_DIR_64)
158	$(RM) $@; $(SYMLINK) $(ROOTMODULE_SOFTLINK) $@
159
160$(SEATTLE_CONFFILE): $(ROOT_CONFFILE) $(ROOT_SEATTLE_DRV_DIR_32)
161	$(RM) $@; $(SYMLINK) $(CONFFILE_SOFTLINK) $@
162
163
164#
165#	Include common targets.
166#
167include $(UTSBASE)/sun4u/chicago/Makefile.targ
168