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