xref: /titanic_44/usr/src/uts/intel/usbser/Makefile (revision 4a6ec905b96eb96a398c346f59e034a90ce8ad37)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# uts/intel/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)
43ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
44WARLOCK_OUT	= $(USBSER_OBJS:%.o=%.ll)
45WARLOCK_OK	= $(MODULE).ok
46WLCMD_DIR	= $(UTSBASE)/common/io/warlock
47
48#
49#	Include common rules.
50#
51include $(UTSBASE)/intel/Makefile.intel
52
53#
54# depends on misc/usba
55#
56LDFLAGS         += -dy -Nmisc/usba
57
58#
59#	Define targets
60#
61ALL_TARGET	= $(BINARY)
62LINT_TARGET	= $(MODULE).lint
63INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
64
65#
66# For now, disable these lint checks; maintainers should endeavor
67# to investigate and remove these for maximum lint coverage.
68# Please do not carry these forward to new Makefiles.
69#
70LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
71LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
72
73.KEEP_STATE:
74
75all:		$(ALL_DEPS)
76
77def:		$(DEF_DEPS)
78
79clean:		$(CLEAN_DEPS)
80		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
81
82clobber:	$(CLOBBER_DEPS)
83		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
84
85lint:		$(LINT_DEPS)
86
87modlintlib:	$(MODLINTLIB_DEPS)
88
89clean.lint:	$(CLEAN_LINT_DEPS)
90
91install:	$(INSTALL_DEPS)
92
93#
94#	Include common targets.
95#
96include $(UTSBASE)/intel/Makefile.targ
97
98#
99#	Defines for local commands.
100#
101WLCC		= wlcc
102TOUCH		= touch
103WARLOCK		= warlock
104TEST		= test
105
106#
107#	Warlock
108#
109WARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
110
111warlock: $(WARLOCK_OK)
112
113$(WARLOCK_OK):	$(WARLOCK_OUT) $(WARLOCK_CMD) warlock_ddi.files
114	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
115		-l ../warlock/ddi_dki_impl.ll
116	$(TOUCH) $@
117
118%.ll: $(UTSBASE)/common/io/usb/clients/usbser/%.c
119	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
120
121warlock_ddi.files:
122	cd ../warlock; pwd; $(MAKE) warlock
123