Makefile revision e2c88f0c2610f16de7b639746b40dea5f3e2256e
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# CDDL HEADER START
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# The contents of this file are subject to the terms of the
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Common Development and Distribution License (the "License").
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# You may not use this file except in compliance with the License.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# or http://www.opensolaris.org/os/licensing.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# See the License for the specific language governing permissions
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# and limitations under the License.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# When distributing Covered Code, include this CDDL HEADER in each
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# If applicable, add the following below this CDDL HEADER, with the
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# fields enclosed by brackets "[]" replaced with your own identifying
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# information: Portions Copyright [yyyy] [name of copyright owner]
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# CDDL HEADER END
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# uts/sparc/usb_ia/Makefile
34f1a571c0d0c682a4a70b97b1e62430aa630559Michael Bergknoff
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Use is subject to license terms.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Copyright 2014 Garrett D'Amore <garrett@damore.org>
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# This makefile drives the production of the usb_ia driver kernel module.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# sparc architecture dependent
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Path to the base of the uts directory tree (usually /usr/src/uts).
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiUTSBASE = ../..
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Define the module and object file sets.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiMODULE = usb_ia
817697f4a28f704a2d88ace09406d985aa3a8549Kelly MoyerOBJECTS = $(USB_IA_OBJS:%=$(OBJS_DIR)/%)
34f1a571c0d0c682a4a70b97b1e62430aa630559Michael BergknoffLINTS = $(USB_IA_OBJS:%.o=$(LINTS_DIR)/%.ln)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiWARLOCK_OUT = $(USB_IA_OBJS:%.o=%.ll)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiWARLOCK_OK = $(MODULE).ok
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiWLCMD_DIR = $(UTSBASE)/common/io/warlock
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Include common rules.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(UTSBASE)/sparc/Makefile.sparc
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# lint pass one enforcement
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiCFLAGS += $(CCVERBOSE)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# depends on misc/usba
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiLDFLAGS += -dy -Nmisc/usba
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Define targets
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiALL_TARGET = $(BINARY)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiLINT_TARGET = $(MODULE).lint
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki.KEEP_STATE:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiall: $(ALL_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkidef: $(DEF_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiclean: $(CLEAN_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiclobber: $(CLOBBER_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkilint: $(LINT_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkimodlintlib: $(MODLINTLIB_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiclean.lint: $(CLEAN_LINT_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
1c60fca8a4c7f20e66b3fadbbd9180e37c8db195fwinstall: $(INSTALL_DEPS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Include common targets.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(UTSBASE)/sparc/Makefile.targ
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Defines for local commands.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
d2b9c6763c7b3aad7a4c2609ca71e0b02114bca9fwWARLOCK = warlock
d2b9c6763c7b3aad7a4c2609ca71e0b02114bca9fwWLCC = wlcc
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiTOUCH = touch
817697f4a28f704a2d88ace09406d985aa3a8549Kelly MoyerTEST = test
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer#
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer# lock_lint rules
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer#
817697f4a28f704a2d88ace09406d985aa3a8549Kelly MoyerUSBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll)
817697f4a28f704a2d88ace09406d985aa3a8549Kelly MoyerUHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll)
817697f4a28f704a2d88ace09406d985aa3a8549Kelly MoyerOHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
817697f4a28f704a2d88ace09406d985aa3a8549Kelly MoyerEHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyerwarlock: $(WARLOCK_OK) warlock_with_usba
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usb_ia.wlcmd warlock_ddi.files
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer $(WARLOCK) -c $(WLCMD_DIR)/usb_ia.wlcmd $(WARLOCK_OUT) \
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer -l ../warlock/ddi_dki_impl.ll
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer $(TOUCH) $@
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer%.ll: $(UTSBASE)/common/io/usb/usb_ia/%.c \
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer $(UTSBASE)/common/sys/usb/usb_ia/usb_iavar.h
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyerwarlock_with_usba: $(WLCMD_DIR)/usb_ia_with_usba.wlcmd $(WARLOCK_OUT) \
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer usba_files ohci_files ehci_files uhci_files warlock_ddi.files
817697f4a28f704a2d88ace09406d985aa3a8549Kelly Moyer $(WARLOCK) -c $(WLCMD_DIR)/usb_ia_with_usba.wlcmd \
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki $(WARLOCK_OUT) \
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki -l ../warlock/ddi_dki_impl.ll
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiusba_files:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki @cd ../usba;pwd; $(MAKE) warlock
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiuhci_files:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki @cd ../uhci;pwd; $(MAKE) warlock
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiohci_files:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki @cd ../ohci;pwd; $(MAKE) warlock
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiehci_files:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki @cd ../ehci;pwd; $(MAKE) warlock
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiwarlock_ddi.files:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki cd ../warlock; pwd; $(MAKE) warlock
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki