Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# CDDL HEADER START
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# The contents of this file are subject to the terms of the
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# Common Development and Distribution License (the "License").
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# You may not use this file except in compliance with the License.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# or http://www.opensolaris.org/os/licensing.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# See the License for the specific language governing permissions
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# and limitations under the License.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# When distributing Covered Code, include this CDDL HEADER in each
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# If applicable, add the following below this CDDL HEADER, with the
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# fields enclosed by brackets "[]" replaced with your own identifying
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# information: Portions Copyright [yyyy] [name of copyright owner]
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# CDDL HEADER END
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills# Use is subject to license terms.
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
9d8d9e1151895fac86a2e3216647dd2a020ecf71Garrett D'Amore# uts/sparc/scsa2usb/Makefile
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills# This makefile drives the production of the scsa2usb driver
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills# kernel module. sparc architecture dependent
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#ident "%Z%%M% %I% %E% SMI"
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills# Path to the base of the uts directory tree (usually /usr/src/uts).
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsUTSBASE = ../..
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills# Define the module and object file sets.
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsMODULE = scsa2usb
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsOBJECTS = $(SCSA2USB_OBJS:%=$(OBJS_DIR)/%)
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsLINTS = $(SCSA2USB_OBJS:%.o=$(LINTS_DIR)/%.ln)
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsCONF_SRCDIR = $(UTSBASE)/common/io/usb/scsa2usb
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsWARLOCK_OUT = $(SCSA2USB_OBJS:%.o=%.ll)
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary MillsWARLOCK_OK = $(MODULE).ok
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills# Include common rules.
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills#
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Millsinclude $(UTSBASE)/sparc/Makefile.sparc
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# lint pass one enforcement
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraCFLAGS += $(CCVERBOSE)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# depends on misc/usba misc/scsi
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLDFLAGS += -dy -Nmisc/usba -Nmisc/scsi
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# Define targets
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraALL_TARGET = $(BINARY) $(SRC_CONFILE)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLINT_TARGET = $(MODULE).lint
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# For now, disable these lint checks; maintainers should endeavor
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# to investigate and remove these for maximum lint coverage.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# Please do not carry these forward to new Makefiles.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLINTTAGS += -erroff=E_STATIC_UNUSED
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra.KEEP_STATE:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misraall: $(ALL_DEPS)
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misradef: $(DEF_DEPS)
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misraclean: $(CLEAN_DEPS); \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Millsclobber: $(CLOBBER_DEPS); \
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Mills $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misra
5e8715b93d1d651ab2805b5e6e98b17df49fa92fGary Millslint: $(LINT_DEPS)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misramodlintlib: $(MODLINTLIB_DEPS)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misraclean.lint: $(CLEAN_LINT_DEPS)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrainstall: $(INSTALL_DEPS)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# Include common targets.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrainclude $(UTSBASE)/sparc/Makefile.targ
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# Defines for local commands.
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraWARLOCK = warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraWLCC = wlcc
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraTOUCH = touch
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraSCCS = sccs
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraTEST = test
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra# lock_lint rules
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra#
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraWARLOCK_OBJECTS = $(SCSA2USB_OBJS:%.o=%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraST_FILES = $(ST_OBJS:%.o=../st/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh MisraSCSI_FILES = $(SCSI_OBJS:%.o= -l ../scsi/%.ll)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrawarlock: $(MODULE).ok $(WARLOCK_OBJECTS) warlock_with_usba
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra%.wlcmd:
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misra $(TEST) -f $@ || $(SCCS) get $@
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misra
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misrascsa2usb.ok: $(WARLOCK_OBJECTS) scsa2usb.wlcmd warlock_ddi.files \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra scsi.files
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(WARLOCK) -c scsa2usb.wlcmd $(WARLOCK_OBJECTS) \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra ../warlock/scsi.ll \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra -l ../warlock/ddi_dki_impl.ll \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(SCSI_FILES)
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(TOUCH) $@
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra%.ll: $(UTSBASE)/common/io/usb/scsa2usb/%.c \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(UTSBASE)/common/sys/usb/clients/mass_storage/usb_bulkonly.h \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(UTSBASE)/common/sys/usb/clients/mass_storage/usb_cbi.h \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(UTSBASE)/common/sys/usb/scsa2usb/scsa2usb.h
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrawarlock_with_usba: scsa2usb.wlcmd $(WARLOCK_OBJECTS) usba_files \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra ohci_files ehci_files uhci_files warlock_ddi.files sd.files st.files
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(WARLOCK) -c ./scsa2usb_with_usba.wlcmd \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(SD_FILES) \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(ST_FILES) \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(SCSI_FILES) \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra $(WARLOCK_OBJECTS) \
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra -l ../warlock/ddi_dki_impl.ll
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrausba_files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../usba;pwd; $(MAKE) warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misrauhci_files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../uhci;pwd; $(MAKE) warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misraohci_files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../ohci;pwd; $(MAKE) warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misraehci_files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../ehci;pwd; $(MAKE) warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrawarlock_ddi.files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../warlock; pwd; $(MAKE) warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrascsi.files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../scsi; pwd; $(MAKE) warlock
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misrasd.files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../sd; pwd; $(MAKE) warlock_alone
0eb090a7674ebcdcb1c35501097edeb5f2395459Saurabh Misra
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misrast.files:
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra @cd ../st; pwd; $(MAKE) warlock_alone
015a6ef6781cc3ceba8ad3bfbae98449b6002a1fSaurabh Misra