xref: /illumos-gate/usr/src/uts/intel/usb_ia/Makefile (revision 489b7c4ab76ae8df137fbfcc2214f7baa52883a0)
1d73ae94eSgc161489#
2d73ae94eSgc161489# CDDL HEADER START
3d73ae94eSgc161489#
4d73ae94eSgc161489# The contents of this file are subject to the terms of the
5d73ae94eSgc161489# Common Development and Distribution License (the "License").
6d73ae94eSgc161489# You may not use this file except in compliance with the License.
7d73ae94eSgc161489#
8d73ae94eSgc161489# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9d73ae94eSgc161489# or http://www.opensolaris.org/os/licensing.
10d73ae94eSgc161489# See the License for the specific language governing permissions
11d73ae94eSgc161489# and limitations under the License.
12d73ae94eSgc161489#
13d73ae94eSgc161489# When distributing Covered Code, include this CDDL HEADER in each
14d73ae94eSgc161489# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15d73ae94eSgc161489# If applicable, add the following below this CDDL HEADER, with the
16d73ae94eSgc161489# fields enclosed by brackets "[]" replaced with your own identifying
17d73ae94eSgc161489# information: Portions Copyright [yyyy] [name of copyright owner]
18d73ae94eSgc161489#
19d73ae94eSgc161489# CDDL HEADER END
20d73ae94eSgc161489#
21d73ae94eSgc161489#
22d73ae94eSgc161489# uts/intel/usb_ia/Makefile
23*489b7c4aSRaymond Chen# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24d73ae94eSgc161489# Use is subject to license terms.
25d73ae94eSgc161489#
26d73ae94eSgc161489#
27d73ae94eSgc161489#	This makefile drives the production of the usb_ia driver kernel module.
28d73ae94eSgc161489#
29d73ae94eSgc161489
30d73ae94eSgc161489#
31d73ae94eSgc161489#	Path to the base of the uts directory tree (usually /usr/src/uts).
32d73ae94eSgc161489#
33d73ae94eSgc161489UTSBASE	= ../..
34d73ae94eSgc161489
35d73ae94eSgc161489#
36d73ae94eSgc161489#	Define the module and object file sets.
37d73ae94eSgc161489#
38d73ae94eSgc161489MODULE		= usb_ia
39d73ae94eSgc161489OBJECTS		= $(USB_IA_OBJS:%=$(OBJS_DIR)/%)
40d73ae94eSgc161489LINTS		= $(USB_IA_OBJS:%.o=$(LINTS_DIR)/%.ln)
41d73ae94eSgc161489ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42d73ae94eSgc161489WARLOCK_OUT	= $(USB_IA_OBJS:%.o=%.ll)
43d73ae94eSgc161489WARLOCK_OK	= $(MODULE).ok
44d73ae94eSgc161489WLCMD_DIR	= $(UTSBASE)/common/io/warlock
45d73ae94eSgc161489
46d73ae94eSgc161489#
47d73ae94eSgc161489#	Include common rules.
48d73ae94eSgc161489#
49d73ae94eSgc161489include $(UTSBASE)/intel/Makefile.intel
50d73ae94eSgc161489
51d73ae94eSgc161489#
52d73ae94eSgc161489#	Define targets
53d73ae94eSgc161489#
54d73ae94eSgc161489ALL_TARGET	= $(BINARY)
55d73ae94eSgc161489LINT_TARGET	= $(MODULE).lint
56d73ae94eSgc161489INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
57d73ae94eSgc161489
58d73ae94eSgc161489#
59d73ae94eSgc161489#	Override defaults to build a unique, local modstubs.o.
60d73ae94eSgc161489#
61d73ae94eSgc161489MODSTUBS_DIR	 = $(OBJS_DIR)
62d73ae94eSgc161489CLEANFILES	+= $(MODSTUBS_O)
63d73ae94eSgc161489
64d73ae94eSgc161489#
65d73ae94eSgc161489# depends on misc/usba
66d73ae94eSgc161489#
67d73ae94eSgc161489LDFLAGS         += -dy -Nmisc/usba
68d73ae94eSgc161489
69d73ae94eSgc161489#
70d73ae94eSgc161489#	Default build targets.
71d73ae94eSgc161489#
72d73ae94eSgc161489.KEEP_STATE:
73d73ae94eSgc161489
74d73ae94eSgc161489def:		$(DEF_DEPS)
75d73ae94eSgc161489
76d73ae94eSgc161489all:		$(ALL_DEPS)
77d73ae94eSgc161489
78d73ae94eSgc161489clean:		$(CLEAN_DEPS)
79d73ae94eSgc161489		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
80d73ae94eSgc161489
81d73ae94eSgc161489clobber:	$(CLOBBER_DEPS)
82d73ae94eSgc161489		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
83d73ae94eSgc161489
84d73ae94eSgc161489lint:		$(LINT_DEPS)
85d73ae94eSgc161489
86d73ae94eSgc161489modlintlib:	$(MODLINTLIB_DEPS)
87d73ae94eSgc161489
88d73ae94eSgc161489clean.lint:	$(CLEAN_LINT_DEPS)
89d73ae94eSgc161489
90d73ae94eSgc161489install:	$(INSTALL_DEPS)
91d73ae94eSgc161489
92d73ae94eSgc161489#
93d73ae94eSgc161489#	Include common targets.
94d73ae94eSgc161489#
95d73ae94eSgc161489include $(UTSBASE)/intel/Makefile.targ
96d73ae94eSgc161489
97d73ae94eSgc161489#
98d73ae94eSgc161489#	Defines for local commands.
99d73ae94eSgc161489#
100d73ae94eSgc161489WARLOCK		= warlock
101d73ae94eSgc161489WLCC		= wlcc
102d73ae94eSgc161489TOUCH		= touch
103d73ae94eSgc161489TEST		= test
104d73ae94eSgc161489
105d73ae94eSgc161489#
106d73ae94eSgc161489#	lock_lint rules
107d73ae94eSgc161489#
108*489b7c4aSRaymond ChenUSBA_FILES = $(USBA_WITHOUT_WUSB_OBJS:%.o=../usba/%.ll)
109d73ae94eSgc161489UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
110d73ae94eSgc161489OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
111d73ae94eSgc161489EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
112d73ae94eSgc161489
113d73ae94eSgc161489warlock: $(WARLOCK_OK) warlock_with_usba
114d73ae94eSgc161489
115bf56214cSstevel$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usb_ia.wlcmd warlock_ddi.files
116d73ae94eSgc161489	$(WARLOCK) -c $(WLCMD_DIR)/usb_ia.wlcmd $(WARLOCK_OUT)  \
117d73ae94eSgc161489		-l ../warlock/ddi_dki_impl.ll
118d73ae94eSgc161489	$(TOUCH) $@
119d73ae94eSgc161489
120d73ae94eSgc161489%.ll: $(UTSBASE)/common/io/usb/usb_ia/%.c \
121d73ae94eSgc161489		$(UTSBASE)/common/sys/usb/usb_ia/usb_iavar.h
122d73ae94eSgc161489	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
123d73ae94eSgc161489
124bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usb_ia_with_usba.wlcmd $(WARLOCK_OUT) \
125bf56214cSstevel	usba_files ohci_files ehci_files uhci_files warlock_ddi.files
126d73ae94eSgc161489	$(WARLOCK) -c $(WLCMD_DIR)/usb_ia_with_usba.wlcmd \
127d73ae94eSgc161489		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
128d73ae94eSgc161489		$(WARLOCK_OUT) \
129d73ae94eSgc161489		-l ../warlock/ddi_dki_impl.ll
130d73ae94eSgc161489
131d73ae94eSgc161489usba_files:
132d73ae94eSgc161489	@cd ../usba;pwd; $(MAKE) warlock
133d73ae94eSgc161489
134d73ae94eSgc161489uhci_files:
135d73ae94eSgc161489	@cd ../uhci;pwd; $(MAKE) warlock
136d73ae94eSgc161489
137d73ae94eSgc161489ohci_files:
138d73ae94eSgc161489	@cd ../ohci;pwd; $(MAKE) warlock
139d73ae94eSgc161489
140d73ae94eSgc161489ehci_files:
141d73ae94eSgc161489	@cd ../ehci;pwd; $(MAKE) warlock
142d73ae94eSgc161489
143d73ae94eSgc161489warlock_ddi.files:
144d73ae94eSgc161489	cd ../warlock; pwd; $(MAKE) warlock
145