Makefile revision bf56214c0556fa6864189c826d39dbe156bb22a0
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER START
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# The contents of this file are subject to the terms of the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Common Development and Distribution License (the "License").
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# You may not use this file except in compliance with the License.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# or http://www.opensolaris.org/os/licensing.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# See the License for the specific language governing permissions
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# and limitations under the License.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# When distributing Covered Code, include this CDDL HEADER in each
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# If applicable, add the following below this CDDL HEADER, with the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# fields enclosed by brackets "[]" replaced with your own identifying
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# information: Portions Copyright [yyyy] [name of copyright owner]
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER END
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov#
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov# uts/intel/scsa2usb/Makefile
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Use is subject to license terms.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#ident "%Z%%M% %I% %E% SMI"
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# This makefile drives the production of the scsa2usb driver
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# kernel module. intel architecture dependent
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Path to the base of the uts directory tree (usually /usr/src/uts).
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovUTSBASE = ../..
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Define the module and object file sets.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovMODULE = scsa2usb
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovOBJECTS = $(SCSA2USB_OBJS:%=$(OBJS_DIR)/%)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINTS = $(SCSA2USB_OBJS:%.o=$(LINTS_DIR)/%.ln)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONF_SRCDIR = $(UTSBASE)/common/io/usb/scsa2usb
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovWARLOCK_OUT = $(SCSA2USB_OBJS:%.o=%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovWARLOCK_OK = $(MODULE).ok
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovWLCMD_DIR = $(UTSBASE)/common/io/warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Include common rules.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude $(UTSBASE)/intel/Makefile.intel
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Define targets
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovALL_TARGET = $(BINARY) $(SRC_CONFILE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINT_TARGET = $(MODULE).lint
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Override defaults to build a unique, local modstubs.o.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovMODSTUBS_DIR = $(OBJS_DIR)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCLEANFILES += $(MODSTUBS_O)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# depends on misc/usba misc/scsi
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLDFLAGS += -dy -Nmisc/usba -Nmisc/scsi
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# For now, disable these lint checks; maintainers should endeavor
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# to investigate and remove these for maximum lint coverage.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Please do not carry these forward to new Makefiles.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLINTTAGS += -erroff=E_STATIC_UNUSED
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Default build targets.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov.KEEP_STATE:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovdef: $(DEF_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovall: $(ALL_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovclean: $(CLEAN_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovclobber: $(CLOBBER_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovlint: $(LINT_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovmodlintlib: $(MODLINTLIB_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovclean.lint: $(CLEAN_LINT_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinstall: $(INSTALL_DEPS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Include common targets.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude $(UTSBASE)/intel/Makefile.targ
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Defines for local commands.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovWARLOCK = warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovWLCC = wlcc
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovTOUCH = touch
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovTEST = test
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# lock_lint rules
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovST_FILES = $(ST_OBJS:%.o=../st/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovSCSI_FILES = $(SCSI_OBJS:%.o= -l ../scsi/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovwarlock: $(WARLOCK_OK) warlock_with_usba
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/scsa2usb.wlcmd warlock_ddi.files \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov scsi.files
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(WARLOCK) -c $(WLCMD_DIR)/scsa2usb.wlcmd $(WARLOCK_OUT) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov ../warlock/scsi.ll \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(SCSI_FILES) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov -l ../warlock/ddi_dki_impl.ll
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(TOUCH) $@
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov%.ll: $(UTSBASE)/common/io/usb/scsa2usb/%.c \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(UTSBASE)/common/sys/usb/clients/mass_storage/usb_bulkonly.h \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(UTSBASE)/common/sys/usb/clients/mass_storage/usb_cbi.h \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(UTSBASE)/common/sys/usb/scsa2usb/scsa2usb.h
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovwarlock_with_usba: $(WLCMD_DIR)/scsa2usb_with_usba.wlcmd \
8ef1a136c1406bd1bab66e4ebf75b9375090cd86Nikolai Kondrashov $(WARLOCK_OUT) usba_files \
8ef1a136c1406bd1bab66e4ebf75b9375090cd86Nikolai Kondrashov ohci_files ehci_files uhci_files warlock_ddi.files sd.files st.files \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cmlb.files scsi.files
8ef1a136c1406bd1bab66e4ebf75b9375090cd86Nikolai Kondrashov $(WARLOCK) -c $(WLCMD_DIR)/scsa2usb_with_usba.wlcmd \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(SD_FILES) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(ST_FILES) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(CMLB_FILES) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(SCSI_FILES) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(WARLOCK_OUT) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov -l ../warlock/ddi_dki_impl.ll
3e2f89726a90dfe091d7d7d3b558d97469e5d3afLukas Slebodnik
3e2f89726a90dfe091d7d7d3b558d97469e5d3afLukas Slebodnikusba_files:
3e2f89726a90dfe091d7d7d3b558d97469e5d3afLukas Slebodnik @cd ../usba;pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovuhci_files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../uhci;pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovohci_files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../ohci;pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovehci_files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../ehci;pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovwarlock_ddi.files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../warlock; pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovscsi.files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../scsi; pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovsd.files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../sd; pwd; $(MAKE) warlock_alone
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovst.files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../st; pwd; $(MAKE) warlock_alone
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovcmlb.files:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov @cd ../cmlb; pwd; $(MAKE) warlock
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov