10035018cSRaymond Chen# 20035018cSRaymond Chen# CDDL HEADER START 30035018cSRaymond Chen# 40035018cSRaymond Chen# The contents of this file are subject to the terms of the 50035018cSRaymond Chen# Common Development and Distribution License (the "License"). 60035018cSRaymond Chen# You may not use this file except in compliance with the License. 70035018cSRaymond Chen# 80035018cSRaymond Chen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90035018cSRaymond Chen# or http://www.opensolaris.org/os/licensing. 100035018cSRaymond Chen# See the License for the specific language governing permissions 110035018cSRaymond Chen# and limitations under the License. 120035018cSRaymond Chen# 130035018cSRaymond Chen# When distributing Covered Code, include this CDDL HEADER in each 140035018cSRaymond Chen# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150035018cSRaymond Chen# If applicable, add the following below this CDDL HEADER, with the 160035018cSRaymond Chen# fields enclosed by brackets "[]" replaced with your own identifying 170035018cSRaymond Chen# information: Portions Copyright [yyyy] [name of copyright owner] 180035018cSRaymond Chen# 190035018cSRaymond Chen# CDDL HEADER END 200035018cSRaymond Chen# 210035018cSRaymond Chen# 220035018cSRaymond Chen# uts/sparc/usbecm/Makefile 230035018cSRaymond Chen# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 240035018cSRaymond Chen# Use is subject to license terms. 250035018cSRaymond Chen# 26*e2c88f0cSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org> 270035018cSRaymond Chen# 280035018cSRaymond Chen# This makefile drives the production of Abstract Control Model of 290035018cSRaymond Chen# USB Communication Devices Class dirver. 300035018cSRaymond Chen# 310035018cSRaymond Chen# Path to the base of the uts directory tree (usually /usr/src/uts). 320035018cSRaymond Chen# 330035018cSRaymond ChenUTSBASE = ../.. 340035018cSRaymond Chen 350035018cSRaymond Chen# 360035018cSRaymond Chen# Define the module and object file sets. 370035018cSRaymond Chen# 380035018cSRaymond ChenMODULE = usbecm 390035018cSRaymond ChenOBJECTS = $(USBECM_OBJS:%=$(OBJS_DIR)/%) 400035018cSRaymond ChenLINTS = $(USBECM_OBJS:%.o=$(LINTS_DIR)/%.ln) 410035018cSRaymond ChenROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 420035018cSRaymond ChenWARLOCK_OUT = $(USBECM_OBJS:%.o=%.ll) 430035018cSRaymond ChenWARLOCK_OK = $(MODULE).ok 440035018cSRaymond ChenWLCMD_DIR = $(UTSBASE)/common/io/warlock 450035018cSRaymond Chen 460035018cSRaymond Chen# 470035018cSRaymond Chen# Include common rules. 480035018cSRaymond Chen# 490035018cSRaymond Cheninclude $(UTSBASE)/sparc/Makefile.sparc 500035018cSRaymond Chen 510035018cSRaymond ChenLDFLAGS += -dy -Nmisc/usba -Nmisc/mac 520035018cSRaymond Chen 530035018cSRaymond Chen# 540035018cSRaymond Chen# lint pass one enforcement 550035018cSRaymond Chen# 560035018cSRaymond ChenCFLAGS += $(CCVERBOSE) 570035018cSRaymond Chen 580035018cSRaymond Chen# 590035018cSRaymond Chen# Define targets 600035018cSRaymond Chen# 610035018cSRaymond ChenALL_TARGET = $(BINARY) 620035018cSRaymond ChenLINT_TARGET = $(MODULE).lint 630035018cSRaymond ChenINSTALL_TARGET = $(BINARY) $(ROOTMODULE) 640035018cSRaymond Chen 650035018cSRaymond Chen.KEEP_STATE: 660035018cSRaymond Chen 670035018cSRaymond Chenall: $(ALL_DEPS) 680035018cSRaymond Chen 690035018cSRaymond Chendef: $(DEF_DEPS) 700035018cSRaymond Chen 710035018cSRaymond Chenclean: $(CLEAN_DEPS) 720035018cSRaymond Chen $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 730035018cSRaymond Chen 740035018cSRaymond Chenclobber: $(CLOBBER_DEPS) 750035018cSRaymond Chen $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 760035018cSRaymond Chen 770035018cSRaymond Chenlint: $(LINT_DEPS) 780035018cSRaymond Chen 790035018cSRaymond Chenmodlintlib: $(MODLINTLIB_DEPS) 800035018cSRaymond Chen 810035018cSRaymond Chenclean.lint: $(CLEAN_LINT_DEPS) 820035018cSRaymond Chen 830035018cSRaymond Cheninstall: $(INSTALL_DEPS) 840035018cSRaymond Chen 850035018cSRaymond Chen# 860035018cSRaymond Chen# Include common targets. 870035018cSRaymond Chen# 880035018cSRaymond Cheninclude $(UTSBASE)/sparc/Makefile.targ 890035018cSRaymond Chen 900035018cSRaymond Chen# 910035018cSRaymond Chen# Defines for local commands. 920035018cSRaymond Chen# 930035018cSRaymond ChenWLCC = wlcc 940035018cSRaymond ChenTOUCH = touch 950035018cSRaymond ChenWARLOCK = warlock 960035018cSRaymond ChenTEST = test 970035018cSRaymond Chen 980035018cSRaymond Chen# 990035018cSRaymond Chen# warlock 1000035018cSRaymond Chen# 1010035018cSRaymond ChenWARLOCK_CMD = $(WLCMD_DIR)/$(MODULE).wlcmd 1020035018cSRaymond Chen 1030035018cSRaymond ChenUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 1040035018cSRaymond ChenOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 1050035018cSRaymond ChenEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 1060035018cSRaymond Chen 1070035018cSRaymond Chenwarlock: $(WARLOCK_OK) warlock_with_usba 1080035018cSRaymond Chen 1090035018cSRaymond Chen%.ll: $(UTSBASE)/common/io/usb/clients/usbecm/%.c 1100035018cSRaymond Chen $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 1110035018cSRaymond Chen 1120035018cSRaymond Chen$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usbecm.wlcmd warlock_ddi.files 1130035018cSRaymond Chen $(WARLOCK) -c $(WLCMD_DIR)/usbecm.wlcmd $(WARLOCK_OUT) \ 1140035018cSRaymond Chen -l ../warlock/ddi_dki_impl.ll 1150035018cSRaymond Chen $(TOUCH) $@ 1160035018cSRaymond Chen 1170035018cSRaymond Chenwarlock_with_usba: $(WLCMD_DIR)/usbecm_with_usba.wlcmd $(WARLOCK_OUT) \ 1180035018cSRaymond Chen usba_files ohci_files uhci_files ehci_files \ 1190035018cSRaymond Chen warlock_ddi.files 1200035018cSRaymond Chen $(WARLOCK) -c $(WLCMD_DIR)/usbecm_with_usba.wlcmd \ 1210035018cSRaymond Chen $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 1220035018cSRaymond Chen $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll 1230035018cSRaymond Chen 1240035018cSRaymond Chenusba_files: 1250035018cSRaymond Chen @cd ../usba;pwd; $(MAKE) warlock 1260035018cSRaymond Chen 1270035018cSRaymond Chenuhci_files: 1280035018cSRaymond Chen @cd ../uhci;pwd; $(MAKE) warlock 1290035018cSRaymond Chen 1300035018cSRaymond Chenohci_files: 1310035018cSRaymond Chen @cd ../ohci;pwd; $(MAKE) warlock 1320035018cSRaymond Chen 1330035018cSRaymond Chenehci_files: 1340035018cSRaymond Chen @cd ../ehci;pwd; $(MAKE) warlock 1350035018cSRaymond Chen 1360035018cSRaymond Chenwarlock_ddi.files: 1370035018cSRaymond Chen cd ../warlock; pwd; $(MAKE) warlock 138