Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
bc6f4c1c4c1b739fd06d2de05b77b9d08c4d8a5aTinderbox User# CDDL HEADER START
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# or http://www.opensolaris.org/os/licensing.
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews# See the License for the specific language governing permissions
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# and limitations under the License.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# information: Portions Copyright [yyyy] [name of copyright owner]
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# CDDL HEADER END
474faea7dd5ebbf64e0a34d70f4deb2e3f413de6Jeremy C. Reed#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# Use is subject to license terms.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# uts/sparc/usbsksp/Makefile
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#ident "%Z%%M% %I% %E% SMI"
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# This makefile drives the production of the Keyspan USB Serial
bf0266f286c9350f6579d03cc74429433d8e6381Tinderbox User# Adapter driver.
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User#
19c7b1a0293498a3e36692c59646ed6e15ffc8d0Tinderbox User# Path to the base of the uts directory tree (usually /usr/src/uts).
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
bc6f4c1c4c1b739fd06d2de05b77b9d08c4d8a5aTinderbox UserUTSBASE = ../..
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# Define the module and object file sets.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontMODULE = usbsksp
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntOBJECTS = $(USBSER_KEYSPAN_OBJS:%=$(OBJS_DIR)/%)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontLINTS = $(USBSER_KEYSPAN_OBJS:%.o=$(LINTS_DIR)/%.ln)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntWARLOCK_OK = $(MODULE).ok
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Include common rules.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntinclude $(UTSBASE)/sparc/Makefile.sparc
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# lint pass one enforcement
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontCFLAGS += $(CCVERBOSE)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser -Nmisc/usbs49_fw
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# Define targets
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntALL_TARGET = $(BINARY)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntLINT_TARGET = $(MODULE).lint
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# For now, disable these lint checks; maintainers should endeavor
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews# to investigate and remove these for maximum lint coverage.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# Please do not carry these forward to new Makefiles.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt.KEEP_STATE:
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntall: $(ALL_DEPS)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupontdef: $(DEF_DEPS)
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontclean: $(CLEAN_DEPS); \
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontclobber: $(CLOBBER_DEPS); \
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontlint: $(LINT_DEPS)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntmodlintlib: $(MODLINTLIB_DEPS)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupontclean.lint: $(CLEAN_LINT_DEPS)
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontinstall: $(INSTALL_DEPS)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont# Include common targets.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntinclude $(UTSBASE)/sparc/Makefile.targ
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Defines for local commands.
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont#
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontWLCC = wlcc
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontTOUCH = touch
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontWARLOCK = warlock
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis DupontSCCS = sccs
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntTEST = test
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont#
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# warlock
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt#
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis DupontWARLOCK_OUT = usbser_keyspan.ll keyspan_dsd.ll \
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont keyspan_pipe.ll
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis DupontWARLOCK_CMD = usbser_keyspan.wlcmd
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis DupontOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntwarlock: $(WARLOCK_OK) warlock_with_usba
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont%.wlcmd:
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont $(TEST) -f $@ || $(SCCS) get $@
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont$(WARLOCK_OK): warlock_with_usbser
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt $(TOUCH) $@
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupontusbser_files:
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont @cd ../usbser; pwd; $(MAKE) usbser.ll
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntwarlock_with_usba: $(WARLOCK_CMD) $(WARLOCK_OUT) usbser_files \
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont usba_files ohci_files uhci_files ehci_files warlock_ddi.files
f89a9bcf1c02b9b350b8d29e47b48fdc0d334d2aFrancis Dupont $(WARLOCK) -c usbser_keyspan_with_usba.wlcmd \
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
474faea7dd5ebbf64e0a34d70f4deb2e3f413de6Jeremy C. Reed $(USBSER_FILES) \
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontusba_files:
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont @cd ../usba;pwd; $(MAKE) warlock
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontuhci_files:
a7d4d528749aa403397b3e2260abf2046a0cfa7bMark Andrews @cd ../uhci;pwd; $(MAKE) warlock
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontohci_files:
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt @cd ../ohci;pwd; $(MAKE) warlock
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupontehci_files:
a631b30b1ddd8b2ea780371d0d99ba1c05bc7e42Francis Dupont @cd ../ehci;pwd; $(MAKE) warlock
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntwarlock_ddi.files:
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt cd ../warlock; pwd; $(MAKE) warlock
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt