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