Makefile revision 3138:7bbdcbfa4cd5
150476Speter#
29958Sache# CDDL HEADER START
352379Sache#
452379Sache# The contents of this file are subject to the terms of the
59958Sache# Common Development and Distribution License (the "License").
677981Sache# You may not use this file except in compliance with the License.
777981Sache#
877981Sache# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
977981Sache# or http://www.opensolaris.org/os/licensing.
1077981Sache# See the License for the specific language governing permissions
1177981Sache# and limitations under the License.
1277981Sache#
1377981Sache# When distributing Covered Code, include this CDDL HEADER in each
1477981Sache# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1577981Sache# If applicable, add the following below this CDDL HEADER, with the
1677981Sache# fields enclosed by brackets "[]" replaced with your own identifying
1777981Sache# information: Portions Copyright [yyyy] [name of copyright owner]
1877981Sache#
1977981Sache# CDDL HEADER END
2077981Sache#
2177981Sache#
2277981Sache# uts/sparc/usbsprl/Makefile
2377981Sache#
2477981Sache# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2577981Sache# Use is subject to license terms.
2677981Sache#
2777981Sache#ident	"%Z%%M%	%I%	%E% SMI"
2877981Sache#
2977981Sache#	This makefile drives the production of the Prolific USB Serial
3077981Sache#	Adapter driver.
3177981Sache#
3277981Sache#	Path to the base of the uts directory tree (usually /usr/src/uts).
3377981Sache#
3477981SacheUTSBASE	= ../..
3577981Sache
3677981Sache#
3777981Sache#	Define the module and object file sets.
3877981Sache#
3952379SacheMODULE		= usbsprl
4052379SacheOBJECTS		= $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
4152379SacheLINTS		= $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
4252379SacheROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
4352379SacheWARLOCK_OUT     = $(USBSPRL_OBJS:%.o=%.ll)
4455012SacheWARLOCK_OK	= $(MODULE).ok
4552379SacheWLCMD_DIR       = $(UTSBASE)/common/io/warlock
4652379Sache
4752379Sache#
4877981Sache#	Include common rules.
4952379Sache#
5077985Sacheinclude $(UTSBASE)/sparc/Makefile.sparc
5177985Sache
5252379Sache# 
5352379Sache# lint pass one enforcement 
5452379Sache# 
5552379SacheCFLAGS += $(CCVERBOSE)
5652379Sache
5752379SacheLDFLAGS         += -dy -Nmisc/usba -Nmisc/usbser
5852379Sache
5952379Sache#
6052379Sache#	Define targets
6152379Sache#
6252379SacheALL_TARGET	= $(BINARY)
6352379SacheLINT_TARGET	= $(MODULE).lint
6452379SacheINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
6552379Sache
6677981Sache#
6777981Sache# For now, disable these lint checks; maintainers should endeavor
6852379Sache# to investigate and remove these for maximum lint coverage.
6952379Sache# Please do not carry these forward to new Makefiles.
7077981Sache#
7177981SacheLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
7277981Sache
7377981Sache.KEEP_STATE:
7452379Sache
7552379Sacheall:		$(ALL_DEPS)
7677981Sache
7777981Sachedef:		$(DEF_DEPS)
7877981Sache
7977981Sacheclean:		$(CLEAN_DEPS)
8052379Sache		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8152379Sache
8277981Sacheclobber:	$(CLOBBER_DEPS)
8377981Sache		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8477981Sache
8577981Sachelint:		$(LINT_DEPS)
8652379Sache
8752379Sachemodlintlib:	$(MODLINTLIB_DEPS)
8877981Sache
8952379Sacheclean.lint:	$(CLEAN_LINT_DEPS)
9052379Sache
9152379Sacheinstall:	$(INSTALL_DEPS)
9277981Sache
9377981Sache#
9477981Sache#	Include common targets.
9577981Sache#
9652379Sacheinclude $(UTSBASE)/sparc/Makefile.targ
9752379Sache
9877981Sache#
9977981Sache#	Defines for local commands.
10077981Sache#
10177981SacheWLCC		= wlcc
10278006SacheTOUCH		= touch
10378006SacheWARLOCK		= warlock
10452379SacheSCCS		= sccs
10552379SacheTEST		= test
10677981Sache
10777981Sache#
10877981Sache#	warlock
10977981Sache#
11078006SacheWARLOCK_CMD	= $(MODULE).wlcmd
11178006SacheUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
11252379SacheUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
11378006SacheUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
11478006SacheOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
11578006SacheEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
11678006Sache
11752379Sachewarlock: $(WARLOCK_OK)
11852379Sache
119%.wlcmd:
120	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
121
122$(WARLOCK_OK): warlock_with_usbser warlock_with_usba
123	$(TOUCH) $@
124
125%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
126	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
127
128warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
129	$(WARLOCK_CMD)
130	$(WARLOCK) -c $(WLCMD_DIR)/$(WARLOCK_CMD) $(WARLOCK_OUT) \
131		$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
132
133warlock_with_usba: usbsprl_with_usba.wlcmd $(WARLOCK_OUT) usbser_files \
134	usba_files ohci_files uhci_files ehci_files warlock_ddi.files
135	$(WARLOCK) -c $(WLCMD_DIR)/usbsprl_with_usba.wlcmd \
136		$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
137		$(USBSER_FILES) \
138		$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
139
140usbser_files:
141	@cd ../usbser; pwd; $(MAKE) warlock
142
143usba_files:
144	@cd ../usba;pwd; $(MAKE) warlock
145
146uhci_files:
147	@cd ../uhci;pwd; $(MAKE) warlock
148
149ohci_files:
150	@cd ../ohci;pwd; $(MAKE) warlock
151
152ehci_files:
153	@cd ../ehci;pwd; $(MAKE) warlock
154
155warlock_ddi.files:
156	cd ../warlock; pwd; $(MAKE) warlock
157