xref: /titanic_44/usr/src/uts/intel/usbftdi/Makefile (revision 40a3f5ceaf3ada360988c7cbb70c66f2d5588da4)
1de81e71eSTim Marsland#
2de81e71eSTim Marsland# CDDL HEADER START
3de81e71eSTim Marsland#
4de81e71eSTim Marsland# The contents of this file are subject to the terms of the
5de81e71eSTim Marsland# Common Development and Distribution License (the "License").
6de81e71eSTim Marsland# You may not use this file except in compliance with the License.
7de81e71eSTim Marsland#
8de81e71eSTim Marsland# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9de81e71eSTim Marsland# or http://www.opensolaris.org/os/licensing.
10de81e71eSTim Marsland# See the License for the specific language governing permissions
11de81e71eSTim Marsland# and limitations under the License.
12de81e71eSTim Marsland#
13de81e71eSTim Marsland# When distributing Covered Code, include this CDDL HEADER in each
14de81e71eSTim Marsland# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15de81e71eSTim Marsland# If applicable, add the following below this CDDL HEADER, with the
16de81e71eSTim Marsland# fields enclosed by brackets "[]" replaced with your own identifying
17de81e71eSTim Marsland# information: Portions Copyright [yyyy] [name of copyright owner]
18de81e71eSTim Marsland#
19de81e71eSTim Marsland# CDDL HEADER END
20de81e71eSTim Marsland#
21de81e71eSTim Marsland#
22de81e71eSTim Marsland# uts/intel/usbftdi/Makefile
23de81e71eSTim Marsland# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24de81e71eSTim Marsland# Use is subject to license terms.
25de81e71eSTim Marsland#
26de81e71eSTim Marsland#
27de81e71eSTim Marsland#	This makefile drives the production of the FT232R USB Serial
28de81e71eSTim Marsland#	Adapter driver.
29de81e71eSTim Marsland#
30de81e71eSTim Marsland#	Path to the base of the uts directory tree (usually /usr/src/uts).
31de81e71eSTim Marsland#
32de81e71eSTim MarslandUTSBASE	= ../..
33de81e71eSTim Marsland
34de81e71eSTim Marsland#
35de81e71eSTim Marsland#	Define the module and object file sets.
36de81e71eSTim Marsland#
37de81e71eSTim MarslandMODULE		= usbftdi
38de81e71eSTim MarslandOBJECTS		= $(USBFTDI_OBJS:%=$(OBJS_DIR)/%)
39de81e71eSTim MarslandLINTS		= $(USBFTDI_OBJS:%.o=$(LINTS_DIR)/%.ln)
40de81e71eSTim MarslandWARLOCK_OUT     = $(USBFTDI_OBJS:%.o=%.ll)
41de81e71eSTim MarslandWARLOCK_OK	= $(MODULE).ok
42*40a3f5ceSTim MarslandROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
43de81e71eSTim MarslandCONF_SRCDIR	= $(UTSBASE)/common/io/usb/clients/usbser/usbftdi
44de81e71eSTim MarslandWLCMD_DIR	= $(UTSBASE)/common/io/warlock
45de81e71eSTim Marsland
46de81e71eSTim Marsland#
47de81e71eSTim Marsland#	Include common rules.
48de81e71eSTim Marsland#
49de81e71eSTim Marslandinclude $(UTSBASE)/intel/Makefile.intel
50de81e71eSTim Marsland
51de81e71eSTim MarslandLDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
52de81e71eSTim Marsland
53de81e71eSTim Marsland#
54de81e71eSTim Marsland#	Define targets
55de81e71eSTim Marsland#
56de81e71eSTim MarslandALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
57de81e71eSTim MarslandLINT_TARGET	= $(MODULE).lint
58de81e71eSTim MarslandINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
59de81e71eSTim Marsland
60de81e71eSTim Marsland.KEEP_STATE:
61de81e71eSTim Marsland
62de81e71eSTim Marslandall:		$(ALL_DEPS)
63de81e71eSTim Marsland
64de81e71eSTim Marslanddef:		$(DEF_DEPS)
65de81e71eSTim Marsland
66de81e71eSTim Marslandclean:		$(CLEAN_DEPS)
67de81e71eSTim Marsland		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
68de81e71eSTim Marsland
69de81e71eSTim Marslandclobber:	$(CLOBBER_DEPS)
70de81e71eSTim Marsland		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
71de81e71eSTim Marsland
72de81e71eSTim Marslandlint:		$(LINT_DEPS)
73de81e71eSTim Marsland
74de81e71eSTim Marslandmodlintlib:	$(MODLINTLIB_DEPS)
75de81e71eSTim Marsland
76de81e71eSTim Marslandclean.lint:	$(CLEAN_LINT_DEPS)
77de81e71eSTim Marsland
78de81e71eSTim Marslandinstall:	$(INSTALL_DEPS)
79de81e71eSTim Marsland
80de81e71eSTim Marsland#
81de81e71eSTim Marsland#	Include common targets.
82de81e71eSTim Marsland#
83de81e71eSTim Marslandinclude $(UTSBASE)/intel/Makefile.targ
84de81e71eSTim Marsland
85de81e71eSTim Marsland#
86de81e71eSTim Marsland#	Defines for local commands.
87de81e71eSTim Marsland#
88de81e71eSTim MarslandWLCC		= wlcc
89de81e71eSTim MarslandTOUCH		= touch
90de81e71eSTim MarslandWARLOCK		= warlock
91de81e71eSTim MarslandTEST		= test
92de81e71eSTim Marsland
93de81e71eSTim Marsland#
94de81e71eSTim Marsland#	warlock
95de81e71eSTim Marsland#
96de81e71eSTim MarslandWARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
97de81e71eSTim MarslandUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
98de81e71eSTim MarslandUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
99de81e71eSTim MarslandUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
100de81e71eSTim MarslandOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
101de81e71eSTim MarslandEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
102de81e71eSTim Marsland
103de81e71eSTim Marslandwarlock: $(WARLOCK_OK)
104de81e71eSTim Marsland
105de81e71eSTim Marsland$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
106de81e71eSTim Marsland	$(TOUCH) $@
107de81e71eSTim Marsland
108de81e71eSTim Marsland%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbftdi/%.c
109de81e71eSTim Marsland	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
110de81e71eSTim Marsland
111de81e71eSTim Marslandwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
112de81e71eSTim Marsland	$(WARLOCK_CMD)
113de81e71eSTim Marsland	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
114de81e71eSTim Marsland		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
115de81e71eSTim Marsland
116de81e71eSTim Marslandwarlock_with_usba:  $(WARLOCK_OUT) usbser_files \
117de81e71eSTim Marsland	$(WLCMD_DIR)/usbftdi_with_usba.wlcmd usba_files ohci_files uhci_files \
118de81e71eSTim Marsland	ehci_files warlock_ddi.files
119de81e71eSTim Marsland	$(WARLOCK) -c $(WLCMD_DIR)/usbftdi_with_usba.wlcmd \
120de81e71eSTim Marsland		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
121de81e71eSTim Marsland		$(USBSER_FILES) \
122de81e71eSTim Marsland		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
123de81e71eSTim Marsland
124de81e71eSTim Marslandusbser_files:
125de81e71eSTim Marsland	@cd ../usbser; pwd; $(MAKE) warlock
126de81e71eSTim Marsland
127de81e71eSTim Marslandusba_files:
128de81e71eSTim Marsland	@cd ../usba;pwd; $(MAKE) warlock
129de81e71eSTim Marsland
130de81e71eSTim Marslanduhci_files:
131de81e71eSTim Marsland	@cd ../uhci;pwd; $(MAKE) warlock
132de81e71eSTim Marsland
133de81e71eSTim Marslandohci_files:
134de81e71eSTim Marsland	@cd ../ohci;pwd; $(MAKE) warlock
135de81e71eSTim Marsland
136de81e71eSTim Marslandehci_files:
137de81e71eSTim Marsland	@cd ../ehci;pwd; $(MAKE) warlock
138de81e71eSTim Marsland
139de81e71eSTim Marslandwarlock_ddi.files:
140de81e71eSTim Marsland	cd ../warlock; pwd; $(MAKE) warlock
141