xref: /titanic_41/usr/src/uts/sparc/usbsksp/Makefile (revision 66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24)
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#
24# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# uts/sparc/usbsksp/Makefile
28
29#pragma ident	"%Z%%M%	%I%	%E% SMI"
30
31#
32#	This makefile drives the production of the Keyspan USB Serial
33#	Adapter driver.
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39#
40#	Define the module and object file sets.
41#
42MODULE		= usbsksp
43OBJECTS		= $(USBSER_KEYSPAN_OBJS:%=$(OBJS_DIR)/%)
44LINTS		= $(USBSER_KEYSPAN_OBJS:%.o=$(LINTS_DIR)/%.ln)
45WARLOCK_OK	= $(MODULE).ok
46ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
47
48#
49#	Include common rules.
50#
51include $(UTSBASE)/sparc/Makefile.sparc
52
53#
54# lint pass one enforcement
55#
56CFLAGS += $(CCVERBOSE)
57
58LDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser -Nmisc/usbs49_fw
59
60#
61#	Define targets
62#
63ALL_TARGET	= $(BINARY)
64LINT_TARGET	= $(MODULE).lint
65INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
66
67.KEEP_STATE:
68
69all:		$(ALL_DEPS)
70
71def:		$(DEF_DEPS)
72
73clean:		$(CLEAN_DEPS); \
74                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
75
76clobber:	$(CLOBBER_DEPS); \
77                $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
78
79lint:		$(LINT_DEPS)
80
81modlintlib:	$(MODLINTLIB_DEPS)
82
83clean.lint:	$(CLEAN_LINT_DEPS)
84
85install:	$(INSTALL_DEPS)
86
87#
88#	Include common targets.
89#
90include $(UTSBASE)/sparc/Makefile.targ
91
92#
93#	Defines for local commands.
94#
95WLCC		= wlcc
96TOUCH		= touch
97WARLOCK		= warlock
98SCCS		= sccs
99TEST		= test
100
101#
102#	warlock
103#
104WARLOCK_OUT	= usbser_keyspan.ll keyspan_dsd.ll \
105		  keyspan_pipe.ll
106WARLOCK_CMD	= usbser_keyspan.wlcmd
107
108USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
109USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
110UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
111OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
112EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
113
114warlock: $(WARLOCK_OK) warlock_with_usba
115
116%.wlcmd:
117	$(TEST) -f $@ || $(SCCS) get $@
118
119$(WARLOCK_OK): warlock_with_usbser
120	$(TOUCH) $@
121
122%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
123	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
124
125warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files
126	$(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
127		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
128
129usbser_files:
130	@cd ../usbser; pwd; $(MAKE) usbser.ll
131
132warlock_with_usba: $(WARLOCK_CMD) $(WARLOCK_OUT) usbser_files \
133	usba_files ohci_files uhci_files ehci_files warlock_ddi.files
134	$(WARLOCK) -c usbser_keyspan_with_usba.wlcmd \
135		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
136		$(USBSER_FILES) \
137		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
138
139usba_files:
140	@cd ../usba;pwd; $(MAKE) warlock
141
142uhci_files:
143	@cd ../uhci;pwd; $(MAKE) warlock
144
145ohci_files:
146	@cd ../ohci;pwd; $(MAKE) warlock
147
148ehci_files:
149	@cd ../ehci;pwd; $(MAKE) warlock
150
151warlock_ddi.files:
152	cd ../warlock; pwd; $(MAKE) warlock
153