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