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