1*c77a61a7Syz147069# 2*c77a61a7Syz147069# CDDL HEADER START 3*c77a61a7Syz147069# 4*c77a61a7Syz147069# The contents of this file are subject to the terms of the 5*c77a61a7Syz147069# Common Development and Distribution License (the "License"). 6*c77a61a7Syz147069# You may not use this file except in compliance with the License. 7*c77a61a7Syz147069# 8*c77a61a7Syz147069# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*c77a61a7Syz147069# or http://www.opensolaris.org/os/licensing. 10*c77a61a7Syz147069# See the License for the specific language governing permissions 11*c77a61a7Syz147069# and limitations under the License. 12*c77a61a7Syz147069# 13*c77a61a7Syz147069# When distributing Covered Code, include this CDDL HEADER in each 14*c77a61a7Syz147069# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*c77a61a7Syz147069# If applicable, add the following below this CDDL HEADER, with the 16*c77a61a7Syz147069# fields enclosed by brackets "[]" replaced with your own identifying 17*c77a61a7Syz147069# information: Portions Copyright [yyyy] [name of copyright owner] 18*c77a61a7Syz147069# 19*c77a61a7Syz147069# CDDL HEADER END 20*c77a61a7Syz147069# 21*c77a61a7Syz147069 22*c77a61a7Syz147069# 23*c77a61a7Syz147069# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*c77a61a7Syz147069# Use is subject to license terms. 25*c77a61a7Syz147069# 26*c77a61a7Syz147069#ident "%Z%%M% %I% %E% SMI" 27*c77a61a7Syz147069 28*c77a61a7Syz147069# 29*c77a61a7Syz147069# uts/sparc/usbvc/Makefile 30*c77a61a7Syz147069# This makefile drives the production of the usbvc kernel driver. 31*c77a61a7Syz147069# 32*c77a61a7Syz147069# sparc architecture dependent 33*c77a61a7Syz147069# 34*c77a61a7Syz147069 35*c77a61a7Syz147069# 36*c77a61a7Syz147069# Path to the base of the uts directory tree (usually /usr/src/uts). 37*c77a61a7Syz147069# 38*c77a61a7Syz147069UTSBASE = ../.. 39*c77a61a7Syz147069 40*c77a61a7Syz147069# 41*c77a61a7Syz147069# Define the module and object file sets. 42*c77a61a7Syz147069# 43*c77a61a7Syz147069MODULE = usbvc 44*c77a61a7Syz147069OBJECTS = $(USBVC_OBJS:%=$(OBJS_DIR)/%) 45*c77a61a7Syz147069LINTS = $(USBVC_OBJS:%.o=$(LINTS_DIR)/%.ln) 46*c77a61a7Syz147069ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 47*c77a61a7Syz147069WARLOCK_OUT = $(USBVC_OBJS:%.o=%.ll) 48*c77a61a7Syz147069WARLOCK_OK = $(MODULE).ok 49*c77a61a7Syz147069WLCMD_DIR = $(UTSBASE)/common/io/warlock 50*c77a61a7Syz147069 51*c77a61a7Syz147069# 52*c77a61a7Syz147069# Include common rules. 53*c77a61a7Syz147069# 54*c77a61a7Syz147069include $(UTSBASE)/sparc/Makefile.sparc 55*c77a61a7Syz147069 56*c77a61a7Syz147069# 57*c77a61a7Syz147069# lint pass one enforcement 58*c77a61a7Syz147069# 59*c77a61a7Syz147069CFLAGS += $(CCVERBOSE) 60*c77a61a7Syz147069 61*c77a61a7Syz147069# 62*c77a61a7Syz147069# depends on misc/usba 63*c77a61a7Syz147069LDFLAGS += -dy -Nmisc/usba 64*c77a61a7Syz147069 65*c77a61a7Syz147069# 66*c77a61a7Syz147069# Define targets 67*c77a61a7Syz147069# 68*c77a61a7Syz147069ALL_TARGET = $(BINARY) 69*c77a61a7Syz147069LINT_TARGET = $(MODULE).lint 70*c77a61a7Syz147069INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 71*c77a61a7Syz147069 72*c77a61a7Syz147069# 73*c77a61a7Syz147069# Disable this because it is necessary for this driver 74*c77a61a7Syz147069# and it is surely safe 75*c77a61a7Syz147069# 76*c77a61a7Syz147069LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 77*c77a61a7Syz147069 78*c77a61a7Syz147069.KEEP_STATE: 79*c77a61a7Syz147069 80*c77a61a7Syz147069all: $(ALL_DEPS) 81*c77a61a7Syz147069 82*c77a61a7Syz147069def: $(DEF_DEPS) 83*c77a61a7Syz147069 84*c77a61a7Syz147069clean: $(CLEAN_DEPS) 85*c77a61a7Syz147069 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 86*c77a61a7Syz147069 87*c77a61a7Syz147069clobber: $(CLOBBER_DEPS) 88*c77a61a7Syz147069 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 89*c77a61a7Syz147069 90*c77a61a7Syz147069lint: $(LINT_DEPS) 91*c77a61a7Syz147069 92*c77a61a7Syz147069modlintlib: $(MODLINTLIB_DEPS) 93*c77a61a7Syz147069 94*c77a61a7Syz147069clean.lint: $(CLEAN_LINT_DEPS) 95*c77a61a7Syz147069 96*c77a61a7Syz147069install: $(INSTALL_DEPS) 97*c77a61a7Syz147069 98*c77a61a7Syz147069# 99*c77a61a7Syz147069# Include common targets. 100*c77a61a7Syz147069# 101*c77a61a7Syz147069include $(UTSBASE)/sparc/Makefile.targ 102*c77a61a7Syz147069 103*c77a61a7Syz147069# 104*c77a61a7Syz147069# Defines for local commands. 105*c77a61a7Syz147069# 106*c77a61a7Syz147069WARLOCK = warlock 107*c77a61a7Syz147069WLCC = wlcc 108*c77a61a7Syz147069TOUCH = touch 109*c77a61a7Syz147069SCCS = sccs 110*c77a61a7Syz147069TEST = test 111*c77a61a7Syz147069 112*c77a61a7Syz147069# 113*c77a61a7Syz147069# lock_lint rules 114*c77a61a7Syz147069# 115*c77a61a7Syz147069USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll) 116*c77a61a7Syz147069UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 117*c77a61a7Syz147069OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 118*c77a61a7Syz147069EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 119*c77a61a7Syz147069 120*c77a61a7Syz147069warlock: $(WARLOCK_OK) warlock_with_usba 121*c77a61a7Syz147069 122*c77a61a7Syz147069%.wlcmd: 123*c77a61a7Syz147069 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 124*c77a61a7Syz147069 125*c77a61a7Syz147069$(WARLOCK_OK): $(WARLOCK_OUT) usbvc.wlcmd warlock_ddi.files 126*c77a61a7Syz147069 $(WARLOCK) -c $(WLCMD_DIR)/usbvc.wlcmd $(WARLOCK_OUT) \ 127*c77a61a7Syz147069 -l ../warlock/ddi_dki_impl.ll 128*c77a61a7Syz147069 $(TOUCH) $@ 129*c77a61a7Syz147069 130*c77a61a7Syz147069%.ll: $(UTSBASE)/common/io/usb/clients/video/usbvc/%.c \ 131*c77a61a7Syz147069 $(UTSBASE)/common/sys/usb/clients/video/usbvc/usbvc_var.h 132*c77a61a7Syz147069 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 133*c77a61a7Syz147069 134*c77a61a7Syz147069warlock_with_usba: usbvc_with_usba.wlcmd $(WARLOCK_OUT) usba_files \ 135*c77a61a7Syz147069 ohci_files ehci_files uhci_files warlock_ddi.files 136*c77a61a7Syz147069 $(WARLOCK) -c $(WLCMD_DIR)/usbvc_with_usba.wlcmd \ 137*c77a61a7Syz147069 $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 138*c77a61a7Syz147069 $(WARLOCK_OUT) \ 139*c77a61a7Syz147069 -l ../warlock/ddi_dki_impl.ll 140*c77a61a7Syz147069 141*c77a61a7Syz147069usba_files: 142*c77a61a7Syz147069 @cd ../usba;pwd; $(MAKE) warlock 143*c77a61a7Syz147069 144*c77a61a7Syz147069uhci_files: 145*c77a61a7Syz147069 @cd ../uhci;pwd; $(MAKE) warlock 146*c77a61a7Syz147069 147*c77a61a7Syz147069ohci_files: 148*c77a61a7Syz147069 @cd ../ohci;pwd; $(MAKE) warlock 149*c77a61a7Syz147069 150*c77a61a7Syz147069ehci_files: 151*c77a61a7Syz147069 @cd ../ehci;pwd; $(MAKE) warlock 152*c77a61a7Syz147069 153*c77a61a7Syz147069warlock_ddi.files: 154*c77a61a7Syz147069 cd ../warlock; pwd; $(MAKE) warlock 155