xref: /titanic_44/usr/src/uts/sparc/usbsprl/Makefile (revision f56c1286e5113aa46bd6e723da14d30c123153f2)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# uts/sparc/usbsprl/Makefile
24#
25# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28#pragma	ident	"%Z%%M%	%I%	%E% SMI"
29#
30#	This makefile drives the production of the Prolific USB Serial
31#	Adapter driver.
32#
33#	Path to the base of the uts directory tree (usually /usr/src/uts).
34#
35UTSBASE	= ../..
36
37#
38#	Define the module and object file sets.
39#
40MODULE		= usbsprl
41OBJECTS		= $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
42LINTS		= $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
43WARLOCK_OK	= $(MODULE).ok
44ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45
46#
47#	Include common rules.
48#
49include $(UTSBASE)/sparc/Makefile.sparc
50
51#
52# lint pass one enforcement
53#
54CFLAGS += $(CCVERBOSE)
55
56LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
57
58#
59#	Define targets
60#
61ALL_TARGET	= $(BINARY)
62LINT_TARGET	= $(MODULE).lint
63INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
64
65.KEEP_STATE:
66
67all:		$(ALL_DEPS)
68
69def:		$(DEF_DEPS)
70
71clean:		$(CLEAN_DEPS); \
72                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
73
74clobber:	$(CLOBBER_DEPS); \
75                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
76
77lint:		$(LINT_DEPS)
78
79modlintlib:	$(MODLINTLIB_DEPS)
80
81clean.lint:	$(CLEAN_LINT_DEPS)
82
83install:	$(INSTALL_DEPS)
84
85#
86#	Include common targets.
87#
88include $(UTSBASE)/sparc/Makefile.targ
89
90#
91#	Defines for local commands.
92#
93WLCC		= wlcc
94TOUCH		= touch
95WARLOCK		= warlock
96SCCS		= sccs
97TEST		= test
98
99#
100#	warlock
101#
102WARLOCK_OUT	= usbser_pl2303.ll pl2303_dsd.ll
103WARLOCK_CMD	= $(MODULE).wlcmd
104
105USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
106USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
107UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
108OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
109EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
110
111warlock: $(WARLOCK_OK) warlock_with_usba
112
113%.wlcmd:
114	$(TEST) -f $@ || $(SCCS) get $@
115
116$(WARLOCK_OK): warlock_with_usbser
117	$(TOUCH) $@
118
119%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
120	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
121
122warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files
123	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
124		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
125
126usbser_files:
127	@cd ../usbser; pwd; $(MAKE) usbser.ll
128
129warlock_with_usba: $(WARLOCK_CMD) $(WARLOCK_OUT) usbser_files \
130	usba_files ohci_files uhci_files ehci_files warlock_ddi.files
131	$(WARLOCK) -c usbsprl_with_usba.wlcmd \
132		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
133		$(USBSER_FILES) \
134		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
135
136usba_files:
137	@cd ../usba;pwd; $(MAKE) warlock
138
139uhci_files:
140	@cd ../uhci;pwd; $(MAKE) warlock
141
142ohci_files:
143	@cd ../ohci;pwd; $(MAKE) warlock
144
145ehci_files:
146	@cd ../ehci;pwd; $(MAKE) warlock
147
148warlock_ddi.files:
149	cd ../warlock; pwd; $(MAKE) warlock
150