1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# 23# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# uts/sparc/usbsksp/Makefile 27 28#ident "%Z%%M% %I% %E% SMI" 29 30# 31# This makefile drives the production of the Keyspan USB Serial 32# Adapter driver. 33# 34# Path to the base of the uts directory tree (usually /usr/src/uts). 35# 36UTSBASE = ../.. 37 38# 39# Define the module and object file sets. 40# 41MODULE = usbsksp 42OBJECTS = $(USBSER_KEYSPAN_OBJS:%=$(OBJS_DIR)/%) 43LINTS = $(USBSER_KEYSPAN_OBJS:%.o=$(LINTS_DIR)/%.ln) 44ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 45WARLOCK_OUT = $(USBSER_KEYSPAN_OBJS:%.o=%.ll) 46WARLOCK_OK = $(MODULE).ok 47WLCMD_DIR = $(UTSBASE)/common/io/warlock 48 49# 50# Include common rules. 51# 52include $(UTSBASE)/sparc/Makefile.sparc 53 54# 55# lint pass one enforcement 56# 57CFLAGS += $(CCVERBOSE) 58 59LDFLAGS += -dy -Nmisc/usba -Nmisc/usbser -Nmisc/usbs49_fw 60 61# 62# Define targets 63# 64ALL_TARGET = $(BINARY) 65LINT_TARGET = $(MODULE).lint 66INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 67 68# 69# For now, disable these lint checks; maintainers should endeavor 70# to investigate and remove these for maximum lint coverage. 71# Please do not carry these forward to new Makefiles. 72# 73LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 74LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 75 76.KEEP_STATE: 77 78all: $(ALL_DEPS) 79 80def: $(DEF_DEPS) 81 82clean: $(CLEAN_DEPS) 83 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 84 85clobber: $(CLOBBER_DEPS) 86 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 87 88lint: $(LINT_DEPS) 89 90modlintlib: $(MODLINTLIB_DEPS) 91 92clean.lint: $(CLEAN_LINT_DEPS) 93 94install: $(INSTALL_DEPS) 95 96# 97# Include common targets. 98# 99include $(UTSBASE)/sparc/Makefile.targ 100 101# 102# Defines for local commands. 103# 104WLCC = wlcc 105TOUCH = touch 106WARLOCK = warlock 107TEST = test 108 109# 110# warlock 111# 112WARLOCK_CMD = $(WLCMD_DIR)/usbser_keyspan.wlcmd 113USBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll) 114USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll) 115UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 116OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 117EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 118 119warlock: $(WARLOCK_OK) 120 121$(WARLOCK_OK): warlock_with_usba warlock_with_usbser 122 $(TOUCH) $@ 123 124%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c 125 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 126 127warlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \ 128 $(WARLOCK_CMD) 129 $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \ 130 $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll 131 132warlock_with_usba: $(WLCMD_DIR)/usbser_keyspan_with_usba.wlcmd $(WARLOCK_OUT) \ 133 usbser_files usba_files ohci_files uhci_files ehci_files \ 134 warlock_ddi.files 135 $(WARLOCK) -c $(WLCMD_DIR)/usbser_keyspan_with_usba.wlcmd \ 136 $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 137 $(USBSER_FILES) \ 138 $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll 139 140usbser_files: 141 @cd ../usbser; pwd; $(MAKE) warlock 142 143usba_files: 144 @cd ../usba;pwd; $(MAKE) warlock 145 146uhci_files: 147 @cd ../uhci;pwd; $(MAKE) warlock 148 149ohci_files: 150 @cd ../ohci;pwd; $(MAKE) warlock 151 152ehci_files: 153 @cd ../ehci;pwd; $(MAKE) warlock 154 155warlock_ddi.files: 156 cd ../warlock; pwd; $(MAKE) warlock 157