1*d73ae94eSgc161489# 2*d73ae94eSgc161489# CDDL HEADER START 3*d73ae94eSgc161489# 4*d73ae94eSgc161489# The contents of this file are subject to the terms of the 5*d73ae94eSgc161489# Common Development and Distribution License (the "License"). 6*d73ae94eSgc161489# You may not use this file except in compliance with the License. 7*d73ae94eSgc161489# 8*d73ae94eSgc161489# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*d73ae94eSgc161489# or http://www.opensolaris.org/os/licensing. 10*d73ae94eSgc161489# See the License for the specific language governing permissions 11*d73ae94eSgc161489# and limitations under the License. 12*d73ae94eSgc161489# 13*d73ae94eSgc161489# When distributing Covered Code, include this CDDL HEADER in each 14*d73ae94eSgc161489# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*d73ae94eSgc161489# If applicable, add the following below this CDDL HEADER, with the 16*d73ae94eSgc161489# fields enclosed by brackets "[]" replaced with your own identifying 17*d73ae94eSgc161489# information: Portions Copyright [yyyy] [name of copyright owner] 18*d73ae94eSgc161489# 19*d73ae94eSgc161489# CDDL HEADER END 20*d73ae94eSgc161489# 21*d73ae94eSgc161489# 22*d73ae94eSgc161489# uts/intel/usb_ia/Makefile 23*d73ae94eSgc161489# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*d73ae94eSgc161489# Use is subject to license terms. 25*d73ae94eSgc161489# 26*d73ae94eSgc161489#ident "%Z%%M% %I% %E% SMI" 27*d73ae94eSgc161489# 28*d73ae94eSgc161489# This makefile drives the production of the usb_ia driver kernel module. 29*d73ae94eSgc161489# 30*d73ae94eSgc161489 31*d73ae94eSgc161489# 32*d73ae94eSgc161489# Path to the base of the uts directory tree (usually /usr/src/uts). 33*d73ae94eSgc161489# 34*d73ae94eSgc161489UTSBASE = ../.. 35*d73ae94eSgc161489 36*d73ae94eSgc161489# 37*d73ae94eSgc161489# Define the module and object file sets. 38*d73ae94eSgc161489# 39*d73ae94eSgc161489MODULE = usb_ia 40*d73ae94eSgc161489OBJECTS = $(USB_IA_OBJS:%=$(OBJS_DIR)/%) 41*d73ae94eSgc161489LINTS = $(USB_IA_OBJS:%.o=$(LINTS_DIR)/%.ln) 42*d73ae94eSgc161489ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 43*d73ae94eSgc161489WARLOCK_OUT = $(USB_IA_OBJS:%.o=%.ll) 44*d73ae94eSgc161489WARLOCK_OK = $(MODULE).ok 45*d73ae94eSgc161489WLCMD_DIR = $(UTSBASE)/common/io/warlock 46*d73ae94eSgc161489 47*d73ae94eSgc161489# 48*d73ae94eSgc161489# Include common rules. 49*d73ae94eSgc161489# 50*d73ae94eSgc161489include $(UTSBASE)/intel/Makefile.intel 51*d73ae94eSgc161489 52*d73ae94eSgc161489# 53*d73ae94eSgc161489# Define targets 54*d73ae94eSgc161489# 55*d73ae94eSgc161489ALL_TARGET = $(BINARY) 56*d73ae94eSgc161489LINT_TARGET = $(MODULE).lint 57*d73ae94eSgc161489INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 58*d73ae94eSgc161489 59*d73ae94eSgc161489# 60*d73ae94eSgc161489# Override defaults to build a unique, local modstubs.o. 61*d73ae94eSgc161489# 62*d73ae94eSgc161489MODSTUBS_DIR = $(OBJS_DIR) 63*d73ae94eSgc161489CLEANFILES += $(MODSTUBS_O) 64*d73ae94eSgc161489 65*d73ae94eSgc161489# 66*d73ae94eSgc161489# depends on misc/usba 67*d73ae94eSgc161489# 68*d73ae94eSgc161489LDFLAGS += -dy -Nmisc/usba 69*d73ae94eSgc161489 70*d73ae94eSgc161489# 71*d73ae94eSgc161489# Default build targets. 72*d73ae94eSgc161489# 73*d73ae94eSgc161489.KEEP_STATE: 74*d73ae94eSgc161489 75*d73ae94eSgc161489def: $(DEF_DEPS) 76*d73ae94eSgc161489 77*d73ae94eSgc161489all: $(ALL_DEPS) 78*d73ae94eSgc161489 79*d73ae94eSgc161489clean: $(CLEAN_DEPS) 80*d73ae94eSgc161489 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 81*d73ae94eSgc161489 82*d73ae94eSgc161489clobber: $(CLOBBER_DEPS) 83*d73ae94eSgc161489 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 84*d73ae94eSgc161489 85*d73ae94eSgc161489lint: $(LINT_DEPS) 86*d73ae94eSgc161489 87*d73ae94eSgc161489modlintlib: $(MODLINTLIB_DEPS) 88*d73ae94eSgc161489 89*d73ae94eSgc161489clean.lint: $(CLEAN_LINT_DEPS) 90*d73ae94eSgc161489 91*d73ae94eSgc161489install: $(INSTALL_DEPS) 92*d73ae94eSgc161489 93*d73ae94eSgc161489# 94*d73ae94eSgc161489# Include common targets. 95*d73ae94eSgc161489# 96*d73ae94eSgc161489include $(UTSBASE)/intel/Makefile.targ 97*d73ae94eSgc161489 98*d73ae94eSgc161489# 99*d73ae94eSgc161489# Defines for local commands. 100*d73ae94eSgc161489# 101*d73ae94eSgc161489WARLOCK = warlock 102*d73ae94eSgc161489WLCC = wlcc 103*d73ae94eSgc161489TOUCH = touch 104*d73ae94eSgc161489SCCS = sccs 105*d73ae94eSgc161489TEST = test 106*d73ae94eSgc161489 107*d73ae94eSgc161489# 108*d73ae94eSgc161489# lock_lint rules 109*d73ae94eSgc161489# 110*d73ae94eSgc161489USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll) 111*d73ae94eSgc161489UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 112*d73ae94eSgc161489OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 113*d73ae94eSgc161489EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 114*d73ae94eSgc161489 115*d73ae94eSgc161489warlock: $(WARLOCK_OK) warlock_with_usba 116*d73ae94eSgc161489 117*d73ae94eSgc161489%.wlcmd: 118*d73ae94eSgc161489 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 119*d73ae94eSgc161489 120*d73ae94eSgc161489$(WARLOCK_OK): $(WARLOCK_OUT) usb_ia.wlcmd warlock_ddi.files 121*d73ae94eSgc161489 $(WARLOCK) -c $(WLCMD_DIR)/usb_ia.wlcmd $(WARLOCK_OUT) \ 122*d73ae94eSgc161489 -l ../warlock/ddi_dki_impl.ll 123*d73ae94eSgc161489 $(TOUCH) $@ 124*d73ae94eSgc161489 125*d73ae94eSgc161489%.ll: $(UTSBASE)/common/io/usb/usb_ia/%.c \ 126*d73ae94eSgc161489 $(UTSBASE)/common/sys/usb/usb_ia/usb_iavar.h 127*d73ae94eSgc161489 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 128*d73ae94eSgc161489 129*d73ae94eSgc161489warlock_with_usba: usb_ia_with_usba.wlcmd $(WARLOCK_OUT) usba_files \ 130*d73ae94eSgc161489 ohci_files ehci_files uhci_files warlock_ddi.files 131*d73ae94eSgc161489 $(WARLOCK) -c $(WLCMD_DIR)/usb_ia_with_usba.wlcmd \ 132*d73ae94eSgc161489 $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 133*d73ae94eSgc161489 $(WARLOCK_OUT) \ 134*d73ae94eSgc161489 -l ../warlock/ddi_dki_impl.ll 135*d73ae94eSgc161489 136*d73ae94eSgc161489usba_files: 137*d73ae94eSgc161489 @cd ../usba;pwd; $(MAKE) warlock 138*d73ae94eSgc161489 139*d73ae94eSgc161489uhci_files: 140*d73ae94eSgc161489 @cd ../uhci;pwd; $(MAKE) warlock 141*d73ae94eSgc161489 142*d73ae94eSgc161489ohci_files: 143*d73ae94eSgc161489 @cd ../ohci;pwd; $(MAKE) warlock 144*d73ae94eSgc161489 145*d73ae94eSgc161489ehci_files: 146*d73ae94eSgc161489 @cd ../ehci;pwd; $(MAKE) warlock 147*d73ae94eSgc161489 148*d73ae94eSgc161489warlock_ddi.files: 149*d73ae94eSgc161489 cd ../warlock; pwd; $(MAKE) warlock 150