1de81e71eSTim Marsland# 2de81e71eSTim Marsland# CDDL HEADER START 3de81e71eSTim Marsland# 4de81e71eSTim Marsland# The contents of this file are subject to the terms of the 5de81e71eSTim Marsland# Common Development and Distribution License (the "License"). 6de81e71eSTim Marsland# You may not use this file except in compliance with the License. 7de81e71eSTim Marsland# 8de81e71eSTim Marsland# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9de81e71eSTim Marsland# or http://www.opensolaris.org/os/licensing. 10de81e71eSTim Marsland# See the License for the specific language governing permissions 11de81e71eSTim Marsland# and limitations under the License. 12de81e71eSTim Marsland# 13de81e71eSTim Marsland# When distributing Covered Code, include this CDDL HEADER in each 14de81e71eSTim Marsland# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15de81e71eSTim Marsland# If applicable, add the following below this CDDL HEADER, with the 16de81e71eSTim Marsland# fields enclosed by brackets "[]" replaced with your own identifying 17de81e71eSTim Marsland# information: Portions Copyright [yyyy] [name of copyright owner] 18de81e71eSTim Marsland# 19de81e71eSTim Marsland# CDDL HEADER END 20de81e71eSTim Marsland# 21de81e71eSTim Marsland# 22de81e71eSTim Marsland# uts/intel/usbftdi/Makefile 23de81e71eSTim Marsland# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24de81e71eSTim Marsland# Use is subject to license terms. 25de81e71eSTim Marsland# 26de81e71eSTim Marsland# 27de81e71eSTim Marsland# This makefile drives the production of the FT232R USB Serial 28de81e71eSTim Marsland# Adapter driver. 29de81e71eSTim Marsland# 30de81e71eSTim Marsland# Path to the base of the uts directory tree (usually /usr/src/uts). 31de81e71eSTim Marsland# 32de81e71eSTim MarslandUTSBASE = ../.. 33de81e71eSTim Marsland 34de81e71eSTim Marsland# 35de81e71eSTim Marsland# Define the module and object file sets. 36de81e71eSTim Marsland# 37de81e71eSTim MarslandMODULE = usbftdi 38de81e71eSTim MarslandOBJECTS = $(USBFTDI_OBJS:%=$(OBJS_DIR)/%) 39de81e71eSTim MarslandLINTS = $(USBFTDI_OBJS:%.o=$(LINTS_DIR)/%.ln) 40de81e71eSTim MarslandWARLOCK_OUT = $(USBFTDI_OBJS:%.o=%.ll) 41de81e71eSTim MarslandWARLOCK_OK = $(MODULE).ok 4240a3f5ceSTim MarslandROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 43de81e71eSTim MarslandCONF_SRCDIR = $(UTSBASE)/common/io/usb/clients/usbser/usbftdi 44de81e71eSTim MarslandWLCMD_DIR = $(UTSBASE)/common/io/warlock 45de81e71eSTim Marsland 46de81e71eSTim Marsland# 47de81e71eSTim Marsland# Include common rules. 48de81e71eSTim Marsland# 49de81e71eSTim Marslandinclude $(UTSBASE)/intel/Makefile.intel 50de81e71eSTim Marsland 51*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 52*7014882cSRichard Lowe 53de81e71eSTim MarslandLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser 54de81e71eSTim Marsland 55de81e71eSTim Marsland# 56de81e71eSTim Marsland# Define targets 57de81e71eSTim Marsland# 58de81e71eSTim MarslandALL_TARGET = $(BINARY) $(SRC_CONFFILE) 59de81e71eSTim MarslandLINT_TARGET = $(MODULE).lint 60de81e71eSTim MarslandINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 61de81e71eSTim Marsland 62de81e71eSTim Marsland.KEEP_STATE: 63de81e71eSTim Marsland 64de81e71eSTim Marslandall: $(ALL_DEPS) 65de81e71eSTim Marsland 66de81e71eSTim Marslanddef: $(DEF_DEPS) 67de81e71eSTim Marsland 68de81e71eSTim Marslandclean: $(CLEAN_DEPS) 69de81e71eSTim Marsland $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 70de81e71eSTim Marsland 71de81e71eSTim Marslandclobber: $(CLOBBER_DEPS) 72de81e71eSTim Marsland $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 73de81e71eSTim Marsland 74de81e71eSTim Marslandlint: $(LINT_DEPS) 75de81e71eSTim Marsland 76de81e71eSTim Marslandmodlintlib: $(MODLINTLIB_DEPS) 77de81e71eSTim Marsland 78de81e71eSTim Marslandclean.lint: $(CLEAN_LINT_DEPS) 79de81e71eSTim Marsland 80de81e71eSTim Marslandinstall: $(INSTALL_DEPS) 81de81e71eSTim Marsland 82de81e71eSTim Marsland# 83de81e71eSTim Marsland# Include common targets. 84de81e71eSTim Marsland# 85de81e71eSTim Marslandinclude $(UTSBASE)/intel/Makefile.targ 86de81e71eSTim Marsland 87de81e71eSTim Marsland# 88de81e71eSTim Marsland# Defines for local commands. 89de81e71eSTim Marsland# 90de81e71eSTim MarslandWLCC = wlcc 91de81e71eSTim MarslandTOUCH = touch 92de81e71eSTim MarslandWARLOCK = warlock 93de81e71eSTim MarslandTEST = test 94de81e71eSTim Marsland 95de81e71eSTim Marsland# 96de81e71eSTim Marsland# warlock 97de81e71eSTim Marsland# 98de81e71eSTim MarslandWARLOCK_CMD = $(WLCMD_DIR)/$(MODULE).wlcmd 99de81e71eSTim MarslandUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll) 100489b7c4aSRaymond ChenUSBA_FILES = $(USBA_WITHOUT_WUSB_OBJS:%.o=../usba/%.ll) 101de81e71eSTim MarslandUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 102de81e71eSTim MarslandOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 103de81e71eSTim MarslandEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 104de81e71eSTim Marsland 105de81e71eSTim Marslandwarlock: $(WARLOCK_OK) 106de81e71eSTim Marsland 107de81e71eSTim Marsland$(WARLOCK_OK): warlock_with_usba warlock_with_usbser 108de81e71eSTim Marsland $(TOUCH) $@ 109de81e71eSTim Marsland 110de81e71eSTim Marsland%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbftdi/%.c 111de81e71eSTim Marsland $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 112de81e71eSTim Marsland 113de81e71eSTim Marslandwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \ 114de81e71eSTim Marsland $(WARLOCK_CMD) 115de81e71eSTim Marsland $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \ 116de81e71eSTim Marsland $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll 117de81e71eSTim Marsland 118de81e71eSTim Marslandwarlock_with_usba: $(WARLOCK_OUT) usbser_files \ 119de81e71eSTim Marsland $(WLCMD_DIR)/usbftdi_with_usba.wlcmd usba_files ohci_files uhci_files \ 120de81e71eSTim Marsland ehci_files warlock_ddi.files 121de81e71eSTim Marsland $(WARLOCK) -c $(WLCMD_DIR)/usbftdi_with_usba.wlcmd \ 122de81e71eSTim Marsland $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 123de81e71eSTim Marsland $(USBSER_FILES) \ 124de81e71eSTim Marsland $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll 125de81e71eSTim Marsland 126de81e71eSTim Marslandusbser_files: 127de81e71eSTim Marsland @cd ../usbser; pwd; $(MAKE) warlock 128de81e71eSTim Marsland 129de81e71eSTim Marslandusba_files: 130de81e71eSTim Marsland @cd ../usba;pwd; $(MAKE) warlock 131de81e71eSTim Marsland 132de81e71eSTim Marslanduhci_files: 133de81e71eSTim Marsland @cd ../uhci;pwd; $(MAKE) warlock 134de81e71eSTim Marsland 135de81e71eSTim Marslandohci_files: 136de81e71eSTim Marsland @cd ../ohci;pwd; $(MAKE) warlock 137de81e71eSTim Marsland 138de81e71eSTim Marslandehci_files: 139de81e71eSTim Marsland @cd ../ehci;pwd; $(MAKE) warlock 140de81e71eSTim Marsland 141de81e71eSTim Marslandwarlock_ddi.files: 142de81e71eSTim Marsland cd ../warlock; pwd; $(MAKE) warlock 143