Makefile revision 88447a05f537aabe9a1bc3d5313f22581ec992a7
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# CDDL HEADER START
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# You may not use this file except in compliance with the License.
28a8f5b0de57d269cf2845c69cb6abe18cbd3b3aMark Andrews#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# or http://www.opensolaris.org/os/licensing.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# See the License for the specific language governing permissions
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# and limitations under the License.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
e13d04fda918c0c14c2247475bb99e0760d9a6a4Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# If applicable, add the following below this CDDL HEADER, with the
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# fields enclosed by brackets "[]" replaced with your own identifying
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki# CDDL HEADER END
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# Use is subject to license terms.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# uts/intel/usb_ac/Makefile
b6d52ee5bea1b9d9074698e693b49ce96edff47bMark Andrews#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# This makefile drives the production of the usb_ac driver
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# kernel module. Intel architecture dependent
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# Path to the base of the uts directory tree (usually /usr/src/uts).
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonUTSBASE = ../..
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafsson# Define the module and object file sets.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonMODULE = usb_ac
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonOBJECTS = $(USB_AC_OBJS:%=$(OBJS_DIR)/%)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonLINTS = $(USB_AC_OBJS:%.o=$(LINTS_DIR)/%.ln)
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas GustafssonROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonCONF_SRCDIR = $(UTSBASE)/common/io/usb/clients/audio/usb_ac
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonWARLOCK_OUT = $(USB_AC_OBJS:%.o=%.ll)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonWARLOCK_OK = $(MODULE).ok
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonWLCMD_DIR = $(UTSBASE)/common/io/warlock
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafsson# Include common rules.
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews#
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafssoninclude $(UTSBASE)/intel/Makefile.intel
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafsson
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafsson#
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafsson# Define targets
a8f94d29b38872fbc6cf9a1a8223ff8453357da1Andreas Gustafsson#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonALL_TARGET = $(BINARY) $(SRC_CONFILE)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonLINT_TARGET = $(MODULE).lint
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# Override defaults to build a unique, local modstubs.o.
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews#
9f7d51ee3290e2a064d71016a6bd555b47134a7cMark AndrewsMODSTUBS_DIR = $(OBJS_DIR)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonCLEANFILES += $(MODSTUBS_O)
b0c8948e3793f621c3fb6e70e61a33e8c2dd90ceEvan Hunt
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# depends on misc/usba
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonLDFLAGS += -dy -Nmisc/usba -Ndrv/audio
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington# Default build targets.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#
f687e639f00a31e0884fb2c95a627b10b50c364bEvan Hunt.KEEP_STATE:
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
8a5809527e6c85e39699901712a455d5480907c1Evan Huntdef: $(DEF_DEPS)
8a5809527e6c85e39699901712a455d5480907c1Evan Hunt
8a5809527e6c85e39699901712a455d5480907c1Evan Huntall: $(ALL_DEPS)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonclean: $(CLEAN_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
clobber: $(CLOBBER_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
TEST = test
#
# lock_lint rules
#
USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
#
# Warlock targets
#
warlock: $(WARLOCK_OK)
$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files \
warlock_audiosup.files warlock_mixer.files \
warlock_standalone warlock_with_usba warlock_with_sada
$(TOUCH) $(WARLOCK_OK)
warlock_with_sada: $(WLCMD_DIR)/usb_ac_with_sada.wlcmd \
$(WARLOCK_OUT) \
warlock_audiosup.files warlock_mixer.files warlock_amsrc2.files
$(WARLOCK) -c $(WLCMD_DIR)/usb_ac_with_sada.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_usba: $(WLCMD_DIR)/usb_ac_with_usba.wlcmd $(WARLOCK_OUT) \
warlock_ddi.files warlock_usba.files warlock_ohci.files \
warlock_ehci.files warlock_uhci.files
$(WARLOCK) -c $(WLCMD_DIR)/usb_ac_with_usba.wlcmd \
$(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
$(WARLOCK_OUT) -l ../warlock/ddi_dki_impl.ll
warlock_standalone: $(WARLOCK_OUT) warlock_ddi.files $(WLCMD_DIR)/usb_ac.wlcmd
$(WARLOCK) -c $(WLCMD_DIR)/usb_ac.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
%.ll: $(UTSBASE)/common/io/usb/clients/audio/usb_ac/%.c
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_usba.files:
@cd ../usba;pwd; $(MAKE) warlock
warlock_ohci.files:
@cd ../ohci;pwd; $(MAKE) warlock
warlock_uhci.files:
@cd ../uhci;pwd; $(MAKE) warlock
warlock_ehci.files:
@cd ../ehci;pwd; $(MAKE) warlock
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock
warlock_audiosup.files:
@cd ../audiosup; pwd; $(MAKE) warlock
warlock_mixer.files:
@cd ../mixer; pwd; $(MAKE) warlock
warlock_amsrc2.files:
@cd ../amsrc2; pwd; $(MAKE) warlock