xref: /titanic_44/usr/src/uts/sparc/usbvc/Makefile (revision 489b7c4ab76ae8df137fbfcc2214f7baa52883a0)
1c77a61a7Syz147069#
2c77a61a7Syz147069# CDDL HEADER START
3c77a61a7Syz147069#
4c77a61a7Syz147069# The contents of this file are subject to the terms of the
5c77a61a7Syz147069# Common Development and Distribution License (the "License").
6c77a61a7Syz147069# You may not use this file except in compliance with the License.
7c77a61a7Syz147069#
8c77a61a7Syz147069# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c77a61a7Syz147069# or http://www.opensolaris.org/os/licensing.
10c77a61a7Syz147069# See the License for the specific language governing permissions
11c77a61a7Syz147069# and limitations under the License.
12c77a61a7Syz147069#
13c77a61a7Syz147069# When distributing Covered Code, include this CDDL HEADER in each
14c77a61a7Syz147069# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c77a61a7Syz147069# If applicable, add the following below this CDDL HEADER, with the
16c77a61a7Syz147069# fields enclosed by brackets "[]" replaced with your own identifying
17c77a61a7Syz147069# information: Portions Copyright [yyyy] [name of copyright owner]
18c77a61a7Syz147069#
19c77a61a7Syz147069# CDDL HEADER END
20c77a61a7Syz147069#
21c77a61a7Syz147069
22c77a61a7Syz147069#
23*489b7c4aSRaymond Chen# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24c77a61a7Syz147069# Use is subject to license terms.
25c77a61a7Syz147069#
26c77a61a7Syz147069
27c77a61a7Syz147069#
28c77a61a7Syz147069# uts/sparc/usbvc/Makefile
29c77a61a7Syz147069#	This makefile drives the production of the usbvc kernel driver.
30c77a61a7Syz147069#
31c77a61a7Syz147069#	sparc architecture dependent
32c77a61a7Syz147069#
33c77a61a7Syz147069
34c77a61a7Syz147069#
35c77a61a7Syz147069#	Path to the base of the uts directory tree (usually /usr/src/uts).
36c77a61a7Syz147069#
37c77a61a7Syz147069UTSBASE	= ../..
38c77a61a7Syz147069
39c77a61a7Syz147069#
40c77a61a7Syz147069#	Define the module and object file sets.
41c77a61a7Syz147069#
42c77a61a7Syz147069MODULE		= usbvc
43c77a61a7Syz147069OBJECTS		= $(USBVC_OBJS:%=$(OBJS_DIR)/%)
44c77a61a7Syz147069LINTS		= $(USBVC_OBJS:%.o=$(LINTS_DIR)/%.ln)
45c77a61a7Syz147069ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
46c77a61a7Syz147069WARLOCK_OUT	= $(USBVC_OBJS:%.o=%.ll)
47c77a61a7Syz147069WARLOCK_OK	= $(MODULE).ok
48c77a61a7Syz147069WLCMD_DIR       = $(UTSBASE)/common/io/warlock
49c77a61a7Syz147069
50c77a61a7Syz147069#
51c77a61a7Syz147069#	Include common rules.
52c77a61a7Syz147069#
53c77a61a7Syz147069include $(UTSBASE)/sparc/Makefile.sparc
54c77a61a7Syz147069
55c77a61a7Syz147069#
56c77a61a7Syz147069# lint pass one enforcement
57c77a61a7Syz147069#
58c77a61a7Syz147069CFLAGS += $(CCVERBOSE)
59c77a61a7Syz147069
60c77a61a7Syz147069#
61c77a61a7Syz147069# depends on misc/usba
62c77a61a7Syz147069LDFLAGS		+= -dy -Nmisc/usba
63c77a61a7Syz147069
64c77a61a7Syz147069#
65c77a61a7Syz147069#	Define targets
66c77a61a7Syz147069#
67c77a61a7Syz147069ALL_TARGET	= $(BINARY)
68c77a61a7Syz147069LINT_TARGET	= $(MODULE).lint
69c77a61a7Syz147069INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
70c77a61a7Syz147069
71c77a61a7Syz147069#
72c77a61a7Syz147069# Disable this because it is necessary for this driver
73c77a61a7Syz147069# and it is surely safe
74c77a61a7Syz147069#
75c77a61a7Syz147069LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
76c77a61a7Syz147069
77c77a61a7Syz147069.KEEP_STATE:
78c77a61a7Syz147069
79c77a61a7Syz147069all:		$(ALL_DEPS)
80c77a61a7Syz147069
81c77a61a7Syz147069def:		$(DEF_DEPS)
82c77a61a7Syz147069
83c77a61a7Syz147069clean:		$(CLEAN_DEPS)
84c77a61a7Syz147069		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
85c77a61a7Syz147069
86c77a61a7Syz147069clobber:	$(CLOBBER_DEPS)
87c77a61a7Syz147069		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88c77a61a7Syz147069
89c77a61a7Syz147069lint:		$(LINT_DEPS)
90c77a61a7Syz147069
91c77a61a7Syz147069modlintlib:	$(MODLINTLIB_DEPS)
92c77a61a7Syz147069
93c77a61a7Syz147069clean.lint:	$(CLEAN_LINT_DEPS)
94c77a61a7Syz147069
95c77a61a7Syz147069install:	$(INSTALL_DEPS)
96c77a61a7Syz147069
97c77a61a7Syz147069#
98c77a61a7Syz147069#	Include common targets.
99c77a61a7Syz147069#
100c77a61a7Syz147069include $(UTSBASE)/sparc/Makefile.targ
101c77a61a7Syz147069
102c77a61a7Syz147069#
103c77a61a7Syz147069#	Defines for local commands.
104c77a61a7Syz147069#
105c77a61a7Syz147069WARLOCK		= warlock
106c77a61a7Syz147069WLCC		= wlcc
107c77a61a7Syz147069TOUCH		= touch
108c77a61a7Syz147069TEST		= test
109c77a61a7Syz147069
110c77a61a7Syz147069#
111c77a61a7Syz147069#	lock_lint rules
112c77a61a7Syz147069#
113*489b7c4aSRaymond ChenUSBA_FILES = $(USBA_WITHOUT_WUSB_OBJS:%.o=../usba/%.ll)
114c77a61a7Syz147069UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
115c77a61a7Syz147069OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
116c77a61a7Syz147069EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
117c77a61a7Syz147069
118c77a61a7Syz147069warlock: $(WARLOCK_OK) warlock_with_usba
119c77a61a7Syz147069
120bf56214cSstevel$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usbvc.wlcmd warlock_ddi.files
121c77a61a7Syz147069	$(WARLOCK) -c $(WLCMD_DIR)/usbvc.wlcmd $(WARLOCK_OUT)  \
122c77a61a7Syz147069		-l ../warlock/ddi_dki_impl.ll
123c77a61a7Syz147069	$(TOUCH) $@
124c77a61a7Syz147069
125c77a61a7Syz147069%.ll: $(UTSBASE)/common/io/usb/clients/video/usbvc/%.c \
126c77a61a7Syz147069		$(UTSBASE)/common/sys/usb/clients/video/usbvc/usbvc_var.h
127c77a61a7Syz147069	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
128c77a61a7Syz147069
129bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usbvc_with_usba.wlcmd $(WARLOCK_OUT) \
130bf56214cSstevel	usba_files ohci_files ehci_files uhci_files warlock_ddi.files
131c77a61a7Syz147069	$(WARLOCK) -c $(WLCMD_DIR)/usbvc_with_usba.wlcmd \
132c77a61a7Syz147069		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
133c77a61a7Syz147069		$(WARLOCK_OUT) \
134c77a61a7Syz147069	-l ../warlock/ddi_dki_impl.ll
135c77a61a7Syz147069
136c77a61a7Syz147069usba_files:
137c77a61a7Syz147069	@cd ../usba;pwd; $(MAKE) warlock
138c77a61a7Syz147069
139c77a61a7Syz147069uhci_files:
140c77a61a7Syz147069	@cd ../uhci;pwd; $(MAKE) warlock
141c77a61a7Syz147069
142c77a61a7Syz147069ohci_files:
143c77a61a7Syz147069	@cd ../ohci;pwd; $(MAKE) warlock
144c77a61a7Syz147069
145c77a61a7Syz147069ehci_files:
146c77a61a7Syz147069	@cd ../ehci;pwd; $(MAKE) warlock
147c77a61a7Syz147069
148c77a61a7Syz147069warlock_ddi.files:
149c77a61a7Syz147069	cd ../warlock; pwd; $(MAKE) warlock
150