Makefile revision 4bb7efa72ed531c10f097919636e67724ec4c25a
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# CDDL HEADER START
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# The contents of this file are subject to the terms of the
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Common Development and Distribution License (the "License").
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# You may not use this file except in compliance with the License.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# or http://www.opensolaris.org/os/licensing.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# See the License for the specific language governing permissions
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# and limitations under the License.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# When distributing Covered Code, include this CDDL HEADER in each
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# If applicable, add the following below this CDDL HEADER, with the
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# fields enclosed by brackets "[]" replaced with your own identifying
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# information: Portions Copyright [yyyy] [name of copyright owner]
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# CDDL HEADER END
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Use is subject to license terms.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# uts/intel/sda/Makefile
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# This makefile drives the production of the sda "misc"
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# kernel module.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# intel architecture dependent
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Path to the base of the uts directory tree (usually /usr/src/uts).
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreUTSBASE = ../..
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Define the module and object file sets.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreMODULE = sda
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreOBJECTS = $(SDA_OBJS:%=$(OBJS_DIR)/%)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreLINTS = $(SDA_OBJS:%.o=$(LINTS_DIR)/%.ln)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreWARLOCK_OUT = $(SDA_OBJS:%.o=%.ll)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreWARLOCK_OK = $(MODULE).ok
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Include common rules.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreinclude $(UTSBASE)/intel/Makefile.intel
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Define targets
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreALL_TARGET = $(BINARY)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreLINT_TARGET = $(MODULE).lint
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Overrides.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreDEBUG_FLGS =
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreDEBUG_DEFS += $(DEBUG_FLGS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# lint pass one enforcement
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreCFLAGS += $(CCVERBOSE)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# dependency on blk2scsa module, scope limiting mapfile
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Note that we have to allow CTFMERGE to use fuzzy matching
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreMAPFILE = $(UTSBASE)/common/io/sdcard/impl/mapfile
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreLDFLAGS += -dy -Nmisc/blk2scsa -B reduce -M $(MAPFILE)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreCTFMRGFLAGS += -f
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Default build targets.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore.KEEP_STATE:
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoredef: $(DEF_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreall: $(ALL_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreclean: $(CLEAN_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreclobber: $(CLOBBER_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amorelint: $(LINT_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoremodlintlib: $(MODLINTLIB_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreclean.lint: $(CLEAN_LINT_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreinstall: $(INSTALL_DEPS)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore# Include common targets.
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amoreinclude $(UTSBASE)/intel/Makefile.targ
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreWLCC = wlcc
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreTOUCH = touch
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'AmoreWARLOCK = warlock
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amorewarlock: $(WARLOCK_OK)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore$(WARLOCK_OK): $(WARLOCK_OUT)
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore $(TOUCH) $@
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore%.ll: $(UTSBASE)/common/io/sdcard/impl/%.c
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<