xref: /titanic_41/usr/src/uts/sun4u/zuluvm/Makefile (revision 25cf1a301a396c38e8adf52c15f537b80d2483f7)
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# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28#	This makefile drives the production of the zulunvm
29#	mics module
30#
31#	sun4u implementation architecture dependent
32#
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39#
40#	Define the module and object file sets.
41#
42MODULE		= zuluvm
43OBJECTS		= $(ZULUVM_OBJS:%=$(OBJS_DIR)/%)
44LINTS		= $(ZULUVM_OBJS:%.o=$(LINTS_DIR)/%.ln)
45ROOTMODULE	= $(ROOT_PSM_MISC_DIR)/$(MODULE)
46
47#
48#	Include common rules.
49#
50include $(UTSBASE)/sun4u/Makefile.sun4u
51
52#
53#	Override defaults to build a unique, local modstubs.o.
54#
55MODSTUBS_DIR	 = .
56$(MODSTUBS_O)	:= AS_CPPFLAGS += -DZULU_MISC_MODULE
57
58CLEANFILES	+= $(MODSTUBS_O)
59
60#
61#	Define targets
62#
63ALL_TARGET	= $(BINARY)
64LINT_TARGET	= $(MODULE).lint
65INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
66
67ZULUVM_OFFSETS		= $(UTSBASE)/sun4u/zuluvm/zuluvm_offsets.in
68ZULUVM_OFFSETS_H	= $(OBJS_DIR)/zuluvm_offsets.h
69
70ZULUVM_STATS = -DZULUVM_STATS
71
72#
73# We turn off tnf probes for opt builds.
74#
75PROBE_FLAGS_OBJ64 = -DNPROBE
76
77#
78# lint pass one enforcement
79#
80CFLAGS += $(CCVERBOSE) $(ZULUVM_STATS) $(PROBE_FLAGS_$(BUILD_TYPE))
81ASFLAGS += $(ZULUVM_STATS)
82LINTFLAGS += -I$(OBJS_DIR)
83
84#
85#	Default build targets.
86#
87.KEEP_STATE:
88
89def:		$(DEF_DEPS)
90
91all:		$(ALL_DEPS)
92
93clean:		$(CLEAN_DEPS)
94
95clobber:	$(CLOBBER_DEPS)
96
97lint:		$(LINT_DEPS)
98
99modlintlib:	$(MODLINTLIB_DEPS) lint64
100
101clean.lint:	$(CLEAN_LINT_DEPS)
102
103install:	$(INSTALL_DEPS)
104
105#
106# Special rules for generating assym.h for inclusion in assembly files
107#
108#$(DSF_DIR)/$(OBJS_DIR)/assym.h: FRC
109#	@cd $(DSF_DIR); $(MAKE) all.targ
110#
111AS_INC_PATH	+= -I$(OBJS_DIR)
112
113ZULUVM_DEPS	+= zulu_hat_asm.o zulu_asm.o zulu_asm.ln
114
115CLEANFILES	+= $(ZULUVM_OFFSETS_H) $(ZULUVM_OFFSETS_OUT)
116
117$(ZULUVM_DEPS:%=$(OBJS_DIR)/%):	$(ZULUVM_OFFSETS_H)
118
119$(ZULUVM_OFFSETS_H): $(ZULUVM_OFFSETS)
120	$(OFFSETS_CREATE) <$(ZULUVM_OFFSETS) >$@
121
122#
123#	Include common targets.
124#
125include $(UTSBASE)/sun4u/Makefile.targ
126