Makefile revision 4604:5989fb2cb1d5
1192886Sedwin# 2192886Sedwin# CDDL HEADER START 32744Swollman# 420091Swollman# The contents of this file are subject to the terms of the 520091Swollman# Common Development and Distribution License (the "License"). 620091Swollman# You may not use this file except in compliance with the License. 7149511Swollman# 8149511Swollman# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9149511Swollman# or http://www.opensolaris.org/os/licensing. 102744Swollman# See the License for the specific language governing permissions 11309577Sglebius# and limitations under the License. 12309577Sglebius# 13309577Sglebius# When distributing Covered Code, include this CDDL HEADER in each 14309577Sglebius# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15309577Sglebius# If applicable, add the following below this CDDL HEADER, with the 16309577Sglebius# fields enclosed by brackets "[]" replaced with your own identifying 17309577Sglebius# information: Portions Copyright [yyyy] [name of copyright owner] 182744Swollman# 1920091Swollman# CDDL HEADER END 2020091Swollman# 2120091Swollman# 2243009Swollman# uts/sparc/usb_ia/Makefile 23270817Spluknet 24199405Sobrien# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2543009Swollman# Use is subject to license terms. 26199405Sobrien# 2743009Swollman# This makefile drives the production of the usb_ia driver kernel module. 2820091Swollman# sparc architecture dependent 2920091Swollman# 3020091Swollman 312744Swollman#ident "%Z%%M% %I% %E% SMI" 322744Swollman 332744Swollman# 342744Swollman# Path to the base of the uts directory tree (usually /usr/src/uts). 352744Swollman# 36309577SglebiusUTSBASE = ../.. 3775264Swollman 3875264Swollman# 3975264Swollman# Define the module and object file sets. 40309577Sglebius# 4175264SwollmanMODULE = usb_ia 42257697SedwinOBJECTS = $(USB_IA_OBJS:%=$(OBJS_DIR)/%) 432744SwollmanLINTS = $(USB_IA_OBJS:%.o=$(LINTS_DIR)/%.ln) 442744SwollmanROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 452744SwollmanWARLOCK_OUT = $(USB_IA_OBJS:%.o=%.ll) 462744SwollmanWARLOCK_OK = $(MODULE).ok 472744SwollmanWLCMD_DIR = $(UTSBASE)/common/io/warlock 482744Swollman 492744Swollman# 502744Swollman# Include common rules. 51309577Sglebius# 522744Swollmaninclude $(UTSBASE)/sparc/Makefile.sparc 53309577Sglebius 54309577Sglebius# 55309577Sglebius# lint pass one enforcement 56309577Sglebius# 57309577SglebiusCFLAGS += $(CCVERBOSE) 58309577Sglebius 59309577Sglebius# 60309577Sglebius# depends on misc/usba 61309577Sglebius# 62309577SglebiusLDFLAGS += -dy -Nmisc/usba 63309577Sglebius 64309577Sglebius# 65309577Sglebius# Define targets 66309577Sglebius# 67309577SglebiusALL_TARGET = $(BINARY) 68309577SglebiusLINT_TARGET = $(MODULE).lint 69309577SglebiusINSTALL_TARGET = $(BINARY) $(ROOTMODULE) 70309577Sglebius 71309577Sglebius.KEEP_STATE: 72309577Sglebius 73309577Sglebiusall: $(ALL_DEPS) 74309577Sglebius 75309577Sglebiusdef: $(DEF_DEPS) 76309577Sglebius 77309577Sglebiusclean: $(CLEAN_DEPS) 78309577Sglebius $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 79 80clobber: $(CLOBBER_DEPS) 81 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 82 83lint: $(LINT_DEPS) 84 85modlintlib: $(MODLINTLIB_DEPS) 86 87clean.lint: $(CLEAN_LINT_DEPS) 88 89install: $(INSTALL_DEPS) 90 91# 92# Include common targets. 93# 94include $(UTSBASE)/sparc/Makefile.targ 95 96# 97# Defines for local commands. 98# 99WARLOCK = warlock 100WLCC = wlcc 101TOUCH = touch 102TEST = test 103 104# 105# lock_lint rules 106# 107USBA_FILES = $(USBA_OBJS:%.o=../usba/%.ll) 108UHCI_FILES = $(UHCI_OBJS:%.o=../uhci/%.ll) 109OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll) 110EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll) 111 112warlock: $(WARLOCK_OK) warlock_with_usba 113 114$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/usb_ia.wlcmd warlock_ddi.files 115 $(WARLOCK) -c $(WLCMD_DIR)/usb_ia.wlcmd $(WARLOCK_OUT) \ 116 -l ../warlock/ddi_dki_impl.ll 117 $(TOUCH) $@ 118 119%.ll: $(UTSBASE)/common/io/usb/usb_ia/%.c \ 120 $(UTSBASE)/common/sys/usb/usb_ia/usb_iavar.h 121 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 122 123warlock_with_usba: $(WLCMD_DIR)/usb_ia_with_usba.wlcmd $(WARLOCK_OUT) \ 124 usba_files ohci_files ehci_files uhci_files warlock_ddi.files 125 $(WARLOCK) -c $(WLCMD_DIR)/usb_ia_with_usba.wlcmd \ 126 $(USBA_FILES) $(OHCI_FILES) $(EHCI_FILES) $(UHCI_FILES) \ 127 $(WARLOCK_OUT) \ 128 -l ../warlock/ddi_dki_impl.ll 129 130 131usba_files: 132 @cd ../usba;pwd; $(MAKE) warlock 133 134uhci_files: 135 @cd ../uhci;pwd; $(MAKE) warlock 136 137ohci_files: 138 @cd ../ohci;pwd; $(MAKE) warlock 139 140ehci_files: 141 @cd ../ehci;pwd; $(MAKE) warlock 142 143warlock_ddi.files: 144 cd ../warlock; pwd; $(MAKE) warlock 145