xref: /titanic_41/usr/src/uts/sparc/usbser/Makefile (revision 948f2876ce2a3010558f4f6937e16086ebcd36f2)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# uts/sparc/usbser/Makefile
26
27#ident	"%Z%%M%	%I%	%E% SMI"
28
29#
30#	This makefile drives the production of the usbser kernel module.
31#
32#
33#	Path to the base of the uts directory tree (usually /usr/src/uts).
34#
35UTSBASE	= ../..
36
37#
38#	Define the module and object file sets.
39#
40MODULE		= usbser
41OBJECTS		= $(USBSER_OBJS:%=$(OBJS_DIR)/%)
42LINTS		= $(USBSER_OBJS:%.o=$(LINTS_DIR)/%.ln)
43WARLOCK_OUT	= $(USBSER_OBJS:%.o=%.ll)
44WARLOCK_OK	= $(MODULE).ok
45ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
46WLCMD_DIR       = $(UTSBASE)/common/io/warlock
47
48#
49#	Include common rules.
50#
51include $(UTSBASE)/sparc/Makefile.sparc
52
53#
54# lint pass one enforcement
55#
56CFLAGS += $(CCVERBOSE)
57
58#
59# depends on misc/usba
60#
61LDFLAGS         += -dy -Nmisc/usba
62
63#
64#	Define targets
65#
66ALL_TARGET	= $(BINARY)
67LINT_TARGET	= $(MODULE).lint
68INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
69
70#
71# For now, disable these lint checks; maintainers should endeavor
72# to investigate and remove these for maximum lint coverage.
73# Please do not carry these forward to new Makefiles.
74#
75LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
76LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
77
78.KEEP_STATE:
79
80all:		$(ALL_DEPS)
81
82def:		$(DEF_DEPS)
83
84clean:		$(CLEAN_DEPS)
85		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
86
87clobber:	$(CLOBBER_DEPS)
88		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
89
90lint:		$(LINT_DEPS)
91
92modlintlib:	$(MODLINTLIB_DEPS)
93
94clean.lint:	$(CLEAN_LINT_DEPS)
95
96install:	$(INSTALL_DEPS)
97
98#
99#	Include common targets.
100#
101include $(UTSBASE)/sparc/Makefile.targ
102
103#
104#	Defines for local commands.
105#
106WLCC		= wlcc
107SCCS		= sccs
108TOUCH		= touch
109WARLOCK		= warlock
110TEST		= test
111
112#
113#	Warlock
114#
115WARLOCK_CMD	= $(MODULE).wlcmd
116
117%.wlcmd:
118	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
119
120warlock: $(WARLOCK_OK)
121
122$(WARLOCK_OK):	$(WARLOCK_OUT) $(WARLOCK_CMD) warlock_ddi.files
123	$(WARLOCK) -c $(WLCMD_DIR)/$(WARLOCK_CMD) $(WARLOCK_OUT) \
124		-l ../warlock/ddi_dki_impl.ll
125	$(TOUCH) $@
126
127%.ll: $(UTSBASE)/common/io/usb/clients/usbser/%.c
128	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
129
130warlock_ddi.files:
131	cd ../warlock; pwd; $(MAKE) warlock
132