1d73ae94eSgc# 2d73ae94eSgc# CDDL HEADER START 3d73ae94eSgc# 4d73ae94eSgc# The contents of this file are subject to the terms of the 5d73ae94eSgc# Common Development and Distribution License (the "License"). 6d73ae94eSgc# You may not use this file except in compliance with the License. 7d73ae94eSgc# 8d73ae94eSgc# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9d73ae94eSgc# or http://www.opensolaris.org/os/licensing. 10d73ae94eSgc# See the License for the specific language governing permissions 11d73ae94eSgc# and limitations under the License. 12d73ae94eSgc# 13d73ae94eSgc# When distributing Covered Code, include this CDDL HEADER in each 14d73ae94eSgc# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15d73ae94eSgc# If applicable, add the following below this CDDL HEADER, with the 16d73ae94eSgc# fields enclosed by brackets "[]" replaced with your own identifying 17d73ae94eSgc# information: Portions Copyright [yyyy] [name of copyright owner] 18d73ae94eSgc# 19d73ae94eSgc# CDDL HEADER END 20d73ae94eSgc# 21d73ae94eSgc# 22d73ae94eSgc# uts/intel/usb_ia/Makefile 23489b7c4aSRaymond Chen# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24d73ae94eSgc# Use is subject to license terms. 25d73ae94eSgc# 26*e2c88f0cSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org> 27d73ae94eSgc# 28d73ae94eSgc# This makefile drives the production of the usb_ia driver kernel module. 29d73ae94eSgc# 30d73ae94eSgc 31d73ae94eSgc# 32d73ae94eSgc# Path to the base of the uts directory tree (usually /usr/src/uts). 33d73ae94eSgc# 34d73ae94eSgcUTSBASE = ../.. 35d73ae94eSgc 36d73ae94eSgc# 37d73ae94eSgc# Define the module and object file sets. 38d73ae94eSgc# 39d73ae94eSgcMODULE = usb_ia 40d73ae94eSgcOBJECTS = $(USB_IA_OBJS:%=$(OBJS_DIR)/%) 41d73ae94eSgcLINTS = $(USB_IA_OBJS:%.o=$(LINTS_DIR)/%.ln) 42d73ae94eSgcROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 43d73ae94eSgcWARLOCK_OUT = $(USB_IA_OBJS:%.o=%.ll) 44d73ae94eSgcWARLOCK_OK = $(MODULE).ok 45d73ae94eSgcWLCMD_DIR = $(UTSBASE)/common/io/warlock 46d73ae94eSgc 47d73ae94eSgc# 48d73ae94eSgc# Include common rules. 49d73ae94eSgc# 50d73ae94eSgcinclude $(UTSBASE)/intel/Makefile.intel 51d73ae94eSgc 52d73ae94eSgc# 53d73ae94eSgc# Define targets 54d73ae94eSgc# 55d73ae94eSgcALL_TARGET = $(BINARY) 56d73ae94eSgcLINT_TARGET = $(MODULE).lint 57d73ae94eSgcINSTALL_TARGET = $(BINARY) $(ROOTMODULE) 58d73ae94eSgc 59d73ae94eSgc# 60d73ae94eSgc# Override defaults to build a unique, local modstubs.o. 61d73ae94eSgc# 62d73ae94eSgcMODSTUBS_DIR = $(OBJS_DIR) 63d73ae94eSgcCLEANFILES += $(MODSTUBS_O) 64d73ae94eSgc 65d73ae94eSgc# 66d73ae94eSgc# depends on misc/usba 67d73ae94eSgc# 68d73ae94eSgcLDFLAGS += -dy -Nmisc/usba 69d73ae94eSgc 70d73ae94eSgc# 71d73ae94eSgc# Default build targets. 72d73ae94eSgc# 73d73ae94eSgc.KEEP_STATE: 74d73ae94eSgc 75d73ae94eSgcdef: $(DEF_DEPS) 76d73ae94eSgc 77d73ae94eSgcall: $(ALL_DEPS) 78d73ae94eSgc 79d73ae94eSgcclean: $(CLEAN_DEPS) 80d73ae94eSgc $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 81d73ae94eSgc 82d73ae94eSgcclobber: $(CLOBBER_DEPS) 83d73ae94eSgc $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 84d73ae94eSgc 85d73ae94eSgclint: $(LINT_DEPS) 86d73ae94eSgc 87d73ae94eSgcmodlintlib: $(MODLINTLIB_DEPS) 88d73ae94eSgc 89d73ae94eSgcclean.lint: $(CLEAN_LINT_DEPS) 90d73ae94eSgc 91d73ae94eSgcinstall: $(INSTALL_DEPS) 92d73ae94eSgc 93d73ae94eSgc# 94d73ae94eSgc# Include common targets. 95d73ae94eSgc# 96d73ae94eSgcinclude $(UTSBASE)/intel/Makefile.targ 97d73ae94eSgc 98d73ae94eSgc# 99d73ae94eSgc# Defines for local commands. 100d73ae94eSgc# 101d73ae94eSgcWARLOCK = warlock 102d73ae94eSgcWLCC = wlcc 103d73ae94eSgcTOUCH = touch 104d73ae94eSgcTEST = test 105d73ae94eSgc 106d73ae94eSgc# 107d73ae94eSgc# lock_lint rules 108d73ae94eSgc# 109*e2c88f0cSGarrett D'AmoreUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll) 110d73ae94eSgcUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 111d73ae94eSgcOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 112d73ae94eSgcEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 113d73ae94eSgc 114d73ae94eSgcwarlock: $(WARLOCK_OK) warlock_with_usba 115d73ae94eSgc 116bf56214cSstevel$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usb_ia.wlcmd warlock_ddi.files 117d73ae94eSgc $(WARLOCK) -c $(WLCMD_DIR)/usb_ia.wlcmd $(WARLOCK_OUT) \ 118d73ae94eSgc -l ../warlock/ddi_dki_impl.ll 119d73ae94eSgc $(TOUCH) $@ 120d73ae94eSgc 121d73ae94eSgc%.ll: $(UTSBASE)/common/io/usb/usb_ia/%.c \ 122d73ae94eSgc $(UTSBASE)/common/sys/usb/usb_ia/usb_iavar.h 123d73ae94eSgc $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 124d73ae94eSgc 125bf56214cSstevelwarlock_with_usba: $(WLCMD_DIR)/usb_ia_with_usba.wlcmd $(WARLOCK_OUT) \ 126bf56214cSstevel usba_files ohci_files ehci_files uhci_files warlock_ddi.files 127d73ae94eSgc $(WARLOCK) -c $(WLCMD_DIR)/usb_ia_with_usba.wlcmd \ 128d73ae94eSgc $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 129d73ae94eSgc $(WARLOCK_OUT) \ 130d73ae94eSgc -l ../warlock/ddi_dki_impl.ll 131d73ae94eSgc 132d73ae94eSgcusba_files: 133d73ae94eSgc @cd ../usba;pwd; $(MAKE) warlock 134d73ae94eSgc 135d73ae94eSgcuhci_files: 136d73ae94eSgc @cd ../uhci;pwd; $(MAKE) warlock 137d73ae94eSgc 138d73ae94eSgcohci_files: 139d73ae94eSgc @cd ../ohci;pwd; $(MAKE) warlock 140d73ae94eSgc 141d73ae94eSgcehci_files: 142d73ae94eSgc @cd ../ehci;pwd; $(MAKE) warlock 143d73ae94eSgc 144d73ae94eSgcwarlock_ddi.files: 145d73ae94eSgc cd ../warlock; pwd; $(MAKE) warlock 146