Makefile revision 489b7c4ab76ae8df137fbfcc2214f7baa52883a0
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#
5cd4555ad444fd391002ae32450572054369fd42Rob Austein# CDDL HEADER START
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# The contents of this file are subject to the terms of the
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updater# Common Development and Distribution License (the "License").
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# You may not use this file except in compliance with the License.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# or http://www.opensolaris.org/os/licensing.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# See the License for the specific language governing permissions
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# CDDL HEADER END
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews#
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updater#
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# uts/intel/usbsprl/Makefile
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# Use is subject to license terms.
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# This makefile drives the production of the Prolific USB Serial
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# Adapter driver.
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# Path to the base of the uts directory tree (usually /usr/src/uts).
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonUTSBASE = ../..
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Define the module and object file sets.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
141132c272ebc41da4c55d69c49810fafadbbc11Mark AndrewsMODULE = usbsprl
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark AndrewsOBJECTS = $(USBSPRL_OBJS:%=$(OBJS_DIR)/%)
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic UpdaterLINTS = $(USBSPRL_OBJS:%.o=$(LINTS_DIR)/%.ln)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinWARLOCK_OUT = $(USBSPRL_OBJS:%.o=%.ll)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinWARLOCK_OK = $(MODULE).ok
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinWLCMD_DIR = $(UTSBASE)/common/io/warlock
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# Include common rules.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(UTSBASE)/intel/Makefile.intel
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Define targets
c40265eba0c99708887d68e67901924065ba2514Brian Wellington#
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonALL_TARGET = $(BINARY)
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonLINT_TARGET = $(MODULE).lint
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington.KEEP_STATE:
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews
bca7f81db58d4803fb6d8d352132445cf61eb1acMark Andrewsall: $(ALL_DEPS)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a26ad011f382d12058478704cb5e90e6f4366d01Andreas Gustafssondef: $(DEF_DEPS)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsclean: $(CLEAN_DEPS)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews
2047977ce2dfcfe3a0fa2d638c3242841310fad3Mark Andrewsclobber: $(CLOBBER_DEPS)
c5223c9cb7c22620d5ee6611228673e95b48a270Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark Andrews
4d9f3f00d93fcb8743b1105e8cf82e862be220d1Mark Andrewslint: $(LINT_DEPS)
d0aebc5a55b6145297d94f8aee939852357c59fcMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsinstall: $(INSTALL_DEPS)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Include common targets.
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsinclude $(UTSBASE)/intel/Makefile.targ
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Defines for local commands.
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsWLCC = wlcc
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsTOUCH = touch
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark AndrewsWARLOCK = warlock
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsTEST = test
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# warlock
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews#
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsWARLOCK_CMD = $(WLCMD_DIR)/$(MODULE).wlcmd
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsUSBA_FILES = $(USBA_WITHOUT_WUSB_OBJS:%.o=../usba/%.ll)
43efd9fa56b03e3e285fb58859efc9348c7f4a9fMark AndrewsUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
43efd9fa56b03e3e285fb58859efc9348c7f4a9fMark AndrewsOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
d0aebc5a55b6145297d94f8aee939852357c59fcMark AndrewsEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
508f61f8d699c46f962b682f388e54b446a7194dMark Andrews
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtonwarlock: $(WARLOCK_OK)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington$(WARLOCK_OK): warlock_with_usba warlock_with_usbser
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(TOUCH) $@
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsprl/%.c
c40265eba0c99708887d68e67901924065ba2514Brian Wellington $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(WARLOCK_CMD)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewswarlock_with_usba: $(WARLOCK_OUT) usbser_files \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(WLCMD_DIR)/usbsprl_with_usba.wlcmd usba_files ohci_files uhci_files \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews ehci_files warlock_ddi.files
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(WARLOCK) -c $(WLCMD_DIR)/usbsprl_with_usba.wlcmd \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(USBSER_FILES) \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
8b9fc7617b8f54641708c985697848e6cc10a5bbMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrewsusbser_files:
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews @cd ../usbser; pwd; $(MAKE) warlock
728a9bec1fe3a56fedfd672e7f34d2d82631d1d7Mark Andrews
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtonusba_files:
c40265eba0c99708887d68e67901924065ba2514Brian Wellington @cd ../usba;pwd; $(MAKE) warlock
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtonuhci_files:
c40265eba0c99708887d68e67901924065ba2514Brian Wellington @cd ../uhci;pwd; $(MAKE) warlock
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtonohci_files:
c40265eba0c99708887d68e67901924065ba2514Brian Wellington @cd ../ohci;pwd; $(MAKE) warlock
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinehci_files:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein @cd ../ehci;pwd; $(MAKE) warlock
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinwarlock_ddi.files:
c40265eba0c99708887d68e67901924065ba2514Brian Wellington cd ../warlock; pwd; $(MAKE) warlock
c40265eba0c99708887d68e67901924065ba2514Brian Wellington