xref: /titanic_41/usr/src/uts/sparc/sata/Makefile (revision 693e4d84eb49b987c3d66cbcd4b13a5c6e9059bf)
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 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27#
28# uts/sparc/sata/Makefile
29#
30#	This makefile drives the production of the sata "misc"
31#	kernel module.
32#
33#	sparc 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		= sata
45OBJECTS		= $(SATA_OBJS:%=$(OBJS_DIR)/%)
46LINTS		= $(SATA_OBJS:%.o=$(LINTS_DIR)/%.ln)
47WARLOCK_OUT     = $(SATA_OBJS:%.o=%.ll)
48WARLOCK_OK      = $(MODULE).ok
49ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
50
51#
52#	Include common rules.
53#
54include $(UTSBASE)/sparc/Makefile.sparc
55
56#
57#	Define targets
58#
59ALL_TARGET	= $(BINARY)
60LINT_TARGET	= $(MODULE).lint
61INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
62
63#
64#	Overrides.
65#
66DEBUG_FLGS	=
67DEBUG_DEFS	+= $(DEBUG_FLGS)
68
69#
70# lint pass one enforcement
71#
72CFLAGS += $(CCVERBOSE)
73
74#
75#	Default build targets.
76#
77.KEEP_STATE:
78
79def:		$(DEF_DEPS)
80
81all:		$(ALL_DEPS)
82
83clean:		$(CLEAN_DEPS); \
84		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
85
86clobber:	$(CLOBBER_DEPS); \
87		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88
89lint:		$(LINT_DEPS)
90
91modlintlib:	$(MODLINTLIB_DEPS)
92
93clean.lint:	$(CLEAN_LINT_DEPS)
94
95install:	$(INSTALL_DEPS)
96
97CERRWARN	+= -_gcc=-Wno-parentheses
98CERRWARN	+= -_gcc=-Wno-unused-label
99CERRWARN	+= -_gcc=-Wno-unused-function
100CERRWARN	+= -_gcc=-Wno-unused-variable
101CERRWARN	+= -_gcc=-Wno-uninitialized
102CERRWARN	+= -_gcc=-Wno-empty-body
103
104#
105#	Include common targets.
106#
107include $(UTSBASE)/sparc/Makefile.targ
108
109#
110#       Defines for local commands.
111#
112WLCC            = wlcc
113TOUCH           = touch
114WARLOCK         = warlock
115
116#
117#       Warlock targets
118#
119
120SATA_FILES = $(SATA_OBJS:%.o=%.ll)
121
122warlock: $(MODULE).ok
123
124%.ok:   $(SATA_FILES)
125	$(TOUCH) $@
126
127%.ll: $(UTSBASE)/common/io/sata/impl/%.c
128	$(WLCC) $(CPPFLAGS) -D __sparcv9 -DDEBUG -o $@ $<
129