xref: /titanic_44/usr/src/uts/sparc/usba/Makefile (revision be468fc6d7266e97f1330ad9a761169925f5f3f1)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# uts/sparc/usba/Makefile
26
27
28#
29#	This makefile drives the production of the usba kernel module.
30#
31#
32#	Path to the base of the uts directory tree (usually /usr/src/uts).
33#
34UTSBASE	= ../..
35
36#
37#	Define the module and object file sets.
38#
39MODULE		= usba
40OBJECTS		= $(USBA_OBJS:%=$(OBJS_DIR)/%)
41LINTS		= $(USBA_OBJS:%.o=$(LINTS_DIR)/%.ln)
42WARLOCK_OUT	= $(USBA_OBJS:%.o=%.ll)
43WARLOCK_OK	= $(MODULE).ok
44ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
45
46#
47#	Include common rules.
48#
49include $(UTSBASE)/sparc/Makefile.sparc
50
51#
52# lint pass one enforcement
53#
54CFLAGS += $(CCVERBOSE)
55
56CERRWARN	+= -_gcc=-Wno-uninitialized
57CERRWARN	+= -_gcc=-Wno-parentheses
58CERRWARN	+= -_gcc=-Wno-switch
59CERRWARN	+= -_gcc=-Wno-unused-label
60CERRWARN	+= -_gcc=-Wno-unused-value
61CERRWARN	+= -_gcc=-Wno-unused-variable
62
63#
64#	Define targets
65#
66ALL_TARGET	= $(BINARY)
67LINT_TARGET	= $(MODULE).lint
68INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
69
70.KEEP_STATE:
71
72all:		$(ALL_DEPS)
73
74def:		$(DEF_DEPS)
75
76clean:		$(CLEAN_DEPS); \
77                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
78
79clobber:	$(CLOBBER_DEPS); \
80                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
81
82lint:		$(LINT_DEPS)
83
84modlintlib:	$(MODLINTLIB_DEPS)
85
86clean.lint:	$(CLEAN_LINT_DEPS)
87
88install:	$(INSTALL_DEPS)
89
90#
91#	Include common targets.
92#
93include $(UTSBASE)/sparc/Makefile.targ
94
95#
96#	Defines for local commands.
97#
98WLCC		= wlcc
99TOUCH		= touch
100WARLOCK		= warlock
101
102#
103#	Warlock targets
104#
105
106USBA_FILES = $(USBA_OBJS:%.o=%.ll)
107
108warlock: $(MODULE).ok
109
110%.ok:	$(USBA_FILES)
111	$(TOUCH) $@
112
113%.ll: $(UTSBASE)/common/io/usb/usba/%.c
114	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
115