xref: /titanic_44/usr/src/uts/sparc/usbftdi/Makefile (revision e2c88f0c2610f16de7b639746b40dea5f3e2256e)
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/sparc/usbftdi/Makefile
23de81e71eSTim Marsland# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24de81e71eSTim Marsland# Use is subject to license terms.
25de81e71eSTim Marsland#
26*e2c88f0cSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
27de81e71eSTim Marsland#
28de81e71eSTim Marsland#	This makefile drives the production of the FT232R USB Serial
29de81e71eSTim Marsland#	Adapter driver.
30de81e71eSTim Marsland#
31de81e71eSTim Marsland#	Path to the base of the uts directory tree (usually /usr/src/uts).
32de81e71eSTim Marsland#
33de81e71eSTim MarslandUTSBASE	= ../..
34de81e71eSTim Marsland
35de81e71eSTim Marsland#
36de81e71eSTim Marsland#	Define the module and object file sets.
37de81e71eSTim Marsland#
38de81e71eSTim MarslandMODULE		= usbftdi
39de81e71eSTim MarslandOBJECTS		= $(USBFTDI_OBJS:%=$(OBJS_DIR)/%)
40de81e71eSTim MarslandLINTS		= $(USBFTDI_OBJS:%.o=$(LINTS_DIR)/%.ln)
41de81e71eSTim MarslandWARLOCK_OUT     = $(USBFTDI_OBJS:%.o=%.ll)
42de81e71eSTim MarslandWARLOCK_OK	= $(MODULE).ok
4340a3f5ceSTim MarslandROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44de81e71eSTim MarslandCONF_SRCDIR	= $(UTSBASE)/common/io/usb/clients/usbser/usbftdi
45de81e71eSTim MarslandWLCMD_DIR	= $(UTSBASE)/common/io/warlock
46de81e71eSTim Marsland
47de81e71eSTim Marsland#
48de81e71eSTim Marsland#	Include common rules.
49de81e71eSTim Marsland#
50de81e71eSTim Marslandinclude $(UTSBASE)/sparc/Makefile.sparc
51de81e71eSTim Marsland
527014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
537014882cSRichard Lowe
54de81e71eSTim MarslandLDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
55de81e71eSTim Marsland
56de81e71eSTim Marsland#
57de81e71eSTim Marsland#	Define targets
58de81e71eSTim Marsland#
59de81e71eSTim MarslandALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
60de81e71eSTim MarslandLINT_TARGET	= $(MODULE).lint
61de81e71eSTim MarslandINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
62de81e71eSTim Marsland
63de81e71eSTim Marsland.KEEP_STATE:
64de81e71eSTim Marsland
65de81e71eSTim Marslandall:		$(ALL_DEPS)
66de81e71eSTim Marsland
67de81e71eSTim Marslanddef:		$(DEF_DEPS)
68de81e71eSTim Marsland
69de81e71eSTim Marslandclean:		$(CLEAN_DEPS)
70de81e71eSTim Marsland		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
71de81e71eSTim Marsland
72de81e71eSTim Marslandclobber:	$(CLOBBER_DEPS)
73de81e71eSTim Marsland		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
74de81e71eSTim Marsland
75de81e71eSTim Marslandlint:		$(LINT_DEPS)
76de81e71eSTim Marsland
77de81e71eSTim Marslandmodlintlib:	$(MODLINTLIB_DEPS)
78de81e71eSTim Marsland
79de81e71eSTim Marslandclean.lint:	$(CLEAN_LINT_DEPS)
80de81e71eSTim Marsland
81de81e71eSTim Marslandinstall:	$(INSTALL_DEPS)
82de81e71eSTim Marsland
83de81e71eSTim Marsland#
84de81e71eSTim Marsland#	Include common targets.
85de81e71eSTim Marsland#
86de81e71eSTim Marslandinclude $(UTSBASE)/sparc/Makefile.targ
87de81e71eSTim Marsland
88de81e71eSTim Marsland#
89de81e71eSTim Marsland#	Defines for local commands.
90de81e71eSTim Marsland#
91de81e71eSTim MarslandWLCC		= wlcc
92de81e71eSTim MarslandTOUCH		= touch
93de81e71eSTim MarslandWARLOCK		= warlock
94de81e71eSTim MarslandTEST		= test
95de81e71eSTim Marsland
96de81e71eSTim Marsland#
97de81e71eSTim Marsland#	warlock
98de81e71eSTim Marsland#
99de81e71eSTim MarslandWARLOCK_CMD	= $(WLCMD_DIR)/$(MODULE).wlcmd
100de81e71eSTim MarslandUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
101*e2c88f0cSGarrett D'AmoreUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
102de81e71eSTim MarslandUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
103de81e71eSTim MarslandOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
104de81e71eSTim MarslandEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
105de81e71eSTim Marsland
106de81e71eSTim Marslandwarlock: $(WARLOCK_OK)
107de81e71eSTim Marsland
108de81e71eSTim Marsland$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
109de81e71eSTim Marsland	$(TOUCH) $@
110de81e71eSTim Marsland
111de81e71eSTim Marsland%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbftdi/%.c
112de81e71eSTim Marsland	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
113de81e71eSTim Marsland
114de81e71eSTim Marslandwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
115de81e71eSTim Marsland	$(WARLOCK_CMD)
116de81e71eSTim Marsland	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
117de81e71eSTim Marsland		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
118de81e71eSTim Marsland
119de81e71eSTim Marslandwarlock_with_usba:  $(WARLOCK_OUT) usbser_files \
120de81e71eSTim Marsland	$(WLCMD_DIR)/usbftdi_with_usba.wlcmd usba_files ohci_files uhci_files \
121de81e71eSTim Marsland	ehci_files warlock_ddi.files
122de81e71eSTim Marsland	$(WARLOCK) -c $(WLCMD_DIR)/usbftdi_with_usba.wlcmd \
123de81e71eSTim Marsland		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
124de81e71eSTim Marsland		$(USBSER_FILES) \
125de81e71eSTim Marsland		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
126de81e71eSTim Marsland
127de81e71eSTim Marslandusbser_files:
128de81e71eSTim Marsland	@cd ../usbser; pwd; $(MAKE) warlock
129de81e71eSTim Marsland
130de81e71eSTim Marslandusba_files:
131de81e71eSTim Marsland	@cd ../usba;pwd; $(MAKE) warlock
132de81e71eSTim Marsland
133de81e71eSTim Marslanduhci_files:
134de81e71eSTim Marsland	@cd ../uhci;pwd; $(MAKE) warlock
135de81e71eSTim Marsland
136de81e71eSTim Marslandohci_files:
137de81e71eSTim Marsland	@cd ../ohci;pwd; $(MAKE) warlock
138de81e71eSTim Marsland
139de81e71eSTim Marslandehci_files:
140de81e71eSTim Marsland	@cd ../ehci;pwd; $(MAKE) warlock
141de81e71eSTim Marsland
142de81e71eSTim Marslandwarlock_ddi.files:
143de81e71eSTim Marsland	cd ../warlock; pwd; $(MAKE) warlock
144