Makefile revision 489b7c4ab76ae8df137fbfcc2214f7baa52883a0
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# CDDL HEADER START
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# The contents of this file are subject to the terms of the
f48205be61a214698b763ff550ab9e657525104ccasper# Common Development and Distribution License (the "License").
f48205be61a214698b763ff550ab9e657525104ccasper# You may not use this file except in compliance with the License.
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f48205be61a214698b763ff550ab9e657525104ccasper# or http://www.opensolaris.org/os/licensing.
f48205be61a214698b763ff550ab9e657525104ccasper# See the License for the specific language governing permissions
f48205be61a214698b763ff550ab9e657525104ccasper# and limitations under the License.
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# When distributing Covered Code, include this CDDL HEADER in each
f48205be61a214698b763ff550ab9e657525104ccasper# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f48205be61a214698b763ff550ab9e657525104ccasper# If applicable, add the following below this CDDL HEADER, with the
f48205be61a214698b763ff550ab9e657525104ccasper# fields enclosed by brackets "[]" replaced with your own identifying
f48205be61a214698b763ff550ab9e657525104ccasper# information: Portions Copyright [yyyy] [name of copyright owner]
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# CDDL HEADER END
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# uts/sparc/usbskel/Makefile
7257d1b4d25bfac0c802847390e98a464fd787acraf
f48205be61a214698b763ff550ab9e657525104ccasper# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
f48205be61a214698b763ff550ab9e657525104ccasper# Use is subject to license terms.
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# This makefile drives the production of the usbskel kernel driver.
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# sparc architecture dependent
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper
7257d1b4d25bfac0c802847390e98a464fd787acraf#
f48205be61a214698b763ff550ab9e657525104ccasper# Path to the base of the uts directory tree (usually /usr/src/uts).
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasperUTSBASE = ../..
f48205be61a214698b763ff550ab9e657525104ccasper
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# Define the module and object file sets.
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasperMODULE = usbskel
f48205be61a214698b763ff550ab9e657525104ccasperOBJECTS = $(USBSKEL_OBJS:%=$(OBJS_DIR)/%)
f48205be61a214698b763ff550ab9e657525104ccasperLINTS = $(USBSKEL_OBJS:%.o=$(LINTS_DIR)/%.ln)
f48205be61a214698b763ff550ab9e657525104ccasperROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
f48205be61a214698b763ff550ab9e657525104ccasperCONF_SRCDIR = $(UTSBASE)/common/io/usb/clients/usbskel
f48205be61a214698b763ff550ab9e657525104ccasperWARLOCK_OUT = $(USBSKEL_OBJS:%.o=%.ll)
f48205be61a214698b763ff550ab9e657525104ccasperWARLOCK_OK = $(MODULE).ok
f48205be61a214698b763ff550ab9e657525104ccasperWLCMD_DIR = $(UTSBASE)/common/io/warlock
f48205be61a214698b763ff550ab9e657525104ccasper
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# Include common rules.
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasperinclude $(UTSBASE)/sparc/Makefile.sparc
f48205be61a214698b763ff550ab9e657525104ccasper
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# lint pass one enforcement
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasperCFLAGS += $(CCVERBOSE)
f48205be61a214698b763ff550ab9e657525104ccasper
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# depends on misc/usba
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasperLDFLAGS += -dy -Nmisc/usba
f48205be61a214698b763ff550ab9e657525104ccasper
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasper# Define targets
f48205be61a214698b763ff550ab9e657525104ccasper#
f48205be61a214698b763ff550ab9e657525104ccasperALL_TARGET = $(BINARY) $(SRC_CONFILE)
f48205be61a214698b763ff550ab9e657525104ccasperLINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
.KEEP_STATE:
all: $(ALL_DEPS)
def: $(DEF_DEPS)
clean: $(CLEAN_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
clobber: $(CLOBBER_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
TEST = test
#
# lock_lint rules
#
USBA_FILES = $(USBA_WITHOUT_WUSB_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) warlock_with_usba
$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usbskel.wlcmd warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/usbskel.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/usb/clients/usbskel/%.c \
$(UTSBASE)/common/sys/usb/clients/usbskel/usbskel.h
$(WLCC) $(CPPFLAGS) -DDEBUG -DUSBSKEL_PM -DUSBSKEL_CPR -o $@ $<
warlock_with_usba: $(WLCMD_DIR)/usbskel_with_usba.wlcmd $(WARLOCK_OUT) \
usba_files ohci_files ehci_files uhci_files warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/usbskel_with_usba.wlcmd \
$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
$(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
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