xref: /titanic_52/usr/src/uts/sun4u/chicago/fpc/Makefile (revision 385cc6b4ad1792caef3f84eb61eed3f27085801f)
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
106CERRWARN	+= -_gcc=-Wno-unused-variable
107
108#
109#	Default build targets.
110#
111.KEEP_STATE:
112
113def:		$(DEF_DEPS)
114
115all:		$(ALL_DEPS)
116
117clean:		$(CLEAN_DEPS)
118
119clobber:	$(CLOBBER_DEPS)
120
121lint:		$(LINT_DEPS)
122
123modlintlib:	$(MODLINTLIB_DEPS)
124
125clean.lint:	$(CLEAN_LINT_DEPS)
126
127install:	$(INSTALL_DEPS)
128
129$(ROOT_BOSTON_DIR): $(ROOT_PLAT_DIR)
130	-$(INS.dir)
131
132$(ROOT_BOSTON_MOD_DIR): $(ROOT_BOSTON_DIR)
133	-$(INS.dir)
134
135$(ROOT_BOSTON_DRV_DIR_32): $(ROOT_BOSTON_MOD_DIR)
136	-$(INS.dir)
137
138$(ROOT_BOSTON_DRV_DIR_64): $(ROOT_BOSTON_DRV_DIR_32)
139	-$(INS.dir)
140
141$(ROOT_SEATTLE_DIR): $(ROOT_PLAT_DIR)
142	-$(INS.dir)
143
144$(ROOT_SEATTLE_MOD_DIR): $(ROOT_SEATTLE_DIR)
145	-$(INS.dir)
146
147$(ROOT_SEATTLE_DRV_DIR_32): $(ROOT_SEATTLE_MOD_DIR)
148	-$(INS.dir)
149
150$(ROOT_SEATTLE_DRV_DIR_64): $(ROOT_SEATTLE_DRV_DIR_32)
151	-$(INS.dir)
152
153$(BOSTON_ROOTMODULE): $(ROOTMODULE) $(ROOT_BOSTON_DRV_DIR_64)
154	$(RM) $@; $(SYMLINK) $(ROOTMODULE_SOFTLINK) $@
155
156$(BOSTON_CONFFILE): $(ROOT_CONFFILE) $(ROOT_BOSTON_DRV_DIR_32)
157	$(RM) $@; $(SYMLINK) $(CONFFILE_SOFTLINK) $@
158
159$(SEATTLE_ROOTMODULE): $(ROOTMODULE) $(ROOT_SEATTLE_DRV_DIR_64)
160	$(RM) $@; $(SYMLINK) $(ROOTMODULE_SOFTLINK) $@
161
162$(SEATTLE_CONFFILE): $(ROOT_CONFFILE) $(ROOT_SEATTLE_DRV_DIR_32)
163	$(RM) $@; $(SYMLINK) $(CONFFILE_SOFTLINK) $@
164
165
166#
167#	Include common targets.
168#
169include $(UTSBASE)/sun4u/chicago/Makefile.targ
170