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# This makefile drives the production of the usbvc driver kernel module. 30*c77a61a7Syz147069# 31*c77a61a7Syz147069 32*c77a61a7Syz147069# 33*c77a61a7Syz147069# Path to the base of the uts directory tree (usually /usr/src/uts). 34*c77a61a7Syz147069# 35*c77a61a7Syz147069UTSBASE = ../.. 36*c77a61a7Syz147069 37*c77a61a7Syz147069# 38*c77a61a7Syz147069# Define the module and object file sets. 39*c77a61a7Syz147069# 40*c77a61a7Syz147069MODULE = usbvc 41*c77a61a7Syz147069OBJECTS = $(USBVC_OBJS:%=$(OBJS_DIR)/%) 42*c77a61a7Syz147069LINTS = $(USBVC_OBJS:%.o=$(LINTS_DIR)/%.ln) 43*c77a61a7Syz147069ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 44*c77a61a7Syz147069WARLOCK_OUT = $(USBVC_OBJS:%.o=%.ll) 45*c77a61a7Syz147069WARLOCK_OK = $(MODULE).ok 46*c77a61a7Syz147069WLCMD_DIR = $(UTSBASE)/common/io/warlock 47*c77a61a7Syz147069 48*c77a61a7Syz147069# 49*c77a61a7Syz147069# Include common rules. 50*c77a61a7Syz147069# 51*c77a61a7Syz147069include $(UTSBASE)/intel/Makefile.intel 52*c77a61a7Syz147069 53*c77a61a7Syz147069# 54*c77a61a7Syz147069# Define targets 55*c77a61a7Syz147069# 56*c77a61a7Syz147069ALL_TARGET = $(BINARY) 57*c77a61a7Syz147069LINT_TARGET = $(MODULE).lint 58*c77a61a7Syz147069INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 59*c77a61a7Syz147069 60*c77a61a7Syz147069# 61*c77a61a7Syz147069# Override defaults to build a unique, local modstubs.o. 62*c77a61a7Syz147069# 63*c77a61a7Syz147069MODSTUBS_DIR = $(OBJS_DIR) 64*c77a61a7Syz147069CLEANFILES += $(MODSTUBS_O) 65*c77a61a7Syz147069 66*c77a61a7Syz147069# 67*c77a61a7Syz147069# depends on misc/usba 68*c77a61a7Syz147069# 69*c77a61a7Syz147069LDFLAGS += -dy -Nmisc/usba 70*c77a61a7Syz147069 71*c77a61a7Syz147069# 72*c77a61a7Syz147069# Disable this because it is necessary for this driver 73*c77a61a7Syz147069# and it is surely safe 74*c77a61a7Syz147069# 75*c77a61a7Syz147069LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 76*c77a61a7Syz147069 77*c77a61a7Syz147069# 78*c77a61a7Syz147069# Default build targets. 79*c77a61a7Syz147069# 80*c77a61a7Syz147069.KEEP_STATE: 81*c77a61a7Syz147069 82*c77a61a7Syz147069def: $(DEF_DEPS) 83*c77a61a7Syz147069 84*c77a61a7Syz147069all: $(ALL_DEPS) 85*c77a61a7Syz147069 86*c77a61a7Syz147069clean: $(CLEAN_DEPS) 87*c77a61a7Syz147069 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 88*c77a61a7Syz147069 89*c77a61a7Syz147069clobber: $(CLOBBER_DEPS) 90*c77a61a7Syz147069 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 91*c77a61a7Syz147069 92*c77a61a7Syz147069lint: $(LINT_DEPS) 93*c77a61a7Syz147069 94*c77a61a7Syz147069modlintlib: $(MODLINTLIB_DEPS) 95*c77a61a7Syz147069 96*c77a61a7Syz147069clean.lint: $(CLEAN_LINT_DEPS) 97*c77a61a7Syz147069 98*c77a61a7Syz147069install: $(INSTALL_DEPS) 99*c77a61a7Syz147069 100*c77a61a7Syz147069# 101*c77a61a7Syz147069# Include common targets. 102*c77a61a7Syz147069# 103*c77a61a7Syz147069include $(UTSBASE)/intel/Makefile.targ 104*c77a61a7Syz147069 105*c77a61a7Syz147069# 106*c77a61a7Syz147069# Defines for local commands. 107*c77a61a7Syz147069# 108*c77a61a7Syz147069WARLOCK = warlock 109*c77a61a7Syz147069WLCC = wlcc 110*c77a61a7Syz147069TOUCH = touch 111*c77a61a7Syz147069SCCS = sccs 112*c77a61a7Syz147069TEST = test 113*c77a61a7Syz147069 114*c77a61a7Syz147069# 115*c77a61a7Syz147069# lock_lint rules 116*c77a61a7Syz147069# 117*c77a61a7Syz147069USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll) 118*c77a61a7Syz147069UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 119*c77a61a7Syz147069OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 120*c77a61a7Syz147069EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 121*c77a61a7Syz147069 122*c77a61a7Syz147069warlock: $(WARLOCK_OK) warlock_with_usba 123*c77a61a7Syz147069 124*c77a61a7Syz147069%.wlcmd: 125*c77a61a7Syz147069 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 126*c77a61a7Syz147069 127*c77a61a7Syz147069$(WARLOCK_OK): $(WARLOCK_OUT) usbvc.wlcmd warlock_ddi.files 128*c77a61a7Syz147069 $(WARLOCK) -c $(WLCMD_DIR)/usbvc.wlcmd $(WARLOCK_OUT) \ 129*c77a61a7Syz147069 -l ../warlock/ddi_dki_impl.ll 130*c77a61a7Syz147069 $(TOUCH) $@ 131*c77a61a7Syz147069 132*c77a61a7Syz147069%.ll: $(UTSBASE)/common/io/usb/clients/video/usbvc/%.c \ 133*c77a61a7Syz147069 $(UTSBASE)/common/sys/usb/clients/video/usbvc/usbvc_var.h 134*c77a61a7Syz147069 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 135*c77a61a7Syz147069 136*c77a61a7Syz147069warlock_with_usba: usbvc_with_usba.wlcmd $(WARLOCK_OUT) usba_files \ 137*c77a61a7Syz147069 ohci_files ehci_files uhci_files warlock_ddi.files 138*c77a61a7Syz147069 $(WARLOCK) -c $(WLCMD_DIR)/usbvc_with_usba.wlcmd \ 139*c77a61a7Syz147069 $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 140*c77a61a7Syz147069 $(WARLOCK_OUT) \ 141*c77a61a7Syz147069 -l ../warlock/ddi_dki_impl.ll 142*c77a61a7Syz147069 143*c77a61a7Syz147069usba_files: 144*c77a61a7Syz147069 @cd ../usba;pwd; $(MAKE) warlock 145*c77a61a7Syz147069 146*c77a61a7Syz147069ohci_files: 147*c77a61a7Syz147069 @cd ../ohci;pwd; $(MAKE) warlock 148*c77a61a7Syz147069 149*c77a61a7Syz147069uhci_files: 150*c77a61a7Syz147069 @cd ../uhci;pwd; $(MAKE) warlock 151*c77a61a7Syz147069 152*c77a61a7Syz147069ehci_files: 153*c77a61a7Syz147069 @cd ../ehci;pwd; $(MAKE) warlock 154*c77a61a7Syz147069 155*c77a61a7Syz147069warlock_ddi.files: 156*c77a61a7Syz147069 cd ../warlock; pwd; $(MAKE) warlock 157