Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# CDDL HEADER START
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# The contents of this file are subject to the terms of the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Common Development and Distribution License (the "License").
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# You may not use this file except in compliance with the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# or http://www.opensolaris.org/os/licensing.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# See the License for the specific language governing permissions
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# and limitations under the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# When distributing Covered Code, include this CDDL HEADER in each
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# If applicable, add the following below this CDDL HEADER, with the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# fields enclosed by brackets "[]" replaced with your own identifying
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# information: Portions Copyright [yyyy] [name of copyright owner]
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# CDDL HEADER END
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Use is subject to license terms.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# uts/sparc/usbsksp/Makefile
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#ident "%Z%%M% %I% %E% SMI"
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# This makefile drives the production of the Keyspan USB Serial
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Adapter driver.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Path to the base of the uts directory tree (usually /usr/src/uts).
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuUTSBASE = ../..
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Define the module and object file sets.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuMODULE = usbsksp
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuOBJECTS = $(USBSER_KEYSPAN_OBJS:%=$(OBJS_DIR)/%)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuLINTS = $(USBSER_KEYSPAN_OBJS:%.o=$(LINTS_DIR)/%.ln)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuWARLOCK_OUT = $(USBSER_KEYSPAN_OBJS:%.o=%.ll)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuWARLOCK_OK = $(MODULE).ok
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuWLCMD_DIR = $(UTSBASE)/common/io/warlock
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Include common rules.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuinclude $(UTSBASE)/sparc/Makefile.sparc
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# lint pass one enforcement
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuCFLAGS += $(CCVERBOSE)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser -Nmisc/usbs49_fw
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Define targets
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuALL_TARGET = $(BINARY)
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuLINT_TARGET = $(MODULE).lint
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# For now, disable these lint checks; maintainers should endeavor
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# to investigate and remove these for maximum lint coverage.
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe# Please do not carry these forward to new Makefiles.
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe#
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu.KEEP_STATE:
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuall: $(ALL_DEPS)
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudef: $(DEF_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuclean: $(CLEAN_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuclobber: $(CLOBBER_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liulint: $(LINT_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liumodlintlib: $(MODLINTLIB_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Rossclean.lint: $(CLEAN_LINT_DEPS)
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Rossinstall: $(INSTALL_DEPS)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Include common targets.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuinclude $(UTSBASE)/sparc/Makefile.targ
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu# Defines for local commands.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu#
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuWLCC = wlcc
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuTOUCH = touch
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuWARLOCK = warlock
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuSCCS = sccs
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuTEST = test
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
#
# warlock
#
WARLOCK_CMD = usbser_keyspan.wlcmd
USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
warlock: $(WARLOCK_OK)
%.wlcmd:
cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
$(WARLOCK_CMD)
$(WARLOCK) -c $(WLCMD_DIR)/$(WARLOCK_CMD) $(WARLOCK_OUT) \
$(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
warlock_with_usba: usbser_keyspan_with_usba.wlcmd $(WARLOCK_OUT) usbser_files \
usba_files ohci_files uhci_files ehci_files warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/usbser_keyspan_with_usba.wlcmd \
$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
$(USBSER_FILES) \
$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
usbser_files:
@cd ../usbser; pwd; $(MAKE) warlock
usba_files:
@cd ../usba;pwd; $(MAKE) warlock
uhci_files:
@cd ../uhci;pwd; $(MAKE) warlock
ohci_files:
@cd ../ohci;pwd; $(MAKE) warlock
ehci_files:
@cd ../ehci;pwd; $(MAKE) warlock
warlock_ddi.files:
cd ../warlock; pwd; $(MAKE) warlock