Makefile revision e272e4c8df90e762ecb6a6564503bb2cb1e2027d
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# CDDL HEADER START
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User#
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# or http://www.opensolaris.org/os/licensing.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Use is subject to license terms.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# uts/sparc/usb_ac/Makefile
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# This makefile drives the production of the usb_ac driver
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic Updater# kernel module. sparc architecture dependent
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User#
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic Updater#
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic Updater# Path to the base of the uts directory tree (usually /usr/src/uts).
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic Updater#
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic UpdaterUTSBASE = ../..
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User#
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic Updater# Define the module and object file sets.
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic Updater#
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserMODULE = usb_ac
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserOBJECTS = $(USB_AC_OBJS:%=$(OBJS_DIR)/%)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserLINTS = $(USB_AC_OBJS:%.o=$(LINTS_DIR)/%.ln)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
d856585f5fe37cc2ea82115c10339578d2b517b1Automatic UpdaterCONF_SRCDIR = $(UTSBASE)/common/io/usb/clients/audio/usb_ac
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinWARLOCK_OUT = $(USB_AC_OBJS:%.o=%.ll)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWARLOCK_OK = $(MODULE).ok
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWLCMD_DIR = $(UTSBASE)/common/io/warlock
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
f7b41fd9291b8f4dba27e2b57e1d93f0913a4f1dMark Andrews# Include common rules.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
f7b41fd9291b8f4dba27e2b57e1d93f0913a4f1dMark Andrewsinclude $(UTSBASE)/sparc/Makefile.sparc
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# lint pass one enforcement
d85c83c4144116fbc2734a6a623a888fea1a307fAutomatic Updater#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCFLAGS += $(CCVERBOSE)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinLDFLAGS += -dy -Nmisc/usba -Ndrv/audio
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Define targets
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
d85c83c4144116fbc2734a6a623a888fea1a307fAutomatic UpdaterALL_TARGET = $(BINARY) $(SRC_CONFILE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLINT_TARGET = $(MODULE).lint
d85c83c4144116fbc2734a6a623a888fea1a307fAutomatic UpdaterINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
d85c83c4144116fbc2734a6a623a888fea1a307fAutomatic Updater
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User# For now, disable these lint checks; maintainers should endeavor
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# to investigate and remove these for maximum lint coverage.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User# Please do not carry these forward to new Makefiles.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User#
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User.KEEP_STATE:
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox Userall: $(ALL_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeindef: $(DEF_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsclean: $(CLEAN_DEPS)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclobber: $(CLOBBER_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userlint: $(LINT_DEPS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usermodlintlib: $(MODLINTLIB_DEPS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclean.lint: $(CLEAN_LINT_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininstall: $(INSTALL_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Include common targets.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude $(UTSBASE)/sparc/Makefile.targ
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Defines for local commands.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWARLOCK = warlock
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWLCC = wlcc
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserTOUCH = touch
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinTEST = test
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# lock_lint rules
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
USBA_FILES = $(USBA_WITHOUT_WUSB_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_standalone warlock_usba.files warlock_with_usba
$(TOUCH) $(WARLOCK_OK)
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