Makefile revision d73ae94e59c019f5cc3221ee0a0012d02091b40e
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# CDDL HEADER START
f0aad5341752aefe5059832f6cf3abc3283c6e16Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# The contents of this file are subject to the terms of the
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Common Development and Distribution License (the "License").
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# You may not use this file except in compliance with the License.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# or http://www.opensolaris.org/os/licensing.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# See the License for the specific language governing permissions
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# and limitations under the License.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# CDDL HEADER END
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# uts/sparc/usb_ia/Makefile
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Use is subject to license terms.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# This makefile drives the production of the usb_ia driver kernel module.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# sparc architecture dependent
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#ident "%Z%%M% %I% %E% SMI"
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Path to the base of the uts directory tree (usually /usr/src/uts).
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserUTSBASE = ../..
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Define the module and object file sets.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserMODULE = usb_ia
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserOBJECTS = $(USB_IA_OBJS:%=$(OBJS_DIR)/%)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserLINTS = $(USB_IA_OBJS:%.o=$(LINTS_DIR)/%.ln)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserWARLOCK_OUT = $(USB_IA_OBJS:%.o=%.ll)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserWARLOCK_OK = $(MODULE).ok
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserWLCMD_DIR = $(UTSBASE)/common/io/warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Include common rules.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userinclude $(UTSBASE)/sparc/Makefile.sparc
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# lint pass one enforcement
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserCFLAGS += $(CCVERBOSE)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# depends on misc/usba
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserLDFLAGS += -dy -Nmisc/usba
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Define targets
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserALL_TARGET = $(BINARY)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserLINT_TARGET = $(MODULE).lint
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User.KEEP_STATE:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userall: $(ALL_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userdef: $(DEF_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userclean: $(CLEAN_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userclobber: $(CLOBBER_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userlint: $(LINT_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Usermodlintlib: $(MODLINTLIB_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userclean.lint: $(CLEAN_LINT_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userinstall: $(INSTALL_DEPS)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Include common targets.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userinclude $(UTSBASE)/sparc/Makefile.targ
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# Defines for local commands.
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserWARLOCK = warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserWLCC = wlcc
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserTOUCH = touch
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserSCCS = sccs
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserTEST = test
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# lock_lint rules
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User#
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox UserEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userwarlock: $(WARLOCK_OK) warlock_with_usba
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User%.wlcmd:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User$(WARLOCK_OK): $(WARLOCK_OUT) usb_ia.wlcmd warlock_ddi.files
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(WARLOCK) -c $(WLCMD_DIR)/usb_ia.wlcmd $(WARLOCK_OUT) \
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User -l ../warlock/ddi_dki_impl.ll
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(TOUCH) $@
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User%.ll: $(UTSBASE)/common/io/usb/usb_ia/%.c \
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(UTSBASE)/common/sys/usb/usb_ia/usb_iavar.h
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userwarlock_with_usba: usb_ia_with_usba.wlcmd $(WARLOCK_OUT) usba_files \
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User ohci_files ehci_files uhci_files warlock_ddi.files
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(WARLOCK) -c $(WLCMD_DIR)/usb_ia_with_usba.wlcmd \
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User $(WARLOCK_OUT) \
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User -l ../warlock/ddi_dki_impl.ll
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userusba_files:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User @cd ../usba;pwd; $(MAKE) warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Useruhci_files:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User @cd ../uhci;pwd; $(MAKE) warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userohci_files:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User @cd ../ohci;pwd; $(MAKE) warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userehci_files:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User @cd ../ehci;pwd; $(MAKE) warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox Userwarlock_ddi.files:
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User cd ../warlock; pwd; $(MAKE) warlock
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User