Makefile revision bf56214c0556fa6864189c826d39dbe156bb22a0
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
220ba6da875ee8824dd0b21c4446c2a369854efcTinderbox User# CDDL HEADER START
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# or http://www.opensolaris.org/os/licensing.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# See the License for the specific language governing permissions
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# and limitations under the License.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# When distributing Covered Code, include this CDDL HEADER in each
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# If applicable, add the following below this CDDL HEADER, with the
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# CDDL HEADER END
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Use is subject to license terms.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#ident "%Z%%M% %I% %E% SMI"
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# This Makefile drives the production of ecpp
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# kernel module.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Path to the base of the uts directory tree (usually /usr/src/uts).
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan HuntUTSBASE = ../..
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Define the module and object file sets.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan HuntMODULE = ecpp
a8783019814daa36dd57afe3f527462822834c3bEvan HuntOBJECTS = $(ECPP_OBJS:%=$(OBJS_DIR)/%)
a8783019814daa36dd57afe3f527462822834c3bEvan HuntLINTS = $(ECPP_OBJS:%.o=$(LINTS_DIR)/%.ln)
a8783019814daa36dd57afe3f527462822834c3bEvan HuntROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
a8783019814daa36dd57afe3f527462822834c3bEvan HuntCONF_SRCDIR = $(UTSBASE)/common/io
a8783019814daa36dd57afe3f527462822834c3bEvan HuntWARLOCK_OUT = $(ECPP_OBJS:%.o=%.ll)
a8783019814daa36dd57afe3f527462822834c3bEvan HuntWARLOCK_OK = $(MODULE).ok
a8783019814daa36dd57afe3f527462822834c3bEvan HuntWLCMD_DIR = $(UTSBASE)/common/io/warlock
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Include common rules.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Huntinclude $(UTSBASE)/intel/Makefile.intel
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Define targets
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan HuntALL_TARGET = $(BINARY) $(SRC_CONFILE)
a8783019814daa36dd57afe3f527462822834c3bEvan HuntLINT_TARGET = $(MODULE).lint
a8783019814daa36dd57afe3f527462822834c3bEvan HuntINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# For now, disable these lint checks; maintainers should endeavor
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# to investigate and remove these for maximum lint coverage.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Please do not carry these forward to new Makefiles.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan HuntLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
a8783019814daa36dd57afe3f527462822834c3bEvan HuntLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
a8783019814daa36dd57afe3f527462822834c3bEvan HuntLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Default build targets.
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrews#
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrews.KEEP_STATE:
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrews
a8783019814daa36dd57afe3f527462822834c3bEvan Huntdef: $(DEF_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Huntall: $(ALL_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrewsclean: $(CLEAN_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Huntclean: $(CLEAN_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8aa098c6334de11c8fd117d30851cc457813c410Mark Andrews
a8783019814daa36dd57afe3f527462822834c3bEvan Huntclobber: $(CLOBBER_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Huntmodlintlib: $(MODLINTLIB_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Huntclean.lint: $(CLEAN_LINT_DEPS)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Huntinstall: $(INSTALL_DEPS)
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrews
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrews#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Include common targets.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Huntinclude $(UTSBASE)/intel/Makefile.targ
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# Defines for local commands.
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan HuntWARLOCK = warlock
a8783019814daa36dd57afe3f527462822834c3bEvan HuntWLCC = wlcc
a8783019814daa36dd57afe3f527462822834c3bEvan HuntTOUCH = touch
a8783019814daa36dd57afe3f527462822834c3bEvan HuntTEST = test
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt# lock_lint rules
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt#
2b703026f38a1793a7e6482d7a1c1c48a8661305Mark Andrewswarlock: $(WARLOCK_OK)
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/ecpp.wlcmd warlock_ddi.files
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt $(WARLOCK) -c $(WLCMD_DIR)/ecpp.wlcmd $(WARLOCK_OUT) \
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt -l ../warlock/ddi_dki_impl.ll
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt $(TOUCH) $@
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt%.ll: $(UTSBASE)/common/io/%.c $(UTSBASE)/common/sys/ecppvar.h \
c2955d0abd3a9822bc18cf0ae3b3fba505ce80f6Mark Andrews $(UTSBASE)/common/sys/ecppio.h
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt
a8783019814daa36dd57afe3f527462822834c3bEvan Huntwarlock_ddi.files:
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt cd ../warlock; pwd; $(MAKE) warlock
a8783019814daa36dd57afe3f527462822834c3bEvan Hunt