Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# CDDL HEADER START
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# The contents of this file are subject to the terms of the
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# Common Development and Distribution License (the "License").
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# You may not use this file except in compliance with the License.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# or http://www.opensolaris.org/os/licensing.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# See the License for the specific language governing permissions
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# and limitations under the License.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# When distributing Covered Code, include this CDDL HEADER in each
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# If applicable, add the following below this CDDL HEADER, with the
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# fields enclosed by brackets "[]" replaced with your own identifying
107e00c8104649437b9520d0ba298dba659e7cd7JazzyNico# information: Portions Copyright [yyyy] [name of copyright owner]
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# CDDL HEADER END
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
b584ec166ed0f23e1460e3ad88e8a2511ad85975Sebastian Wüst# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# Use is subject to license terms.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# uts/intel/usb_ah/Makefile
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# This makefile drives the production of the usb_ah driver
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# kernel module. Intel architecture dependent
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#ident "%Z%%M% %I% %E% SMI"
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
1d483f1a659425765c3c9076adf3eea74dab1cd8Sebastian Wüst# Path to the base of the uts directory tree (usually /usr/src/uts).
1d483f1a659425765c3c9076adf3eea74dab1cd8Sebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian WüstUTSBASE = ../..
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
b8a1484510f4f74b0384356d7924c2ddd61318c5Sebastian Wüst# Define the module and object file sets.
b8a1484510f4f74b0384356d7924c2ddd61318c5Sebastian Wüst#
7cc5285e0a99d8e121e75abfdfea3474dcd6a86dSebastian WüstMODULE = usb_ah
7cc5285e0a99d8e121e75abfdfea3474dcd6a86dSebastian WüstOBJECTS = $(USB_AH_OBJS:%=$(OBJS_DIR)/%)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian WüstLINTS = $(USB_AH_OBJS:%.o=$(LINTS_DIR)/%.ln)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian WüstROOTMODULE = $(ROOT_STRMOD_DIR)/$(MODULE)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian WüstWARLOCK_OUT = $(USB_AH_OBJS:%.o=%.ll)
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian WüstWARLOCK_OK = $(MODULE).ok
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian WüstWLCMD_DIR = $(UTSBASE)/common/io/warlock
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst# Include common rules.
b8a1484510f4f74b0384356d7924c2ddd61318c5Sebastian Wüst#
b8a1484510f4f74b0384356d7924c2ddd61318c5Sebastian Wüstinclude $(UTSBASE)/intel/Makefile.intel
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst
b8a1484510f4f74b0384356d7924c2ddd61318c5Sebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst# Define targets
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian WüstALL_TARGET = $(BINARY)
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian WüstLINT_TARGET = $(MODULE).lint
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian WüstINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst#
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# Override defaults to build a unique, local modstubs.o.
b584ec166ed0f23e1460e3ad88e8a2511ad85975Sebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian WüstMODSTUBS_DIR = $(OBJS_DIR)
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian WüstCLEANFILES += $(MODSTUBS_O)
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian Wüst
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst# depends on misc/usba
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian Wüst#
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian WüstLDFLAGS += -dy -Nmisc/usba -Nhidparser -Nmisc/audiosup -Nmisc/mixer
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian Wüst#
1df3e4b7e3c0a95327614a979af4a29ce6c6dcefSebastian Wüst# For now, disable these lint checks; maintainers should endeavor
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst# to investigate and remove these for maximum lint coverage.
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst# Please do not carry these forward to new Makefiles.
7cc5285e0a99d8e121e75abfdfea3474dcd6a86dSebastian Wüst#
7cc5285e0a99d8e121e75abfdfea3474dcd6a86dSebastian WüstLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian WüstLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst# Default build targets.
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst#
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst.KEEP_STATE:
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstdef: $(DEF_DEPS)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstall: $(ALL_DEPS)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstclean: $(CLEAN_DEPS)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstclobber: $(CLOBBER_DEPS)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstlint: $(LINT_DEPS)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstmodlintlib: $(MODLINTLIB_DEPS)
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüst
a7a33ae997fd9caef6bdd807f5ee75bf60bf528aSebastian Wüstclean.lint: $(CLEAN_LINT_DEPS)
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüst
5051b59af15dfa3ae44b4bf4f10981649d37ff0eSebastian Wüstinstall: $(INSTALL_DEPS)
ce73efc40e53170d5ebd6de7102c6d718083e456Krzysztof Kosiński
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
SCCS = sccs
TEST = test
#
# lock_lint rules
#
warlock: $(WARLOCK_OK)
%.wlcmd:
cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
$(WARLOCK_OK): $(WARLOCK_OUT) usb_ah.wlcmd warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/usb_ah.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/usb/clients/audio/usb_ah/%.c \
$(UTSBASE)/common/sys/usb/clients/audio/usb_ah/usb_ah.h
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_ddi.files:
cd ../warlock; pwd; $(MAKE) warlock