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