Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# CDDL HEADER START
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# The contents of this file are subject to the terms of the
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Common Development and Distribution License (the "License").
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# You may not use this file except in compliance with the License.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# or http://www.opensolaris.org/os/licensing.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# See the License for the specific language governing permissions
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# and limitations under the License.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# When distributing Covered Code, include this CDDL HEADER in each
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# If applicable, add the following below this CDDL HEADER, with the
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# fields enclosed by brackets "[]" replaced with your own identifying
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# information: Portions Copyright [yyyy] [name of copyright owner]
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# CDDL HEADER END
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Use is subject to license terms.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# uts/sparc/bpf/Makefile
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# This makefile drives the production of the bpf driver
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# kernel module.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# sparc architecture dependent
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Path to the base of the uts directory tree (usually /usr/src/uts).
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedUTSBASE = ../..
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Define the module and object file sets.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedMODULE = bpf
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedOBJECTS = $(BPF_OBJS:%=$(OBJS_DIR)/%)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedLINTS = $(BPF_OBJS:%.o=$(LINTS_DIR)/%.ln)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedROOTMODULE = $(USR_DRV_DIR)/$(MODULE)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedCONF_SRCDIR = $(UTSBASE)/common/io/bpf
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Include common rules.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedinclude $(UTSBASE)/sparc/Makefile.sparc
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Define targets
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedALL_TARGET = $(BINARY) $(SRC_CONFFILE)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedLINT_TARGET = $(MODULE).lint
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedCFLAGS += $(CCVERBOSE)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedLDFLAGS += -dy -Nmisc/mac -Nmisc/dls -Ndrv/ipnet -Nmisc/neti
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedINC_PATH += -I$(UTSBASE)/common/io/bpf
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# For now, disable these lint checks; maintainers should endeavor
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# to investigate and remove these for maximum lint coverage.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Please do not carry these forward to new Makefiles.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren ReedLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -erroff=E_BAD_PTR_CAST_ALIGN
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-label
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-uninitialized
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Default build targets.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed.KEEP_STATE:
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reeddef: $(DEF_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedall: $(ALL_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedclean: $(CLEAN_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedclobber: $(CLOBBER_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedlint: $(LINT_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedmodlintlib: $(MODLINTLIB_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedclean.lint: $(CLEAN_LINT_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedinstall: $(INSTALL_DEPS)
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed# Include common targets.
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reed#
0a0e9771ca0211c15f3ac4466b661c145feeb9e4Darren Reedinclude $(UTSBASE)/sparc/Makefile.targ