Makefile revision 4de2612967d06c4fdbf524a62556a1e8118a006f
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# CDDL HEADER START
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# The contents of this file are subject to the terms of the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Common Development and Distribution License, Version 1.0 only
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# (the "License"). You may not use this file except in compliance
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# with the License.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# or http://www.opensolaris.org/os/licensing.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# See the License for the specific language governing permissions
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# and limitations under the License.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# When distributing Covered Code, include this CDDL HEADER in each
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# If applicable, add the following below this CDDL HEADER, with the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# fields enclosed by brackets "[]" replaced with your own identifying
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# information: Portions Copyright [yyyy] [name of copyright owner]
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# CDDL HEADER END
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# uts/sparc/usbsprl/Makefile
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Use is subject to license terms.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#pragma ident "%Z%%M% %I% %E% SMI"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# This makefile drives the production of the Prolific USB Serial
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Adapter driver.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Path to the base of the uts directory tree (usually /usr/src/uts).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesUTSBASE = ../..
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Define the module and object file sets.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesMODULE = usbsprl
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesOBJECTS = $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLINTS = $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK_OK = $(MODULE).ok
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Include common rules.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinclude $(UTSBASE)/sparc/Makefile.sparc
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# lint pass one enforcement
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCFLAGS += $(CCVERBOSE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Define targets
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesALL_TARGET = $(BINARY)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLINT_TARGET = $(MODULE).lint
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes.KEEP_STATE:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesall: $(ALL_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesdef: $(DEF_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesclean: $(CLEAN_DEPS); \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesclobber: $(CLOBBER_DEPS); \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeslint: $(LINT_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesmodlintlib: $(MODLINTLIB_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesclean.lint: $(CLEAN_LINT_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinstall: $(INSTALL_DEPS)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Include common targets.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinclude $(UTSBASE)/sparc/Makefile.targ
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# Defines for local commands.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWLCC = wlcc
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTOUCH = touch
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK = warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesSCCS = sccs
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTEST = test
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes# warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes#
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK_OUT = usbser_pl2303.ll pl2303_dsd.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWARLOCK_CMD = $(MODULE).wlcmd
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeswarlock: $(WARLOCK_OK) warlock_with_usba
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes%.wlcmd:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(TEST) -f $@ || $(SCCS) get $@
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes$(WARLOCK_OK): warlock_with_usbser
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(TOUCH) $@
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeswarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesusbser_files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes @cd ../usbser; pwd; $(MAKE) usbser.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeswarlock_with_usba: $(WARLOCK_CMD) $(WARLOCK_OUT) usbser_files \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes usba_files ohci_files uhci_files ehci_files warlock_ddi.files
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WARLOCK) -c usbsprl_with_usba.wlcmd \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(USBSER_FILES) \
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesusba_files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes @cd ../usba;pwd; $(MAKE) warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesuhci_files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes @cd ../uhci;pwd; $(MAKE) warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesohci_files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes @cd ../ohci;pwd; $(MAKE) warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesehci_files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes @cd ../ehci;pwd; $(MAKE) warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeswarlock_ddi.files:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes cd ../warlock; pwd; $(MAKE) warlock
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes