xref: /illumos-gate/usr/src/uts/sun4u/chicago/fpc/Makefile (revision 0aaef2f5)
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)/%)
46ROOTMODULE	= $(ROOT_CHICAGO_DRV_DIR)/$(MODULE)
47CONF_SRCDIR	= $(UTSBASE)/sun4/io/fpc
48
49ROOT_BOSTON_DIR		= $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-V445
50ROOT_BOSTON_MOD_DIR	= $(ROOT_BOSTON_DIR)/kernel
51ROOT_BOSTON_DRV_DIR_32	= $(ROOT_BOSTON_MOD_DIR)/drv
52ROOT_BOSTON_DRV_DIR_64	= $(ROOT_BOSTON_DRV_DIR_32)/$(SUBDIR64)
53
54ROOT_SEATTLE_DIR	= $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-V215
55ROOT_SEATTLE_MOD_DIR	= $(ROOT_SEATTLE_DIR)/kernel
56ROOT_SEATTLE_DRV_DIR_32	= $(ROOT_SEATTLE_MOD_DIR)/drv
57ROOT_SEATTLE_DRV_DIR_64	= $(ROOT_SEATTLE_DRV_DIR_32)/$(SUBDIR64)
58
59ROOTMODULE_SOFTLINK	= $(ROOT_BOSTON_DRV_DIR_64:$(ROOT_BOSTON_DIR)%=../../../../SUNW,A70%/$(MODULE))
60
61CONFFILE_SOFTLINK	= $(ROOT_BOSTON_DRV_DIR_32:$(ROOT_BOSTON_DIR)%=../../../SUNW,A70%/$(CONFFILE))
62
63BOSTON_ROOTMODULE	= $(ROOT_BOSTON_DRV_DIR_64)/$(MODULE)
64BOSTON_CONFFILE		= $(ROOT_BOSTON_DRV_DIR_32)/$(CONFFILE)
65
66SEATTLE_ROOTMODULE	= $(ROOT_SEATTLE_DRV_DIR_64)/$(MODULE)
67SEATTLE_CONFFILE	= $(ROOT_SEATTLE_DRV_DIR_32)/$(CONFFILE)
68
69#
70#	Include common rules.
71#
72include $(UTSBASE)/sun4u/chicago/Makefile.chicago
73
74#
75#	Define targets
76#
77ALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
78INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) \
79			$(BOSTON_ROOTMODULE) $(BOSTON_CONFFILE) \
80			$(SEATTLE_ROOTMODULE) $(SEATTLE_CONFFILE)
81
82#
83#	Include SUN4 and SUN4U specific headers files
84#
85INC_PATH	+= -I$(UTSBASE)/sun4/io/fpc
86
87
88#
89# Turn on doubleword alignment for 64 bit registers
90#
91CFLAGS += -dalign
92
93#
94# For now, disable these warnings; maintainers should endeavor
95# to investigate and remove these for maximum coverage.
96# Please do not carry these forward to new Makefiles.
97#
98CFLAGS		+= $(CCVERBOSE)
99CERRWARN	+= -_gcc=-Wno-unused-variable
100
101#
102#	Default build targets.
103#
104.KEEP_STATE:
105
106def:		$(DEF_DEPS)
107
108all:		$(ALL_DEPS)
109
110clean:		$(CLEAN_DEPS)
111
112clobber:	$(CLOBBER_DEPS)
113
114install:	$(INSTALL_DEPS)
115
116$(ROOT_BOSTON_DIR): $(ROOT_PLAT_DIR)
117	-$(INS.dir)
118
119$(ROOT_BOSTON_MOD_DIR): $(ROOT_BOSTON_DIR)
120	-$(INS.dir)
121
122$(ROOT_BOSTON_DRV_DIR_32): $(ROOT_BOSTON_MOD_DIR)
123	-$(INS.dir)
124
125$(ROOT_BOSTON_DRV_DIR_64): $(ROOT_BOSTON_DRV_DIR_32)
126	-$(INS.dir)
127
128$(ROOT_SEATTLE_DIR): $(ROOT_PLAT_DIR)
129	-$(INS.dir)
130
131$(ROOT_SEATTLE_MOD_DIR): $(ROOT_SEATTLE_DIR)
132	-$(INS.dir)
133
134$(ROOT_SEATTLE_DRV_DIR_32): $(ROOT_SEATTLE_MOD_DIR)
135	-$(INS.dir)
136
137$(ROOT_SEATTLE_DRV_DIR_64): $(ROOT_SEATTLE_DRV_DIR_32)
138	-$(INS.dir)
139
140$(BOSTON_ROOTMODULE): $(ROOTMODULE) $(ROOT_BOSTON_DRV_DIR_64)
141	$(RM) $@; $(SYMLINK) $(ROOTMODULE_SOFTLINK) $@
142
143$(BOSTON_CONFFILE): $(ROOT_CONFFILE) $(ROOT_BOSTON_DRV_DIR_32)
144	$(RM) $@; $(SYMLINK) $(CONFFILE_SOFTLINK) $@
145
146$(SEATTLE_ROOTMODULE): $(ROOTMODULE) $(ROOT_SEATTLE_DRV_DIR_64)
147	$(RM) $@; $(SYMLINK) $(ROOTMODULE_SOFTLINK) $@
148
149$(SEATTLE_CONFFILE): $(ROOT_CONFFILE) $(ROOT_SEATTLE_DRV_DIR_32)
150	$(RM) $@; $(SYMLINK) $(CONFFILE_SOFTLINK) $@
151
152
153#
154#	Include common targets.
155#
156include $(UTSBASE)/sun4u/chicago/Makefile.targ
157