Makefile revision d29f5a711240f866521445b1656d114da090335e
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# CDDL HEADER START
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# 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.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# or http://www.opensolaris.org/os/licensing.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# See the License for the specific language governing permissions
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# and limitations under the License.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# CDDL HEADER END
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# uts/intel/uhci/Makefile
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Use is subject to license terms.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# This makefile drives the production of the uhci driver kernel module.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Path to the base of the uts directory tree (usually /usr/src/uts).
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntUTSBASE = ../..
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox User# Define the module and object file sets.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserMODULE = uhci
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntOBJECTS = $(UHCI_OBJS:%=$(OBJS_DIR)/%)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLINTS = $(UHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONF_SRCDIR = $(UTSBASE)/common/io/usb/hcd/uhci
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWARLOCK_OUT = $(UHCI_OBJS:%.o=%.ll)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserWARLOCK_OK = $(MODULE).ok
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntWLCMD_DIR = $(UTSBASE)/common/io/warlock
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Include common rules.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(UTSBASE)/intel/Makefile.intel
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Define targets
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntALL_TARGET = $(BINARY) $(SRC_CONFFILE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLINT_TARGET = $(MODULE).lint
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Override defaults to build a unique, local modstubs.o.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserMODSTUBS_DIR = $(OBJS_DIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCLEANFILES += $(MODSTUBS_O)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# depends on misc/usba
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLDFLAGS += -dy -Nmisc/usba
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
6f1205897504b8f50b1785975482c995888dd630Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# For now, disable these lint checks; maintainers should endeavor
6f1205897504b8f50b1785975482c995888dd630Tinderbox User# to investigate and remove these for maximum lint coverage.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Please do not carry these forward to new Makefiles.
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater#
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User#
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# Default build targets.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User.KEEP_STATE:
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userdef: $(DEF_DEPS)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userall: $(ALL_DEPS)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userclean: $(CLEAN_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userclobber: $(CLOBBER_DEPS)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntlint: $(LINT_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updatermodlintlib: $(MODLINTLIB_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updaterclean.lint: $(CLEAN_LINT_DEPS)
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinstall: $(INSTALL_DEPS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Include common targets.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(UTSBASE)/intel/Makefile.targ
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Defines for local commands.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntWARLOCK = warlock
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntWLCC = wlcc
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntTOUCH = touch
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntTEST = test
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# lock_lint rules
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User#
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterUSBA_FILES = $(USBA_OBJS:%.o= -l ../usba/%.ll)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntwarlock: $(WARLOCK_OK)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/uhci.wlcmd warlock_ddi.files \
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt usba.files
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(WARLOCK) -c $(WLCMD_DIR)/uhci.wlcmd $(WARLOCK_OUT) \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(USBA_FILES) \
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt -l ../warlock/ddi_dki_impl.ll
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(TOUCH) $@
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt%.ll: $(UTSBASE)/common/io/usb/hcd/uhci/%.c
1700442a7751c2bbdafe2d039cebbd8316496957Tinderbox User $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntwarlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock
usba.files:
@cd ../usba; pwd; $(MAKE) warlock