Makefile revision bf56214c0556fa6864189c826d39dbe156bb22a0
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# CDDL HEADER START
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# The contents of this file are subject to the terms of the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# Common Development and Distribution License (the "License").
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# You may not use this file except in compliance with the License.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# or http://www.opensolaris.org/os/licensing.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# See the License for the specific language governing permissions
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# and limitations under the License.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# When distributing Covered Code, include this CDDL HEADER in each
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# If applicable, add the following below this CDDL HEADER, with the
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# fields enclosed by brackets "[]" replaced with your own identifying
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# information: Portions Copyright [yyyy] [name of copyright owner]
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# CDDL HEADER END
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye#
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner# uts/intel/usbsacm/Makefile
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner# Use is subject to license terms.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#ident "%Z%%M% %I% %E% SMI"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner# This makefile drives the production of Abstract Control Model of
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# USB Communication Devices Class dirver.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner# Path to the base of the uts directory tree (usually /usr/src/uts).
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerUTSBASE = ../..
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbye# Define the module and object file sets.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenMODULE = usbsacm
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenOBJECTS = $(USBSACM_OBJS:%=$(OBJS_DIR)/%)
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerLINTS = $(USBSACM_OBJS:%.o=$(LINTS_DIR)/%.ln)
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerWARLOCK_OUT = $(USBSACM_OBJS:%.o=%.ll)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenWARLOCK_OK = $(MODULE).ok
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenWLCMD_DIR = $(UTSBASE)/common/io/warlock
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# Include common rules.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude $(UTSBASE)/intel/Makefile.intel
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerLDFLAGS += -dy -Nmisc/usba -Nmisc/usbser
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# Define targets
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerALL_TARGET = $(BINARY)
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerLINT_TARGET = $(MODULE).lint
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# For now, disable these lint checks; maintainers should endeavor
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# to investigate and remove these for maximum lint coverage.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner# Please do not carry these forward to new Makefiles.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner#
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen.KEEP_STATE:
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlenall: $(ALL_DEPS)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlendef: $(DEF_DEPS)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlenclean: $(CLEAN_DEPS)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerclobber: $(CLOBBER_DEPS)
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Koscolint: $(LINT_DEPS)
60281ca3d1db22f5d2204e1be4975504853072a7Lubos Kosco
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Koscomodlintlib: $(MODLINTLIB_DEPS)
60281ca3d1db22f5d2204e1be4975504853072a7Lubos Kosco
60281ca3d1db22f5d2204e1be4975504853072a7Lubos Koscoclean.lint: $(CLEAN_LINT_DEPS)
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatleninstall: $(INSTALL_DEPS)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# Include common targets.
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco#
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Koscoinclude $(UTSBASE)/intel/Makefile.targ
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# Defines for local commands.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenWLCC = wlcc
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTOUCH = touch
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenWARLOCK = warlock
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenTEST = test
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen# warlock
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen#
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenWARLOCK_CMD = $(WLCMD_DIR)/$(MODULE).wlcmd
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenUSBSER_FILES = $(USBSER_OBJS:%.o=../usbser/%.ll)
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos KoscoEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerwarlock: $(WARLOCK_OK)
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen$(WARLOCK_OK): warlock_with_usbser warlock_with_usba
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(TOUCH) $@
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen%.ll: $(UTSBASE)/common/io/usb/clients/usbser/usbsacm/%.c
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerwarlock_with_usbser: $(WARLOCK_OUT) usbser_files warlock_ddi.files \
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen $(WARLOCK_CMD)
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(WARLOCK) -c $(WARLOCK_CMD) $(WARLOCK_OUT) \
e655c7911217c7948ee6d9eb73bff3a712b0fa70Lubos Kosco $(USBSER_FILES) -l ../warlock/ddi_dki_impl.ll
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlenwarlock_with_usba: $(WLCMD_DIR)/usbsacm_with_usba.wlcmd $(WARLOCK_OUT) \
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner usbser_files usba_files ohci_files uhci_files ehci_files \
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen warlock_ddi.files
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(WARLOCK) -c $(WLCMD_DIR)/usbsacm_with_usba.wlcmd \
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(USBSER_FILES) \
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner $(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerusbser_files:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner @cd ../usbser; pwd; $(MAKE) warlock
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerusba_files:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner @cd ../usba;pwd; $(MAKE) warlock
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elkneruhci_files:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner @cd ../uhci;pwd; $(MAKE) warlock
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlenohci_files:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner @cd ../ohci;pwd; $(MAKE) warlock
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlenehci_files:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner @cd ../ehci;pwd; $(MAKE) warlock
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerwarlock_ddi.files:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner cd ../warlock; pwd; $(MAKE) warlock
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner